forked from MelonX2030/suyu
-
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.
- Loading branch information
1 parent
31de58f
commit 5401a70
Showing
1 changed file
with
86 additions
and
0 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,86 @@ | ||
name: suyu-windows-build | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'select branch to build(default: dev)' | ||
required: false | ||
default: 'dev' | ||
build-name: | ||
description: 'select build-name to build(default: mainline)' | ||
required: false | ||
default: 'mainline' | ||
schedule: | ||
- cron: "0 0 */7 * *" | ||
|
||
jobs: | ||
suyu_windows_build: | ||
permissions: | ||
contents: write | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: { ref: main } | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
with: | ||
msbuild-architecture: x64 | ||
|
||
- name: Install Vulkan SDK | ||
run: | | ||
echo $env:date | ||
cd ${{ github.workspace }} | ||
${{ github.workspace }}/script/install-vulkan-sdk.ps1 | ||
- name: Download suyu source code | ||
run: | | ||
cd ${{ github.workspace }} | ||
git clone --branch ${{ github.event.inputs.branch || 'dev' }} https://git.suyu.dev/suyu/suyu.git --recursive | ||
- name: Get date | ||
id: version | ||
shell: pwsh | ||
run: | | ||
cd ${{ github.workspace }}\suyu | ||
"date=$(date -u "+%Y%m%d")" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | ||
"tag=$(git describe --tags --always)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | ||
- name: Configure CMake | ||
run: | | ||
cd ${{ github.workspace }}/suyu | ||
Import-Module $env:ChocolateyInstall/helpers/chocolateyProfile.psm1 && | ||
glslangValidator --version && | ||
mkdir build && | ||
cd build && | ||
cmake -E env CXXFLAGS="/Gw" cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DSUYU_ENABLE_LTO=ON -DSUYU_USE_BUNDLED_QT=1 -DSUYU_USE_BUNDLED_SDL2=1 -DSUYU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DSUYU_ENABLE_COMPATIBILITY_REPORTING=ON -DSUYU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION="1.0.0" -DCMAKE_BUILD_TYPE=Release -DSUYU_CRASH_DUMPS=ON .. | ||
- name: Build Solution | ||
shell: pwsh | ||
run: | | ||
cd ${{ github.workspace }}/suyu | ||
msbuild build/suyu.sln /m /p:Configuration=Release | ||
- name: Package Artifacts | ||
shell: pwsh | ||
run: | | ||
cd ${{ github.workspace }}/suyu | ||
${{ github.workspace }}/script/upload.ps1 ${{ github.event.inputs.build-name || 'mainline' }} ${{ steps.version.outputs.date }} ${{ steps.version.outputs.tag }} | ||
cd ${{ github.workspace }} | ||
- name: Release Suyu Windows (Suyu-Windows) | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: Suyu Windows ${{ steps.version.outputs.date }} | ||
tag_name: suyu-windows | ||
files: | | ||
suyu*.zip | ||
- name: Release Suyu Windows ${{ steps.version.outputs.date }} | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: ${{ steps.version.outputs.date }} | ||
tag_name: ${{ steps.version.outputs.date }} | ||
files: | | ||
suyu*.zip |