From e7d85eed00a85ecb64d25f52b529c149281df3a4 Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Sat, 28 Aug 2021 16:29:58 +0200 Subject: [PATCH] ci: move to github actions --- .github/workflows/build.yml | 225 ++++++++++++++++++++++++++++++++++++ .travis.yml | 42 ------- appveyor.yml | 76 ------------ 3 files changed, 225 insertions(+), 118 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..9250d0ac --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,225 @@ +name: GLideN64 + +on: [push, pull_request, workflow_dispatch] + +jobs: + Linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Packages + run: | + sudo apt-get -qq update + sudo apt-get -y upgrade + sudo apt-get -y install build-essential libgl1-mesa-dev qt5-default + - name: Build GLideN64 (x64 Mupen64Plus-CLI) + run: | + mkdir -p build/linux-mupen64plus-cli + pushd build/linux-mupen64plus-cli + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DMUPENPLUSAPI=1 -DMUPENPLUSAPI_GLIDENUI=0 ../../src/ + make -j$(nproc) + popd + cp build/linux-mupen64plus-cli/plugin/Release/*.so build/linux-mupen64plus-cli/ + cp ini/GLideN64.custom.ini build/linux-mupen64plus-cli/ + - name: Build GLideN64 (x64 Mupen64Plus-Qt) + run: | + mkdir -p build/linux-mupen64plus-qt + pushd build/linux-mupen64plus-qt + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DMUPENPLUSAPI=1 -DMUPENPLUSAPI_GLIDENUI=1 ../../src/ + make -j$(nproc) + popd + cp build/linux-mupen64plus-qt/plugin/Release/*.so build/linux-mupen64plus-qt/ + cp ini/GLideN64.custom.ini build/linux-mupen64plus-qt/ + cp translations/release/*.qm build/linux-mupen64plus-qt/ + - name: Upload GLideN64 (x64 Mupen64Plus-CLI) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Linux-Mupen64Plus-CLI-x64 + path: | + build/linux-mupen64plus-cli/*.so + build/linux-mupen64plus-cli/GLideN64.custom.ini + - name: Upload GLideN64 (x64 Mupen64Plus-Qt) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Linux-Mupen64Plus-Qt-x64 + path: | + build/linux-mupen64plus-qt/*.so + build/linux-mupen64plus-qt/GLideN64.custom.ini + build/linux-mupen64plus-qt/*.qm + Windows: + runs-on: windows-latest + env: + QTDIR_x86: D:\Static_Qt_x86 + QTDIR_x64: D:\Static_Qt_x64 + QT_BUILD_BASE_URL: https://github.com/gonetz/GLideN64/releases/download/qt_build/ + QT_BUILD_x86: qt-5_15-x86-msvc2017-static + QT_BUILD_x64: qt-5_15-x64-msvc2017-static + steps: + - uses: actions/checkout@v2 + - uses: microsoft/setup-msbuild@v1.0.3 + - uses: msys2/setup-msys2@v2 + with: + update: true + install: >- + make + mingw-w64-x86_64-cmake + mingw-w64-x86_64-gcc + mingw-w64-x86_64-freetype + mingw-w64-x86_64-libpng + mingw-w64-x86_64-qt5 + git + - name: Prepare Environment + run: | + echo "PJ64PluginsDirQT=$pwd\build\windows-project64-qt\" >> $env:GITHUB_ENV + echo "PJ64PluginsDirQT_x64=$pwd\build\windows-project64-qt-x64\" >> $env:GITHUB_ENV + echo "PJ64PluginsDirWTL=$pwd\build\windows-project64-wtl\" >> $env:GITHUB_ENV + echo "PJ64PluginsDirWTL_x64=$pwd\build\windows-project64-wtl-x64\" >> $env:GITHUB_ENV + echo "Mupen64PluginsDir=$pwd\build\windows-mupen64plus-cli\" >> $env:GITHUB_ENV + echo "Mupen64PluginsDir_x64=$pwd\build\windows-mupen64plus-cli-x64\" >> $env:GITHUB_ENV + shell: pwsh + - name: Prepare Qt Builds + run: | + curl -L -o %QT_BUILD_x86%.7z %QT_BUILD_BASE_URL%/%QT_BUILD_x86%.7z + curl -L -o %QT_BUILD_x64%.7z %QT_BUILD_BASE_URL%/%QT_BUILD_x64%.7z + 7z x -o%QTDIR_x86% %QT_BUILD_x86%.7z + 7z x -o%QTDIR_x64% %QT_BUILD_x64%.7z + shell: cmd + - name: Build GLideN64 (x64 Project64-Qt) + run: | + set QTDIR=%QTDIR_x64%\%QT_BUILD_x64% + msbuild projects/msvc/GLideNUI.vcxproj /m /p:Configuration=Release;Platform=x64 + msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_qt;Platform=x64 + copy ini\GLideN64.custom.ini %PJ64PluginsDirQT_x64% + copy translations\release\*.qm %PJ64PluginsDirQT_x64% + shell: cmd + - name: Build GLideN64 (x86 Project64-Qt) + run: | + set QTDIR=%QTDIR_x86%\%QT_BUILD_x86% + msbuild projects/msvc/GLideNUI.vcxproj /m /p:Configuration=Release;Platform=Win32 + msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_qt;Platform=Win32 + copy ini\GLideN64.custom.ini %PJ64PluginsDirQT% + copy translations\release\*.qm %PJ64PluginsDirQT% + shell: cmd + - name: Build GLideN64 (x64 Project64-WTL) + run: | + msbuild projects/msvc/GLideNUI-wtl.vcxproj /m /p:Configuration=Release;Platform=x64 + msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_wtl;Platform=x64 + copy ini\GLideN64.custom.ini %PJ64PluginsDirWTL_x64% + mkdir %PJ64PluginsDirWTL_x64%\translations + copy translations\wtl\*.Lang %PJ64PluginsDirWTL_x64%\translations + shell: cmd + - name: Build GLideN64 (x86 Project64-WTL) + run: | + msbuild projects/msvc/GLideNUI-wtl.vcxproj /m /p:Configuration=Release;Platform=Win32 + msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_wtl;Platform=Win32 + copy ini\GLideN64.custom.ini %PJ64PluginsDirWTL% + mkdir %PJ64PluginsDirWTL%\translations + copy translations\wtl\*.Lang %PJ64PluginsDirWTL%\translations + shell: cmd + - name: Build GLideN64 (x64 Mupen64Plus-CLI) + run: | + msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_mupenplus;Platform=x64 + copy ini\GLideN64.custom.ini %Mupen64PluginsDir_x64%\ + shell: cmd + - name: Build GLideN64 (x86 Mupen64Plus-CLI) + run: | + msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_mupenplus;Platform=Win32 + copy ini\GLideN64.custom.ini %Mupen64PluginsDir%\ + shell: cmd + - name: Build GLideN64 (x64 Mupen64Plus-Qt) + run: | + mkdir -p build/windows-mupen64plus-qt + pushd build/windows-mupen64plus-qt + cmake -DCMAKE_BUILD_TYPE=Release -DMUPENPLUSAPI=1 -DMUPENPLUSAPI_GLIDENUI=1 -G "MSYS Makefiles" ../../src + make -j$(nproc) + popd + cp ini/GLideN64.custom.ini build/windows-mupen64plus-qt/ + cp translations/release/*.qm build/windows-mupen64plus-qt/ + shell: msys2 {0} + - name: Upload GLideN64 (x64 Project64-Qt) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Windows-Project64-Qt-x64 + path: | + build\windows-project64-qt-x64\*.dll + build\windows-project64-qt-x64\GLideN64.custom.ini + build\windows-project64-qt-x64\*.qm + - name: Upload GLideN64 (x86 Project64-Qt) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Windows-Project64-Qt-x86 + path: | + build\windows-project64-qt\*.dll + build\windows-project64-qt\GLideN64.custom.ini + build\windows-project64-qt\*.qm + - name: Upload GLideN64 (x64 Project64-WTL) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Windows-Project64-WTL-x64 + path: | + build\windows-project64-wtl-x64\*.dll + build\windows-project64-wtl-x64\GLideN64.custom.ini + build\windows-project64-wtl-x64\translations\*.Lang + - name: Upload GLideN64 (x86 Project64-WTL) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Windows-Project64-WTL-x86 + path: | + build\windows-project64-wtl\*.dll + build\windows-project64-wtl\GLideN64.custom.ini + build\windows-project64-wtl\translations\*.Lang + - name: Upload GLideN64 (x64 Mupen64Plus-CLI) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Windows-Mupen64Plus-CLI-x64 + path: | + build\windows-mupen64plus-cli-x64\*.dll + build\windows-mupen64plus-cli-x64\GLideN64.custom.ini + - name: Upload GLideN64 (x86 Mupen64Plus-CLI) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Windows-Mupen64Plus-CLI-x86 + path: | + build\windows-mupen64plus-cli\*.dll + build\windows-mupen64plus-cli\GLideN64.custom.ini + - name: Upload GLideN64 (x64 Mupen64Plus-Qt) + uses: actions/upload-artifact@v2 + with: + name: GLideN64-Windows-Mupen64Plus-Qt-x64 + path: | + build\windows-mupen64plus-qt\*.dll + build\windows-mupen64plus-qt\GLideN64.custom.ini + build\windows-mupen64plus-qt\*.qm + Release: + runs-on: ubuntu-latest + needs: [Windows, Linux] + if: github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v2 + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + path: artifacts + # sadly we can't download the artifacts without extracting it + # so re-zip them + - name: Re-Package Artifacts + run: | + cd artifacts + for artifact in * + do + echo "-> Creating ${artifact}.zip" + pushd "$artifact" + zip -r "../${artifact}.zip" * + popd + done + - name: Update Git Tag + run: | + git tag -f github-actions + git push -f origin github-actions + - name: Create Release + uses: ncipollo/release-action@v1 + with: + prerelease: true + allowUpdates: true + tag: github-actions + artifacts: "artifacts/*.zip" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ee5ecb6b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -dist: xenial - -addons: - apt: - packages: - - libgl1-mesa-dev - - qt5-default - -language: cpp - -os: - - linux - - osx - -compiler: - - gcc - - clang - -env: - - TARGET_CPU=amd64 BUILD_CONFIGURATION=Debug GLIDENUI=On - - TARGET_CPU=amd64 BUILD_CONFIGURATION=Release GLIDENUI=On - # - TARGET_CPU=x86 BUILD_CONFIGURATION=Debug - # - TARGET_CPU=x86 BUILD_CONFIGURATION=Release - -jobs: - exclude: - - os: osx - compiler: gcc - - - os: osx - env: TARGET_CPU=x86 BUILD_CONFIGURATION=Debug - - - os: osx - env: TARGET_CPU=x86 BUILD_CONFIGURATION=Release - -script: - - src/getRevision.sh - - cd projects/cmake - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export GLIDENUI=Off; fi - - cmake -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION -DTARGET_CPU=$TARGET_CPU -DVEC4_OPT=On -DMUPENPLUSAPI=On -DMUPENPLUSAPI_GLIDENUI=$GLIDENUI ../../src/ - - cmake --build . - - cd ../../ diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 0441b6f3..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,76 +0,0 @@ -image: Visual Studio 2019 - -version: 1.0.{build} -pull_requests: - do_not_increment_build_number: true - -environment: - BUILD_PATH: $(APPVEYOR_BUILD_FOLDER)\build - QTDIR_x86: C:\Static_Qt_x86 - QTDIR_x64: C:\Static_Qt_x64 - QT_BUILD_BASE_URL: https://github.com/gonetz/GLideN64/releases/download/qt_build/ - QT_BUILD_x86: qt-5_15-x86-msvc2017-static - QT_BUILD_x64: qt-5_15-x64-msvc2017-static - # Builds - PJ64PluginsDirQT: $(BUILD_PATH)\QT_for_Project64\ - PJ64PluginsDirQT_x64: $(BUILD_PATH)\QT_for_Project64_x64\ - PJ64PluginsDirWTL: $(BUILD_PATH)\WTL_for_Project64\ - PJ64PluginsDirWTL_x64: $(BUILD_PATH)\WTL_for_Project64_x64\ - Mupen64PluginsDir: $(BUILD_PATH)\for_Mupen64Plus\ - Mupen64PluginsDir_x64: $(BUILD_PATH)\for_Mupen64Plus_x64\ - -before_build: - - curl -L -o %QT_BUILD_x86%.7z %QT_BUILD_BASE_URL%/%QT_BUILD_x86%.7z - - curl -L -o %QT_BUILD_x64%.7z %QT_BUILD_BASE_URL%/%QT_BUILD_x64%.7z - - 7z x -o%QTDIR_x86% %QT_BUILD_x86%.7z - - 7z x -o%QTDIR_x64% %QT_BUILD_x64%.7z - -build_script: - - cd %APPVEYOR_BUILD_FOLDER% - # Zilmar-spec (Qt) - - set QTDIR=%QTDIR_x64%\%QT_BUILD_x64% - - msbuild projects/msvc/GLideNUI.vcxproj /m /p:Configuration=Release;Platform=x64 - - msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_qt;Platform=x64 - - set QTDIR=%QTDIR_x86%\%QT_BUILD_x86% - - msbuild projects/msvc/GLideNUI.vcxproj /m /p:Configuration=Release;Platform=Win32 - - msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_qt;Platform=Win32 - # Zilmar-spec (WTL) - - msbuild projects/msvc/GLideNUI-wtl.vcxproj /m /p:Configuration=Release;Platform=x64 - - msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_wtl;Platform=x64 - - msbuild projects/msvc/GLideNUI-wtl.vcxproj /m /p:Configuration=Release;Platform=Win32 - - msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_wtl;Platform=Win32 - # Mupen64Plus (nogui) - - msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_mupenplus;Platform=x64 - - msbuild projects/msvc/GLideN64.sln /m /p:Configuration=Release_mupenplus;Platform=Win32 - -after_build: - # Zilmar-spec (Qt) - - copy ini\GLideN64.custom.ini %PJ64PluginsDirQT_x64% - - copy ini\GLideN64.custom.ini %PJ64PluginsDirQT% - - copy translations\release\*.qm %PJ64PluginsDirQT_x64% - - copy translations\release\*.qm %PJ64PluginsDirQT% - # Zilmar-spec (WTL) - - copy ini\GLideN64.custom.ini %PJ64PluginsDirWTL_x64% - - copy ini\GLideN64.custom.ini %PJ64PluginsDirWTL% - - mkdir %PJ64PluginsDirWTL_x64%\translations - - mkdir %PJ64PluginsDirWTL%\translations - - copy translations\wtl\*.Lang %PJ64PluginsDirWTL_x64%\translations - - copy translations\wtl\*.Lang %PJ64PluginsDirWTL%\translations - # Mupen64Plus (nogui) - - copy ini\GLideN64.custom.ini %Mupen64PluginsDir_x64%\ - - copy ini\GLideN64.custom.ini %Mupen64PluginsDir%\ - # Cleanup - - del /Q %PJ64PluginsDirQT_x64%\*.lib %PJ64PluginsDirQT_x64%\*.exp - - del /Q %PJ64PluginsDirQT%\*.lib %PJ64PluginsDirQT%\*.exp - - del /Q %PJ64PluginsDirWTL_x64%\*.lib %PJ64PluginsDirWTL_x64%\*.exp - - del /Q %PJ64PluginsDirWTL%\*.lib %PJ64PluginsDirWTL%\*.exp - - del /Q %Mupen64PluginsDir_x64%\*.lib %Mupen64PluginsDir_x64%\*.exp - - del /Q %Mupen64PluginsDir%\*.lib %Mupen64PluginsDir%\*.exp - - cd %BUILD_PATH% - - ps: $env:revision = git rev-parse --short HEAD - - set archive_name=GLideN64-%revision%-@fname.7z - - forfiles /p %BUILD_PATH% /c "cmd /c 7z a %archive_name% @path\*" - -artifacts: - - path: build\*.7z - name: GLideN64 plugin