mirror of
https://github.com/mupen64plus/mupen64plus-rsp-cxd4.git
synced 2024-05-14 10:09:35 -04:00
CI/CD: Update
This commit is contained in:
parent
fe4ec7d39f
commit
770094f7a0
112
.github/workflows/build.yml
vendored
112
.github/workflows/build.yml
vendored
|
@ -20,11 +20,21 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- cc: GCC
|
||||
platform: x64
|
||||
bits: 64
|
||||
- cc: GCC
|
||||
platform: x86
|
||||
bits: 32
|
||||
- cc: Clang
|
||||
name: Linux / ${{ matrix.cc }} / x64 | x86
|
||||
runs-on: ubuntu-20.04
|
||||
platform: x64
|
||||
bits: 64
|
||||
- cc: Clang
|
||||
platform: x86
|
||||
bits: 32
|
||||
name: Linux / ${{ matrix.cc }} / ${{ matrix.platform }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Get build dependencies and arrange the environment
|
||||
run: |
|
||||
sudo apt-get update
|
||||
|
@ -32,6 +42,10 @@ jobs:
|
|||
sudo ldconfig
|
||||
- name: Build and related stuff
|
||||
run: |
|
||||
if [[ ${{ matrix.bits }} -eq 32 ]]; then export OPTFLAGS="-O2 -flto -mtune=pentium4"; else export OPTFLAGS="-O2 -flto -mtune=core2"; fi
|
||||
G_REV=$(git rev-parse --short HEAD)
|
||||
echo "G_REV=${G_REV}" >> "${GITHUB_ENV}"
|
||||
ORIG="$(pwd)"
|
||||
if [[ "${{ matrix.cc }}" == "GCC" ]]; then
|
||||
CC="gcc"
|
||||
CXX="g++"
|
||||
|
@ -39,28 +53,37 @@ jobs:
|
|||
CC="clang"
|
||||
CXX="clang++"
|
||||
fi
|
||||
if [[ ${{ matrix.bits }} -eq 32 ]]; then export PIC="1"; fi
|
||||
${CC} --version
|
||||
echo ""
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
SSE="none"
|
||||
for BITS in 64 32 64 32
|
||||
mkdir tmp
|
||||
for SSE in none SSE2
|
||||
do
|
||||
if [[ ${BITS} -eq 32 ]]; then MSG="x86"; else MSG="x64"; fi
|
||||
if [[ "${SSE}" == "SSE2" ]]; then
|
||||
LIB="-sse2"
|
||||
MSG="${MSG} / SSE2"
|
||||
fi
|
||||
echo ""
|
||||
echo ":: ${{ matrix.cc }} ${MSG} ::"
|
||||
echo ":: ${{ matrix.cc }} ${{ matrix.platform }}${MSG} ::"
|
||||
echo ""
|
||||
make -C projects/unix clean
|
||||
make SSE="${SSE}" -C projects/unix clean
|
||||
echo ""
|
||||
make CC="${CC}" CXX="${CXX}" BITS="${BITS}" SSE="${SSE}" -C projects/unix all
|
||||
make CC="${CC}" CXX="${CXX}" BITS="${{ matrix.bits }}" SSE="${SSE}" -C projects/unix all -j4
|
||||
echo ""
|
||||
ls -gG projects/unix/*.so
|
||||
ldd projects/unix/mupen64plus-rsp-cxd4${LIB}.so
|
||||
if [[ ${BITS} -eq 32 ]]; then SSE="SSE2"; fi
|
||||
make SSE="${SSE}" -C projects/unix install DESTDIR="${ORIG}/tmp"
|
||||
echo ""
|
||||
cd tmp/usr/local/lib/mupen64plus
|
||||
ls -gG mupen64plus-rsp-cxd4${LIB}.so
|
||||
ldd mupen64plus-rsp-cxd4${LIB}.so
|
||||
LIB="-sse2"
|
||||
MSG=" / SSE2"
|
||||
cd "${ORIG}"
|
||||
done
|
||||
mkdir pkg
|
||||
if [[ "${CC}" == "gcc" ]]; then tar cvzf pkg/mupen64plus-rsp-cxd4-${{ matrix.platform }}-g${G_REV}.tar.gz -C tmp/ "usr"; fi
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mupen64plus-rsp-cxd4-${{ matrix.platform }}-g${{ env.G_REV }}
|
||||
path: pkg/*
|
||||
if-no-files-found: ignore
|
||||
|
||||
MSYS2:
|
||||
strategy:
|
||||
|
@ -81,52 +104,55 @@ jobs:
|
|||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW${{ matrix.bits }}
|
||||
update: true
|
||||
install: >-
|
||||
git
|
||||
libtool
|
||||
make
|
||||
mingw-w64-${{ matrix.cross }}-gcc
|
||||
mingw-w64-${{ matrix.cross }}-toolchain
|
||||
- name: Build and related stuff
|
||||
run: |
|
||||
export OPTFLAGS="-O2 -flto"
|
||||
if [[ ${{ matrix.bits }} -eq 32 ]]; then export OPTFLAGS="-O2 -flto -mtune=pentium4"; else export OPTFLAGS="-O2 -flto -mtune=core2"; fi
|
||||
echo "G_REV=$(git rev-parse --short HEAD)" >> "${GITHUB_ENV}"
|
||||
ORIG="$(pwd)"
|
||||
CC="gcc"
|
||||
CXX="g++"
|
||||
${CC} --version
|
||||
echo ""
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
mkdir backup
|
||||
mkdir tmp
|
||||
for SSE in none SSE2
|
||||
do
|
||||
echo ""
|
||||
echo ":: ${{ matrix.cc }} ${{ matrix.platform }}${MSG} ::"
|
||||
echo ""
|
||||
make -C projects/unix clean
|
||||
make SSE="${SSE}" -C projects/unix clean
|
||||
echo ""
|
||||
make CC="${CC}" CXX="${CXX}" BITS="${{ matrix.bits }}" SSE="${SSE}" -C projects/unix all
|
||||
make CC="${CC}" CXX="${CXX}" BITS="${{ matrix.bits }}" SSE="${SSE}" -C projects/unix all -j4
|
||||
echo ""
|
||||
cp projects/unix/*.dll backup/
|
||||
ls -gG backup/mupen64plus-rsp-cxd4${LIB}.dll
|
||||
ldd backup/mupen64plus-rsp-cxd4${LIB}.dll
|
||||
make SSE="${SSE}" -C projects/unix install PLUGINDIR="" SHAREDIR="" BINDIR="" MANDIR="" LIBDIR="" APPSDIR="" ICONSDIR="icons" INCDIR="api" LDCONFIG="true" DESTDIR="${ORIG}/tmp"
|
||||
echo ""
|
||||
ls -gG tmp/mupen64plus-rsp-cxd4${LIB}.dll
|
||||
ldd tmp/mupen64plus-rsp-cxd4${LIB}.dll
|
||||
LIB="-sse2"
|
||||
MSG=" / SSE2"
|
||||
done
|
||||
- name: Copy binaries, dependencies, etc...
|
||||
run: |
|
||||
mkdir pkg
|
||||
cd backup
|
||||
cd tmp
|
||||
for BIN in *.dll
|
||||
do
|
||||
echo ":: Copying ${BIN}"
|
||||
cp "${BIN}" ../pkg/
|
||||
done
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mupen64plus-rsp-cxd4-msys2-${{ matrix.platform }}-g${{ env.G_REV }}
|
||||
path: pkg/*
|
||||
|
@ -146,8 +172,8 @@ jobs:
|
|||
run:
|
||||
shell: cmd
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: microsoft/setup-msbuild@v1.0.3
|
||||
- uses: actions/checkout@v3
|
||||
- uses: microsoft/setup-msbuild@v1
|
||||
# with:
|
||||
# vs-version: 16.11
|
||||
- name: Build and related stuff
|
||||
|
@ -172,19 +198,19 @@ jobs:
|
|||
cd pkg
|
||||
xcopy "..\backup" .
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mupen64plus-rsp-cxd4-msvc-${{ matrix.platform }}-g${{ env.G_REV }}
|
||||
path: pkg/*
|
||||
|
||||
Nightly-build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [MSYS2, MSVC]
|
||||
needs: [Linux, MSYS2, MSVC]
|
||||
if: github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: binaries
|
||||
- name: Get some tools
|
||||
|
@ -197,20 +223,30 @@ jobs:
|
|||
cd binaries
|
||||
for BIN in *
|
||||
do
|
||||
echo ":: Creating ${BIN}.zip"
|
||||
cd "${BIN}"
|
||||
zip -r "../../pkg/${BIN}.zip" *
|
||||
if [[ "${BIN:21:4}" == "msys" ]]; then
|
||||
echo ":: Creating ${BIN}.zip"
|
||||
zip -r "../../pkg/${BIN}.zip" *
|
||||
elif [[ "${BIN:21:4}" == "msvc" ]]; then
|
||||
echo ":: Creating ${BIN}.zip"
|
||||
zip -r "../../pkg/${BIN}.zip" *
|
||||
else
|
||||
echo ":: Recovering ${BIN}.tar.gz"
|
||||
mv *.tar.gz ../../pkg/
|
||||
fi
|
||||
cd ..
|
||||
done
|
||||
cd ../pkg
|
||||
echo ""
|
||||
for BIN in *.zip
|
||||
for BIN in *
|
||||
do
|
||||
ls -gG ${BIN}
|
||||
tigerdeep -l ${BIN} >> ${BIN:0:20}.tiger.txt
|
||||
sha256sum ${BIN} >> ${BIN:0:20}.sha256.txt
|
||||
sha512sum ${BIN} >> ${BIN:0:20}.sha512.txt
|
||||
tigerdeep -l ${BIN} >> ../${BIN:0:20}.tiger.txt
|
||||
sha256sum ${BIN} >> ../${BIN:0:20}.sha256.txt
|
||||
sha512sum ${BIN} >> ../${BIN:0:20}.sha512.txt
|
||||
done
|
||||
mv ../*.tiger.txt .
|
||||
mv ../*.sha*.txt .
|
||||
echo ""
|
||||
echo "TIGER:"
|
||||
cat *.tiger.txt
|
||||
|
|
|
@ -169,7 +169,6 @@ ifeq ($(ARCH_DETECTED), 64BITS_32)
|
|||
endif
|
||||
ifneq ($(OS), OSX)
|
||||
ifeq ($(OS), MINGW)
|
||||
CFLAGS += -march=i686
|
||||
LDFLAGS += -Wl,-m,i386pe
|
||||
else
|
||||
CFLAGS += -m32
|
||||
|
@ -180,7 +179,6 @@ endif
|
|||
|
||||
ifeq ($(ARCH_DETECTED), 64BITS)
|
||||
ifeq ($(OS), MINGW)
|
||||
CFLAGS += -march=x86-64
|
||||
LDFLAGS += -Wl,-m,i386pep
|
||||
endif
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue