name: Create rolling release on: pull_request: push: branches: - master jobs: windows-build: runs-on: windows-2019 steps: - uses: actions/checkout@v2.3.1 with: fetch-depth: 0 submodules: true - name: Compile release build shell: cmd run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 msbuild duckstation.sln -t:Build -p:Platform=x64;Configuration=ReleaseLTCG - name: Remove extra bloat before archiving shell: cmd run: | del /Q bin\x64\*.pdb del /Q bin\x64\*.exp del /Q bin\x64\*.lib del /Q bin\x64\*.iobj del /Q bin\x64\*.ipdb del /Q bin\x64\common-tests* del /Q bin\x64\duckstation-libretro-* - name: Create release archive shell: cmd run: | "C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-x64-release.7z ./bin/x64/* - name: Upload release artifact uses: actions/upload-artifact@v1 with: name: "windows-x64" path: "duckstation-windows-x64-release.7z" windows-libretro-build: runs-on: windows-2019 steps: - uses: actions/checkout@v2.3.1 with: fetch-depth: 0 - name: Compile release build shell: cmd run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 mkdir build cd build cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DCMAKE_C_COMPILER:FILEPATH="%VCToolsInstallDir%\bin\HostX64\x64\cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="%VCToolsInstallDir%\bin\HostX64\x64\cl.exe" .. ninja - name: Create libretro core archive shell: cmd run: | cd build "C:\Program Files\7-Zip\7z.exe" a -r duckstation_libretro.dll.zip ./duckstation_libretro.dll - name: Upload release artifact uses: actions/upload-artifact@v1 with: name: "windows-libretro-x64" path: "build/duckstation_libretro.dll.zip" linux-build: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2.3.1 with: fetch-depth: 0 - name: Install packages shell: bash run: | sudo apt-get update sudo apt-get -y install cmake ninja-build ccache libsdl2-dev libgtk2.0-dev qtbase5-dev qtbase5-dev-tools qtbase5-private-dev qt5-default - name: Compile build shell: bash run: | mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SDL_FRONTEND=ON -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -G Ninja .. ninja ../appimage/generate-appimages.sh $(pwd) - name: Upload SDL AppImage uses: actions/upload-artifact@v1 with: name: "linux-x64-appimage-sdl" path: "build/duckstation-sdl-x64.AppImage" - name: Upload SDL AppImage zsync uses: actions/upload-artifact@v1 with: name: "linux-x64-appimage-sdl-zsync" path: "build/duckstation-sdl-x64.AppImage.zsync" - name: Upload Qt AppImage uses: actions/upload-artifact@v1 with: name: "linux-x64-appimage-qt" path: "build/duckstation-qt-x64.AppImage" - name: Upload Qt AppImage zsync uses: actions/upload-artifact@v1 with: name: "linux-x64-appimage-qt-zsync" path: "build/duckstation-qt-x64.AppImage.zsync" linux-libretro-build: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2.3.1 with: fetch-depth: 0 - name: Install packages shell: bash run: | sudo apt-get update sudo apt-get -y install cmake ninja-build ccache - name: Compile libretro core shell: bash run: | mkdir build-libretro cd build-libretro cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -G Ninja .. ninja - name: Zip libretro core shell: bash run: | cd build-libretro zip -j duckstation_libretro.so.zip duckstation_libretro.so - name: Upload Linux libretro core uses: actions/upload-artifact@v1 with: name: "linux-x64-libretro" path: "build-libretro/duckstation_libretro.so.zip" create-release: needs: [windows-build, windows-libretro-build, linux-build, linux-libretro-build] runs-on: "ubuntu-latest" if: github.ref == 'refs/heads/master' steps: - name: Download Windows x64 Artifact uses: actions/download-artifact@v1 with: name: "windows-x64" - name: Download Windows libretro x64 Artifact uses: actions/download-artifact@v1 with: name: "windows-libretro-x64" - name: Download SDL AppImage Artifact uses: actions/download-artifact@v1 with: name: "linux-x64-appimage-sdl" - name: Download SDL AppImage zsync Artifact uses: actions/download-artifact@v1 with: name: "linux-x64-appimage-sdl-zsync" - name: Download Qt AppImage Artifact uses: actions/download-artifact@v1 with: name: "linux-x64-appimage-qt" - name: Download Qt AppImage zsync Artifact uses: actions/download-artifact@v1 with: name: "linux-x64-appimage-qt-zsync" - name: Download Linux libretro core uses: actions/download-artifact@v1 with: name: "linux-x64-libretro" - name: Create release uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "latest" title: "Latest Development Build" files: | windows-x64/duckstation-windows-x64-release.7z windows-libretro-x64/duckstation_libretro.dll.zip linux-x64-appimage-sdl/duckstation-sdl-x64.AppImage linux-x64-appimage-sdl-zsync/duckstation-sdl-x64.AppImage.zsync linux-x64-appimage-qt/duckstation-qt-x64.AppImage linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync linux-x64-libretro/duckstation_libretro.so.zip