mirror of
https://github.com/mupen64plus/mupen64plus-video-rice.git
synced 2025-04-02 10:51:56 -04:00
CI/CD: Update to generic scripts, independent schedule, etc
This commit is contained in:
parent
470865c6c6
commit
85a2edc9ba
2 changed files with 202 additions and 160 deletions
206
.github/workflows/build.yml
vendored
206
.github/workflows/build.yml
vendored
|
@ -3,16 +3,12 @@ name: Rice
|
|||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.{gitattributes,gitignore,travis.yml}'
|
||||
- 'appveyor.yml,README'
|
||||
- '*.md,appveyor.yml,README'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '.{gitattributes,gitignore,travis.yml}'
|
||||
- 'appveyor.yml,README'
|
||||
schedule:
|
||||
- cron: '20 14 21 * *'
|
||||
- '*.md,appveyor.yml,README'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
@ -23,67 +19,36 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- cc: GCC
|
||||
platform: x64
|
||||
bits: 64
|
||||
arch: x64
|
||||
- cc: GCC
|
||||
platform: x86
|
||||
bits: 32
|
||||
arch: x86
|
||||
- cc: Clang
|
||||
platform: x64
|
||||
bits: 64
|
||||
arch: x64
|
||||
- cc: Clang
|
||||
platform: x86
|
||||
bits: 32
|
||||
name: Linux / ${{ matrix.cc }} / ${{ matrix.platform }}
|
||||
arch: x86
|
||||
name: Linux / ${{ matrix.cc }} / ${{ matrix.arch }}
|
||||
runs-on: ubuntu-22.04
|
||||
if: (github.event_name == 'schedule' && github.repository == 'mupen64plus/mupen64plus-video-rice') || (github.event_name != 'schedule')
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Get build dependencies and arrange the environment
|
||||
run: |
|
||||
echo "G_REV=$(git rev-parse --short HEAD)" >> "${GITHUB_ENV}"
|
||||
if [[ ${{ matrix.bits }} -eq 32 ]]; then sudo dpkg --add-architecture i386; fi
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install libgl1-mesa-dev libpng-dev libsdl1.2-dev libsdl2-dev zlib1g-dev
|
||||
if [[ ${{ matrix.bits }} -eq 32 ]]; then sudo apt-get --reinstall -y install gcc-multilib g++-multilib libc6 libc6-dev-i386 libatomic1:i386 libgcc-s1:i386 libstdc++6:i386 libgl1-mesa-dev:i386 libpng-dev:i386 libsdl1.2-dev:i386 libsdl2-dev:i386 zlib1g-dev:i386; fi
|
||||
sudo ldconfig
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
export C_CLANG_SUFFIX="-15" C_GCC_SUFFIX="-12"
|
||||
export BUILD_DEPS="libgl1-mesa-dev libpng-dev libsdl1.2-dev libsdl2-dev zlib1g-dev"
|
||||
./../mupen64plus-core/.github/workflows/scripts/ci_install_ubuntu_deps.sh ${{ matrix.arch }} ${{ matrix.cc }}
|
||||
- name: Build and related stuff, backup binaries
|
||||
run: |
|
||||
if [[ ${{ matrix.bits }} -eq 32 ]]; then export PIC="1" CPU_TUNE="-msse2 -mtune=pentium4"; else CPU_TUNE="-mtune=core2"; fi
|
||||
export OPTFLAGS="-O2 -flto ${CPU_TUNE}"
|
||||
ORIG="$(pwd)"
|
||||
CC="gcc"
|
||||
CXX="g++"
|
||||
if [[ "${{ matrix.cc }}" != "GCC" ]]; then
|
||||
CC="clang"
|
||||
CXX="clang++"
|
||||
fi
|
||||
${CC} --version
|
||||
echo ""
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
MSG="1.2"
|
||||
mkdir pkg
|
||||
for SDL in sdl sdl2; do
|
||||
echo ""
|
||||
echo ":: ${{ matrix.cc }} ${{ matrix.platform }} / SDL${MSG} ::"
|
||||
echo ""
|
||||
make -C projects/unix clean
|
||||
echo ""
|
||||
make CC="${CC}" CXX="${CXX}" BITS="${{ matrix.bits }}" SDL_CONFIG="${SDL}-config" -C projects/unix all -j4
|
||||
echo ""
|
||||
make -C projects/unix install DESTDIR="${ORIG}/pkg/"
|
||||
echo ""
|
||||
ls -gG pkg/usr/local/lib/mupen64plus/*.so
|
||||
echo ""
|
||||
ldd pkg/usr/local/lib/mupen64plus/mupen64plus-video-rice.so
|
||||
MSG="2"
|
||||
done
|
||||
tar cvzf pkg/mupen64plus-video-rice-linux-${{ matrix.platform }}-g${{ env.G_REV }}.tar.gz -C pkg/ "usr"
|
||||
export C_CLANG_SUFFIX="-15" C_GCC_SUFFIX="-12"
|
||||
export PATH="$(pwd)/../mupen64plus-core/.github/workflows/scripts:${PATH}"
|
||||
export CONFIG_OVERRIDE="SDL_CONFIG="sdl-config""
|
||||
ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }}
|
||||
export CONFIG_OVERRIDE="SDL_CONFIG="sdl2-config""
|
||||
ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }} makepkg
|
||||
- name: Upload artifact
|
||||
if: matrix.cc == 'GCC'
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mupen64plus-video-rice-linux-${{ matrix.platform }}-g${{ env.G_REV }}
|
||||
name: ${{ env.PKG_NAME }}
|
||||
path: pkg/*.tar.gz
|
||||
|
||||
MSYS2:
|
||||
|
@ -92,24 +57,23 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- cc: GCC
|
||||
platform: x64
|
||||
arch: x64
|
||||
cross: x86_64
|
||||
bits: 64
|
||||
env: MINGW64
|
||||
- cc: GCC
|
||||
platform: x86
|
||||
arch: x86
|
||||
cross: i686
|
||||
bits: 32
|
||||
name: Windows / MSYS2 ${{ matrix.cc }} / ${{ matrix.platform }}
|
||||
env: MINGW32
|
||||
name: Windows / MSYS2 ${{ matrix.cc }} / ${{ matrix.arch }}
|
||||
runs-on: windows-2022
|
||||
if: (github.event_name == 'schedule' && github.repository == 'mupen64plus/mupen64plus-video-rice') || (github.event_name != 'schedule')
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW${{ matrix.bits }}
|
||||
msystem: ${{ matrix.env }}
|
||||
update: true
|
||||
install: >-
|
||||
git
|
||||
|
@ -118,43 +82,20 @@ jobs:
|
|||
mingw-w64-${{ matrix.cross }}-gcc
|
||||
mingw-w64-${{ matrix.cross }}-toolchain
|
||||
mingw-w64-${{ matrix.cross }}-libpng
|
||||
mingw-w64-${{ matrix.cross }}-ntldd
|
||||
mingw-w64-${{ matrix.cross }}-SDL2
|
||||
mingw-w64-${{ matrix.cross }}-zlib
|
||||
- name: Build and related stuff, backup binaries
|
||||
run: |
|
||||
echo "G_REV=$(git rev-parse --short HEAD)" >> "${GITHUB_ENV}"
|
||||
if [[ ${{ matrix.bits }} -eq 32 ]]; then CPU_TUNE="-msse2 -mtune=pentium4"; else CPU_TUNE="-mtune=core2"; fi
|
||||
export OPTFLAGS="-O2 -flto ${CPU_TUNE}"
|
||||
ORIG="$(pwd)"
|
||||
CC="gcc"
|
||||
CXX="g++"
|
||||
${CC} --version
|
||||
echo ""
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
mkdir pkg
|
||||
echo ""
|
||||
echo ":: ${{ matrix.cc }} ${{ matrix.platform }} / SDL2 ::"
|
||||
echo ""
|
||||
make -C projects/unix clean
|
||||
echo ""
|
||||
make CC="${CC}" CXX="${CXX}" BITS="${{ matrix.bits }}" -C projects/unix all -j4
|
||||
echo ""
|
||||
make -C projects/unix install PLUGINDIR="" SHAREDIR="" BINDIR="" MANDIR="" LIBDIR="" APPSDIR="" ICONSDIR="icons" INCDIR="api" LDCONFIG="true" DESTDIR="${ORIG}/pkg/"
|
||||
echo ""
|
||||
ls -gG pkg/*.dll
|
||||
echo ""
|
||||
ldd pkg/mupen64plus-video-rice.dll
|
||||
./../mupen64plus-core/.github/workflows/scripts/ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }}
|
||||
- name: Backup dependencies, etc...
|
||||
run: |
|
||||
if [[ ${{ matrix.bits }} -eq 32 ]]; then LIBGCC="libgcc_s_dw2-1"; else LIBGCC="libgcc_s_seh-1"; fi
|
||||
for LIB in ${LIBGCC} libpng16-16 libstdc++-6 libwinpthread-1 SDL2 zlib1; do
|
||||
echo ":: Copying ${LIB}.dll"
|
||||
cp "/mingw${{ matrix.bits }}/bin/${LIB}.dll" pkg/
|
||||
done
|
||||
./../mupen64plus-core/.github/workflows/scripts/ci_backup_mingw_deps.sh ${{ matrix.env }}
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mupen64plus-video-rice-msys2-${{ matrix.platform }}-g${{ env.G_REV }}
|
||||
name: ${{ env.PKG_NAME }}
|
||||
path: pkg/*
|
||||
|
||||
MSVC:
|
||||
|
@ -163,45 +104,31 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- toolset: v143
|
||||
platform: x64
|
||||
arch: x64
|
||||
vs: 2022
|
||||
- toolset: v141_xp
|
||||
platform: x86
|
||||
arch: x86
|
||||
vs: 2019
|
||||
name: Windows / MSVC with ${{ matrix.toolset }} / ${{ matrix.platform }}
|
||||
name: Windows / MSVC with ${{ matrix.toolset }} / ${{ matrix.arch }}
|
||||
runs-on: windows-${{ matrix.vs }}
|
||||
if: (github.event_name == 'schedule' && github.repository == 'mupen64plus/mupen64plus-video-rice') || (github.event_name != 'schedule')
|
||||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: microsoft/setup-msbuild@v1
|
||||
- uses: actions/checkout@v4
|
||||
- uses: microsoft/setup-msbuild@v2
|
||||
- name: Build and related stuff, backup binaries
|
||||
run: |
|
||||
for /f "tokens=1" %%R in ('git rev-parse --short HEAD') do echo G_REV=%%R>> "%GITHUB_ENV%"
|
||||
set "ARCH=${{ matrix.platform }}"
|
||||
if [%ARCH%] == [x86] set "ARCH=Win32"
|
||||
echo.
|
||||
msbuild --version
|
||||
echo.
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ..\mupen64plus-core
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-win32-deps.git ..\mupen64plus-win32-deps
|
||||
md pkg
|
||||
echo.
|
||||
msbuild projects\msvc\mupen64plus-video-rice.vcxproj /p:Configuration=Release;Platform=%ARCH%;PlatformToolset=${{ matrix.toolset }}
|
||||
echo.
|
||||
copy "projects\msvc\%ARCH%\Release\mupen64plus-video-rice.dll" pkg\
|
||||
dir pkg\*.dll
|
||||
set TOOLSET=${{ matrix.toolset }}
|
||||
.\..\mupen64plus-core\.github\workflows\scripts\ci_msvc_build.cmd ${{ matrix.arch }}
|
||||
- name: Backup dependencies, etc...
|
||||
run: |
|
||||
xcopy data pkg
|
||||
copy "..\mupen64plus-win32-deps\libpng-1.6.39\lib\${{ matrix.platform }}\*.dll" pkg\
|
||||
copy "..\mupen64plus-win32-deps\SDL2-2.26.3\lib\${{ matrix.platform }}\*.dll" pkg\
|
||||
.\..\mupen64plus-core\.github\workflows\scripts\ci_backup_msvc_deps.cmd ${{ matrix.arch }} libpng16.dll SDL2.dll
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mupen64plus-video-rice-msvc-${{ matrix.platform }}-g${{ env.G_REV }}
|
||||
name: ${{ env.PKG_NAME }}
|
||||
path: pkg/*
|
||||
|
||||
Nightly-build:
|
||||
|
@ -209,60 +136,19 @@ jobs:
|
|||
if: github.ref_name == 'master'
|
||||
needs: [Linux, MSYS2, MSVC]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: binaries
|
||||
- name: Get some tools
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install hashdeep
|
||||
- name: Creating new artifacts and update nightly-build
|
||||
run: |
|
||||
mkdir pkg
|
||||
cd binaries
|
||||
for BIN in *; do
|
||||
cd "${BIN}"
|
||||
if [[ "${BIN:23:4}" == "msys" ]]; then
|
||||
echo ":: Creating ${BIN}.zip"
|
||||
zip -r "../../pkg/${BIN}.zip" *
|
||||
elif [[ "${BIN:23: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 *; do
|
||||
ls -gG ${BIN}
|
||||
tigerdeep -lz ${BIN} >> ../${BIN:0:22}.tiger.txt
|
||||
sha256sum ${BIN} >> ../${BIN:0:22}.sha256.txt
|
||||
sha512sum ${BIN} >> ../${BIN:0:22}.sha512.txt
|
||||
b2sum ${BIN} >> ../${BIN:0:22}.blake2.txt
|
||||
done
|
||||
mv ../*.tiger.txt .
|
||||
mv ../*.sha*.txt .
|
||||
mv ../*.blake2.txt .
|
||||
echo ""
|
||||
echo "TIGER:"
|
||||
cat *.tiger.txt
|
||||
echo ""
|
||||
echo "SHA256:"
|
||||
cat *.sha256.txt
|
||||
echo ""
|
||||
echo "SHA512:"
|
||||
cat *.sha512.txt
|
||||
echo ""
|
||||
echo "BLAKE2:"
|
||||
cat *.blake2.txt
|
||||
echo ""
|
||||
git tag -f nightly-build
|
||||
git push -f origin nightly-build
|
||||
./../mupen64plus-core/.github/workflows/scripts/ci_nightly_artifacts.sh
|
||||
- name: Nightly-build
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
|
|
156
.github/workflows/schedule.yml
vendored
Normal file
156
.github/workflows/schedule.yml
vendored
Normal file
|
@ -0,0 +1,156 @@
|
|||
name: Rice - Scheduled
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '20 14 21 * *'
|
||||
|
||||
jobs:
|
||||
|
||||
Linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- cc: GCC
|
||||
arch: x64
|
||||
- cc: GCC
|
||||
arch: x86
|
||||
- cc: Clang
|
||||
arch: x64
|
||||
- cc: Clang
|
||||
arch: x86
|
||||
name: Linux / ${{ matrix.cc }} / ${{ matrix.arch }}
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.repository == 'mupen64plus/mupen64plus-video-rice'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Get build dependencies and arrange the environment
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
export C_CLANG_SUFFIX="-15" C_GCC_SUFFIX="-12"
|
||||
export BUILD_DEPS="libgl1-mesa-dev libpng-dev libsdl1.2-dev libsdl2-dev zlib1g-dev"
|
||||
./../mupen64plus-core/.github/workflows/scripts/ci_install_ubuntu_deps.sh ${{ matrix.arch }} ${{ matrix.cc }}
|
||||
- name: Build and related stuff, backup binaries
|
||||
run: |
|
||||
export C_CLANG_SUFFIX="-15" C_GCC_SUFFIX="-12"
|
||||
export PATH="$(pwd)/../mupen64plus-core/.github/workflows/scripts:${PATH}"
|
||||
export CONFIG_OVERRIDE="SDL_CONFIG="sdl-config""
|
||||
ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }}
|
||||
export CONFIG_OVERRIDE="SDL_CONFIG="sdl2-config""
|
||||
ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }} makepkg
|
||||
- name: Upload artifact
|
||||
if: matrix.cc == 'GCC'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.PKG_NAME }}
|
||||
path: pkg/*.tar.gz
|
||||
|
||||
MSYS2:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- cc: GCC
|
||||
arch: x64
|
||||
cross: x86_64
|
||||
env: MINGW64
|
||||
- cc: GCC
|
||||
arch: x86
|
||||
cross: i686
|
||||
env: MINGW32
|
||||
name: Windows / MSYS2 ${{ matrix.cc }} / ${{ matrix.arch }}
|
||||
runs-on: windows-2022
|
||||
if: github.repository == 'mupen64plus/mupen64plus-video-rice'
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.env }}
|
||||
update: true
|
||||
install: >-
|
||||
git
|
||||
libtool
|
||||
make
|
||||
mingw-w64-${{ matrix.cross }}-gcc
|
||||
mingw-w64-${{ matrix.cross }}-toolchain
|
||||
mingw-w64-${{ matrix.cross }}-libpng
|
||||
mingw-w64-${{ matrix.cross }}-ntldd
|
||||
mingw-w64-${{ matrix.cross }}-SDL2
|
||||
mingw-w64-${{ matrix.cross }}-zlib
|
||||
- name: Build and related stuff, backup binaries
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
./../mupen64plus-core/.github/workflows/scripts/ci_build.sh ${{ matrix.arch }} ${{ matrix.cc }}
|
||||
- name: Backup dependencies, etc...
|
||||
run: |
|
||||
./../mupen64plus-core/.github/workflows/scripts/ci_backup_mingw_deps.sh ${{ matrix.env }}
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.PKG_NAME }}
|
||||
path: pkg/*
|
||||
|
||||
MSVC:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- toolset: v143
|
||||
arch: x64
|
||||
vs: 2022
|
||||
- toolset: v141_xp
|
||||
arch: x86
|
||||
vs: 2019
|
||||
name: Windows / MSVC with ${{ matrix.toolset }} / ${{ matrix.arch }}
|
||||
runs-on: windows-${{ matrix.vs }}
|
||||
if: github.repository == 'mupen64plus/mupen64plus-video-rice'
|
||||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: microsoft/setup-msbuild@v2
|
||||
- name: Build and related stuff, backup binaries
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ..\mupen64plus-core
|
||||
set TOOLSET=${{ matrix.toolset }}
|
||||
.\..\mupen64plus-core\.github\workflows\scripts\ci_msvc_build.cmd ${{ matrix.arch }}
|
||||
- name: Backup dependencies, etc...
|
||||
run: |
|
||||
.\..\mupen64plus-core\.github\workflows\scripts\ci_backup_msvc_deps.cmd ${{ matrix.arch }} libpng16.dll SDL2.dll
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.PKG_NAME }}
|
||||
path: pkg/*
|
||||
|
||||
Nightly-build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref_name == 'master'
|
||||
needs: [Linux, MSYS2, MSVC]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: binaries
|
||||
- name: Get some tools
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install hashdeep
|
||||
- name: Creating new artifacts and update nightly-build
|
||||
run: |
|
||||
./../mupen64plus-core/.github/workflows/scripts/ci_nightly_artifacts.sh
|
||||
- name: Nightly-build
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
prerelease: true
|
||||
allowUpdates: true
|
||||
removeArtifacts: true
|
||||
replacesArtifacts: false
|
||||
tag: nightly-build
|
||||
artifacts: pkg/*
|
Loading…
Add table
Reference in a new issue