Linux: fix potentially unsafe screensaver inhibitor #3426
Workflow file for this run
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
name: Create rolling release | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- 'appveyor.yml' | |
- 'scripts/*' | |
- '.github/ISSUE_TEMPLATE/*' | |
push: | |
branches: | |
- master | |
- dev | |
paths-ignore: | |
- '**.md' | |
- 'appveyor.yml' | |
- 'scripts/*' | |
- '.github/ISSUE_TEMPLATE/*' | |
workflow_dispatch: | |
jobs: | |
windows-build: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/[email protected] | |
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: Update RC version fields | |
shell: cmd | |
run: | | |
cd src\scmversion | |
call update_rc_version.bat | |
cd ..\.. | |
git update-index --assume-unchanged src/duckstation-qt/duckstation-qt.rc | |
git update-index --assume-unchanged src/duckstation-nogui/duckstation-nogui.rc | |
- name: Compile x64 release build | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\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 bin\x64\*.exp bin\x64\*.lib bin\x64\*.iobj bin\x64\*.ipdb 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" | |
windows-arm64-build: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/[email protected] | |
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-arm64-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-arm64-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: Update RC version fields | |
shell: cmd | |
run: | | |
cd src\scmversion | |
call update_rc_version.bat | |
cd ..\.. | |
git update-index --assume-unchanged src/duckstation-qt/duckstation-qt.rc | |
git update-index --assume-unchanged src/duckstation-nogui/duckstation-nogui.rc | |
- name: Compile arm64 release build | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\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 bin\ARM64\*.exp bin\ARM64\*.lib bin\ARM64\*.iobj bin\ARM64\*.ipdb 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 | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Install packages | |
shell: bash | |
run: | | |
# Workaround for https://github.com/actions/runner-images/issues/675 | |
sudo scripts/retry.sh apt-get update | |
sudo scripts/retry.sh apt-get -y install cmake ninja-build ccache libsdl2-dev libgtk-3-dev libegl1-mesa-dev libevdev-dev libgbm-dev libdrm-dev libwayland-dev libwayland-egl-backend-dev extra-cmake-modules libcurl4-gnutls-dev libxrandr-dev llvm-12 lld-12 clang-12 | |
- name: Cache Dependencies | |
id: cache-deps | |
uses: actions/cache@v3 | |
with: | |
path: ~/deps | |
key: deps ${{ hashFiles('scripts/build-dependencies.sh') }} | |
- name: Build Dependencies | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: scripts/build-dependencies.sh | |
- name: Compile build | |
shell: bash | |
run: | | |
mkdir build | |
cd build | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_NOGUI_FRONTEND=OFF -DBUILD_QT_FRONTEND=ON -DUSE_DRMKMS=OFF -DUSE_EGL=ON -DUSE_SDL2=ON -DUSE_WAYLAND=ON -DUSE_X11=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_PREFIX_PATH=$HOME/deps -DCMAKE_TOOLCHAIN_FILE=../scripts/clang-toolchain.cmake .. | |
cmake --build . --parallel | |
cd .. | |
scripts/make-appimage.sh $(realpath ./build) $(realpath .) $HOME/deps DuckStation-x64 | |
- name: Upload Qt AppImage | |
uses: actions/upload-artifact@v1 | |
with: | |
name: "linux-x64-appimage-qt" | |
path: "DuckStation-x64.AppImage" | |
macos-build: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Install packages | |
shell: bash | |
run: | | |
brew install curl ninja | |
- name: Cache Dependencies | |
id: cache-deps-mac | |
uses: actions/cache@v3 | |
with: | |
path: ~/deps | |
key: deps-mac ${{ hashFiles('scripts/build-dependencies-mac.sh') }} | |
- name: Build Dependencies | |
if: steps.cache-deps-mac.outputs.cache-hit != 'true' | |
run: scripts/build-dependencies-mac.sh | |
- name: Compile and zip .app | |
shell: bash | |
run: | | |
mkdir build | |
cd build | |
../scripts/make-universal-macos-binary.sh .. | |
zip -r duckstation-mac-release.zip DuckStation.app/ | |
- name: Upload macOS .app | |
uses: actions/upload-artifact@v1 | |
with: | |
name: "macos" | |
path: "build/duckstation-mac-release.zip" | |
create-release: | |
needs: [windows-build, windows-arm64-build, linux-build, macos-build] | |
runs-on: "ubuntu-20.04" | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' | |
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 Qt AppImage Artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: "linux-x64-appimage-qt" | |
- name: Download MacOS Artifact | |
uses: actions/download-artifact@v1 | |
with: | |
name: "macos" | |
- 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-arm64/duckstation-windows-arm64-release.zip | |
windows-arm64/duckstation-windows-arm64-release-symbols.zip | |
linux-x64-appimage-qt/DuckStation-x64.AppImage | |
macos/duckstation-mac-release.zip | |
- 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 Rolling Release" | |
files: | | |
windows/duckstation-windows-x64-release.zip | |
windows/duckstation-windows-x64-release-symbols.zip | |
windows-arm64/duckstation-windows-arm64-release.zip | |
windows-arm64/duckstation-windows-arm64-release-symbols.zip | |
linux-x64-appimage-qt/DuckStation-x64.AppImage | |
macos/duckstation-mac-release.zip | |