mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 14:25:37 +00:00
509 lines
18 KiB
YAML
509 lines
18 KiB
YAML
name: Create rolling release
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
- 'appveyor.yml'
|
|
- 'scripts/*'
|
|
- '.github/ISSUE_TEMPLATE/*'
|
|
push:
|
|
branches:
|
|
- master
|
|
- dev
|
|
- play-store
|
|
paths-ignore:
|
|
- '**.md'
|
|
- 'appveyor.yml'
|
|
- 'scripts/*'
|
|
- '.github/ISSUE_TEMPLATE/*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
windows-build:
|
|
runs-on: windows-2019
|
|
if: github.ref != 'refs/heads/play-store'
|
|
steps:
|
|
- uses: actions/checkout@v2.3.1
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: true
|
|
|
|
- name: Tag as preview build
|
|
if: github.ref == 'refs/heads/master'
|
|
shell: cmd
|
|
run: |
|
|
echo #pragma once > src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_TAG "preview" >> src/scmversion/tag.h
|
|
|
|
|
|
- name: Tag as dev build
|
|
if: github.ref == 'refs/heads/dev'
|
|
shell: cmd
|
|
run: |
|
|
echo #pragma once > src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
|
|
|
|
- name: Compile x64 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: Create x64 symbols archive
|
|
shell: cmd
|
|
run: |
|
|
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-x64-release-symbols.zip ./bin/x64/*.pdb
|
|
|
|
- name: Upload x64 release symbols artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "windows"
|
|
path: "duckstation-windows-x64-release-symbols.zip"
|
|
|
|
- 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*
|
|
rename bin\x64\updater-x64-ReleaseLTCG.exe updater.exe
|
|
|
|
- name: Create x64 release archive
|
|
shell: cmd
|
|
run: |
|
|
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-x64-release.zip ./bin/x64/*
|
|
|
|
- name: Upload x64 release artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "windows"
|
|
path: "duckstation-windows-x64-release.zip"
|
|
|
|
- name: Compile libretro core
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
|
shell: cmd
|
|
run: |
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
|
bash src\duckstation-libretro\unseal.sh ${{ secrets.LIBRETRO_KEY }}
|
|
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
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
|
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
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "windows"
|
|
path: "build/duckstation_libretro.dll.zip"
|
|
|
|
|
|
windows-arm64-build:
|
|
runs-on: windows-2019
|
|
if: github.ref != 'refs/heads/play-store'
|
|
steps:
|
|
- uses: actions/checkout@v2.3.1
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: true
|
|
|
|
- name: Tag as preview build
|
|
if: github.ref == 'refs/heads/master'
|
|
shell: cmd
|
|
run: |
|
|
echo #pragma once > src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_TAG "preview" >> src/scmversion/tag.h
|
|
|
|
|
|
- name: Tag as dev build
|
|
if: github.ref == 'refs/heads/dev'
|
|
shell: cmd
|
|
run: |
|
|
echo #pragma once > src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
|
|
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
|
|
|
|
|
|
- name: Compile arm64 release build
|
|
shell: cmd
|
|
run: |
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64
|
|
msbuild duckstation.sln -t:Build -p:Platform=ARM64;Configuration=ReleaseLTCG
|
|
|
|
- name: Create arm64 symbols archive
|
|
shell: cmd
|
|
run: |
|
|
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-arm64-release-symbols.zip ./bin/ARM64/*.pdb
|
|
|
|
- name: Upload arm64 release symbols artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "windows-arm64"
|
|
path: "duckstation-windows-arm64-release-symbols.zip"
|
|
|
|
- name: Remove extra bloat before archiving
|
|
shell: cmd
|
|
run: |
|
|
del /Q bin\ARM64\*.pdb
|
|
del /Q bin\ARM64\*.exp
|
|
del /Q bin\ARM64\*.lib
|
|
del /Q bin\ARM64\*.iobj
|
|
del /Q bin\ARM64\*.ipdb
|
|
del /Q bin\ARM64\common-tests*
|
|
rename bin\ARM64\updater-ARM64-ReleaseLTCG.exe updater.exe
|
|
|
|
- name: Create arm64 release archive
|
|
shell: cmd
|
|
run: |
|
|
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-windows-arm64-release.zip ./bin/ARM64/*
|
|
|
|
- name: Upload arm64 release artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "windows-arm64"
|
|
path: "duckstation-windows-arm64-release.zip"
|
|
|
|
|
|
linux-build:
|
|
runs-on: ubuntu-20.04
|
|
if: github.ref != 'refs/heads/play-store'
|
|
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 libgtk-3-dev qtbase5-dev qtbase5-dev-tools qtbase5-private-dev qt5-default qttools5-dev libegl1-mesa-dev libevdev-dev libgbm-dev libdrm-dev libwayland-dev libwayland-egl-backend-dev extra-cmake-modules libcurl4-gnutls-dev libxrandr-dev
|
|
|
|
- name: Compile build
|
|
shell: bash
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=ON -DBUILD_QT_FRONTEND=ON -DUSE_DRMKMS=ON -DUSE_EGL=ON -DUSE_SDL2=ON -DUSE_WAYLAND=ON -DUSE_X11=ON -G Ninja ..
|
|
ninja
|
|
../scripts/generate_appimages.sh $(pwd)
|
|
|
|
- name: Upload NoGUI AppImage
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "linux-x64-appimage-nogui"
|
|
path: "build/duckstation-nogui-x64.AppImage"
|
|
|
|
- name: Upload NoGUI AppImage zsync
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "linux-x64-appimage-nogui-zsync"
|
|
path: "build/duckstation-nogui-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
|
|
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.ref != 'refs/heads/play-store'
|
|
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 gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
|
- name: Compile and zip Linux x64 libretro core
|
|
shell: bash
|
|
run: |
|
|
./src/duckstation-libretro/unseal.sh ${{ secrets.LIBRETRO_KEY }}
|
|
mkdir build-libretro-linux-x64
|
|
cd build-libretro-linux-x64
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON ..
|
|
cmake --build . --parallel 2
|
|
zip -j duckstation_libretro_x64.so.zip duckstation_libretro.so
|
|
- name: Upload Linux x64 libretro core
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "linux-libretro"
|
|
path: "build-libretro-linux-x64/duckstation_libretro_x64.so.zip"
|
|
|
|
- name: Compile and zip Linux armv7 libretro core
|
|
shell: bash
|
|
run: |
|
|
mkdir build-libretro-linux-armv7
|
|
cd build-libretro-linux-armv7
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DCMAKE_TOOLCHAIN_FILE=../CMakeModules/armv7-cross-toolchain.cmake ..
|
|
cmake --build . --parallel 2
|
|
zip -j duckstation_libretro_linux_armv7.so.zip duckstation_libretro.so
|
|
- name: Upload Linux AArch64 libretro core
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "linux-libretro"
|
|
path: "build-libretro-linux-armv7/duckstation_libretro_linux_armv7.so.zip"
|
|
|
|
- name: Compile and zip Linux AArch64 libretro core
|
|
shell: bash
|
|
run: |
|
|
mkdir build-libretro-linux-aarch64
|
|
cd build-libretro-linux-aarch64
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DCMAKE_TOOLCHAIN_FILE=../CMakeModules/aarch64-cross-toolchain.cmake ..
|
|
cmake --build . --parallel 2
|
|
zip -j duckstation_libretro_linux_aarch64.so.zip duckstation_libretro.so
|
|
- name: Upload Linux AArch64 libretro core
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "linux-libretro"
|
|
path: "build-libretro-linux-aarch64/duckstation_libretro_linux_aarch64.so.zip"
|
|
|
|
- name: Compile and zip Android armv7 libretro core
|
|
shell: bash
|
|
run: |
|
|
mkdir build-libretro-android-armv7
|
|
cd build-libretro-android-armv7
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DANDROID_ABI=armeabi-v7a -DANDROID_ARM_NEON=ON -DCMAKE_TOOLCHAIN_FILE=${ANDROID_SDK_ROOT}/ndk-bundle/build/cmake/android.toolchain.cmake ..
|
|
cmake --build . --parallel 2
|
|
zip -j duckstation_libretro_android_armv7.so.zip duckstation_libretro_android.so
|
|
|
|
- name: Upload Android armv7 libretro core
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "linux-libretro"
|
|
path: "build-libretro-android-armv7/duckstation_libretro_android_armv7.so.zip"
|
|
|
|
- name: Compile and zip Android AArch64 libretro core
|
|
shell: bash
|
|
run: |
|
|
mkdir build-libretro-android-aarch64
|
|
cd build-libretro-android-aarch64
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_LIBRETRO_CORE=ON -DANDROID_ABI=arm64-v8a -DCMAKE_TOOLCHAIN_FILE=${ANDROID_SDK_ROOT}/ndk-bundle/build/cmake/android.toolchain.cmake ..
|
|
cmake --build . --parallel 2
|
|
zip -j duckstation_libretro_android_aarch64.so.zip duckstation_libretro_android.so
|
|
|
|
- name: Upload Android AArch64 libretro core
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "linux-libretro"
|
|
path: "build-libretro-android-aarch64/duckstation_libretro_android_aarch64.so.zip"
|
|
|
|
|
|
android-build:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2.3.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Compile with Gradle
|
|
shell: bash
|
|
run: |
|
|
cd android
|
|
./gradlew assembleRelease
|
|
|
|
- name: Sign APK
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store'
|
|
uses: r0adkll/sign-android-release@v1
|
|
with:
|
|
releaseDirectory: android/app/build/outputs/apk/release
|
|
signingKeyBase64: ${{ secrets.APK_SIGNING_KEY }}
|
|
alias: ${{ secrets.APK_KEY_ALIAS }}
|
|
keyStorePassword: ${{ secrets.APK_KEY_STORE_PASSWORD }}
|
|
keyPassword: ${{ secrets.APK_KEY_PASSWORD }}
|
|
|
|
- name: Rename APK
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store'
|
|
shell: bash
|
|
run: |
|
|
cd android
|
|
mv app/build/outputs/apk/release/app-release-unsigned-signed.apk ../duckstation-android.apk
|
|
|
|
- name: Upload APK
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store'
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "android"
|
|
path: "duckstation-android.apk"
|
|
|
|
|
|
macos-build:
|
|
runs-on: macos-10.15
|
|
if: github.ref != 'refs/heads/play-store'
|
|
steps:
|
|
- uses: actions/checkout@v2.3.1
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install packages
|
|
shell: bash
|
|
run: |
|
|
brew install qt5 sdl2 curl
|
|
|
|
- name: Clone mac externals
|
|
shell: bash
|
|
run: |
|
|
git clone https://github.com/stenzek/duckstation-ext-mac.git dep/mac
|
|
|
|
- name: Compile and zip .app
|
|
shell: bash
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
export MACOSX_DEPLOYMENT_TARGET=10.14
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_SDL2=ON -DQt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5 ..
|
|
cmake --build . --parallel 2
|
|
cd bin
|
|
zip -r duckstation-mac-release.zip DuckStation.app/
|
|
|
|
- name: Upload macOS .app
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: "macos-x64"
|
|
path: "build/bin/duckstation-mac-release.zip"
|
|
|
|
|
|
create-release:
|
|
needs: [windows-build, windows-arm64-build, linux-build, linux-libretro-build, android-build]
|
|
runs-on: "ubuntu-20.04"
|
|
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.ref != 'refs/heads/play-store'
|
|
steps:
|
|
- name: Download Windows Artifacts
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: "windows"
|
|
|
|
- name: Download Windows ARM64 Artifact
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: "windows-arm64"
|
|
|
|
- name: Download NoGUI AppImage Artifact
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: "linux-x64-appimage-nogui"
|
|
|
|
- name: Download NoGUI AppImage zsync Artifact
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: "linux-x64-appimage-nogui-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-libretro"
|
|
|
|
- name: Download Android APK
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: "android"
|
|
|
|
- name: Create preview release
|
|
if: github.ref == 'refs/heads/master'
|
|
uses: "marvinpinto/action-automatic-releases@latest"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: "preview"
|
|
prerelease: true
|
|
title: "Latest Preview Build"
|
|
files: |
|
|
windows/duckstation-windows-x64-release.zip
|
|
windows/duckstation-windows-x64-release-symbols.zip
|
|
windows/duckstation_libretro.dll.zip
|
|
windows-arm64/duckstation-windows-arm64-release.zip
|
|
windows-arm64/duckstation-windows-arm64-release-symbols.zip
|
|
linux-x64-appimage-nogui/duckstation-nogui-x64.AppImage
|
|
linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync
|
|
linux-x64-appimage-qt/duckstation-qt-x64.AppImage
|
|
linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
|
|
linux-libretro/duckstation_libretro_x64.so.zip
|
|
linux-libretro/duckstation_libretro_linux_armv7.so.zip
|
|
linux-libretro/duckstation_libretro_linux_aarch64.so.zip
|
|
linux-libretro/duckstation_libretro_android_armv7.so.zip
|
|
linux-libretro/duckstation_libretro_android_aarch64.so.zip
|
|
android/duckstation-android.apk
|
|
|
|
- name: Create dev release
|
|
if: github.ref == 'refs/heads/dev'
|
|
uses: "marvinpinto/action-automatic-releases@latest"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: "latest"
|
|
prerelease: false
|
|
title: "Latest Development Build"
|
|
files: |
|
|
windows/duckstation-windows-x64-release.zip
|
|
windows/duckstation-windows-x64-release-symbols.zip
|
|
windows/duckstation_libretro.dll.zip
|
|
windows-arm64/duckstation-windows-arm64-release.zip
|
|
windows-arm64/duckstation-windows-arm64-release-symbols.zip
|
|
linux-x64-appimage-nogui/duckstation-nogui-x64.AppImage
|
|
linux-x64-appimage-nogui-zsync/duckstation-nogui-x64.AppImage.zsync
|
|
linux-x64-appimage-qt/duckstation-qt-x64.AppImage
|
|
linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
|
|
linux-libretro/duckstation_libretro_x64.so.zip
|
|
linux-libretro/duckstation_libretro_linux_armv7.so.zip
|
|
linux-libretro/duckstation_libretro_linux_aarch64.so.zip
|
|
linux-libretro/duckstation_libretro_android_armv7.so.zip
|
|
linux-libretro/duckstation_libretro_android_aarch64.so.zip
|
|
android/duckstation-android.apk
|
|
|
|
|
|
create-play-store-release:
|
|
needs: [android-build]
|
|
runs-on: "ubuntu-20.04"
|
|
if: github.ref == 'refs/heads/play-store'
|
|
steps:
|
|
- name: Download Android APK
|
|
uses: actions/download-artifact@v1
|
|
with:
|
|
name: "android"
|
|
|
|
- name: Create Play Store release
|
|
uses: "marvinpinto/action-automatic-releases@latest"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
automatic_release_tag: "play-store-release"
|
|
prerelease: true
|
|
title: "Latest Play Store Build"
|
|
files: |
|
|
android/duckstation-android.apk
|