forked from Themaister/parallel-rdp-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI/CD: Update m64p implementation...
- Loading branch information
1 parent
6c66075
commit 900f1e5
Showing
4 changed files
with
229 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
name: ParaLLEl RDP | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**/*.md' | ||
- '.{gitattributes,gitignore,travis.yml}' | ||
- 'appveyor.yml,README' | ||
pull_request: | ||
paths-ignore: | ||
- '**/*.md' | ||
- '.{gitattributes,gitignore,travis.yml}' | ||
- 'appveyor.yml,README' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
Linux: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- cc: GCC | ||
platform: x64 | ||
- cc: GCC | ||
platform: x86 | ||
- cc: Clang | ||
platform: x64 | ||
- cc: Clang | ||
platform: x86 | ||
name: Linux / ${{ matrix.cc }} / ${{ matrix.platform }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get build dependencies and arrange the environment | ||
run: | | ||
echo "G_REV=$(git rev-parse --short HEAD)" >> "${GITHUB_ENV}" | ||
if [[ "${{ matrix.platform }}" == "x86" ]]; then sudo dpkg --add-architecture i386; fi | ||
sudo apt-get update | ||
sudo apt-get -y install cmake libgl1-mesa-dev libopengl-dev | ||
if [[ "${{ matrix.platform }}" == "x86" ]]; then sudo apt-get --reinstall -y install gcc-multilib g++-multilib libc6 libc6-dev-i386 libatomic1:i386 libgcc-s1:i386 libgl1-mesa-dev:i386 libopengl-dev:i386 libstdc++6:i386; fi | ||
sudo ldconfig | ||
- name: Build and related stuff, backup binaries | ||
run: | | ||
if [[ "${{ matrix.platform }}" == "x86" ]]; then CPU_TUNE="-m32 -msse2 -mtune=pentium4"; else CPU_TUNE="-mtune=core2"; fi | ||
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 | ||
echo "" | ||
mkdir -p build pkg/usr/local/lib/mupen64plus | ||
cd build | ||
cmake -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_C_FLAGS="${CPU_TUNE}" -DCMAKE_CXX_FLAGS="${CPU_TUNE}" -DCMAKE_BUILD_TYPE="Release" .. | ||
cmake --build . -j2 | ||
echo "" | ||
chmod 644 *.so | ||
cp *.so ../pkg/usr/local/lib/mupen64plus/ | ||
ls -gG ../pkg/usr/local/lib/mupen64plus/*.so | ||
echo "" | ||
ldd ../pkg/usr/local/lib/mupen64plus/mupen64plus-video-parallel.so | ||
tar cvzf ../pkg/mupen64plus-video-parallel-linux-${{ matrix.platform }}-g${{ env.G_REV }}.tar.gz -C ../pkg/ "usr" | ||
- name: Upload artifact | ||
if: matrix.cc == 'GCC' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mupen64plus-video-parallel-linux-${{ matrix.platform }}-g${{ env.G_REV }} | ||
path: pkg/*.tar.gz | ||
|
||
Windows: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- cc: GCC | ||
platform: x64 | ||
cross: x86_64 | ||
bits: 64 | ||
- cc: GCC | ||
platform: x86 | ||
cross: i686 | ||
bits: 32 | ||
name: Windows / MSYS2 ${{ matrix.cc }} / ${{ matrix.platform }} | ||
runs-on: windows-2022 | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MINGW${{ matrix.bits }} | ||
update: true | ||
install: >- | ||
git | ||
libtool | ||
mingw-w64-${{ matrix.cross }}-cmake | ||
mingw-w64-${{ matrix.cross }}-gcc | ||
mingw-w64-${{ matrix.cross }}-ninja | ||
mingw-w64-${{ matrix.cross }}-toolchain | ||
- 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="-m32 -msse2 -mtune=pentium4"; else CPU_TUNE="-mtune=core2"; fi | ||
CC="gcc" | ||
CXX="g++" | ||
${CC} --version | ||
echo "" | ||
git clone --depth 1 https://github.com/mupen64plus/mupen64plus-core.git ../mupen64plus-core | ||
echo "" | ||
mkdir build pkg | ||
cd build | ||
cmake -DCMAKE_C_COMPILER="${CC}" -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_C_FLAGS="${CPU_TUNE}" -DCMAKE_CXX_FLAGS="${CPU_TUNE}" -G "Ninja" -DCMAKE_BUILD_TYPE="Release" .. | ||
cmake --build . -j2 | ||
echo "" | ||
chmod 644 *.dll | ||
cp *.dll ../pkg/ | ||
ls -gG ../pkg/*.dll | ||
echo "" | ||
ldd ../pkg/mupen64plus-video-parallel.dll | ||
- 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} libstdc++-6 libwinpthread-1; do | ||
echo ":: Copying ${LIB}.dll" | ||
cp "/mingw${{ matrix.bits }}/bin/${LIB}.dll" pkg/ | ||
done | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mupen64plus-video-parallel-msys2-${{ matrix.platform }}-g${{ env.G_REV }} | ||
path: pkg/* | ||
|
||
Nightly-build: | ||
runs-on: ubuntu-latest | ||
if: github.ref_name == 'ci-m64p' | ||
needs: [Linux, Windows] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: binaries | ||
- name: Get some tools | ||
run: | | ||
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:27:4}" == "msys" ]]; 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:26}.tiger.txt | ||
sha256sum ${BIN} >> ../${BIN:0:26}.sha256.txt | ||
sha512sum ${BIN} >> ../${BIN:0:26}.sha512.txt | ||
b2sum ${BIN} >> ../${BIN:0:26}.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 | ||
- name: Nightly-build | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
prerelease: true | ||
allowUpdates: true | ||
removeArtifacts: true | ||
replacesArtifacts: false | ||
tag: nightly-build | ||
artifacts: pkg/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters