Skip to content

Commit

Permalink
Update Windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Aug 11, 2024
1 parent 80eb375 commit 147266f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ name: Windows
on: [push, pull_request]

jobs:
build:

release:
runs-on: windows-2019

steps:
- uses: actions/checkout@v3
- name: Build
Expand All @@ -15,5 +13,17 @@ jobs:
- name: Artifact
uses: actions/upload-artifact@v4
with:
name: friction-ci-${{github.sha}}-windows-x64
name: friction-ci-windows-x64
path: build\output\*.7z
debug:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Build
shell: cmd
run: .\src\scripts\build_ci.bat debug
- name: Artifact
uses: actions/upload-artifact@v4
with:
name: friction-ci-debug-windows-x64
path: build\output\*.7z
18 changes: 13 additions & 5 deletions src/scripts/build_ci.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ REM # GPLv3+

set OPT=%1
set REL=OFF
set BTYPE=Release
set BDIR=release

if "%OPT%" == "release" (
set REL=ON
)

if "%OPT%" == "debug" (
set BTYPE=Debug
set BDIR=debug
)

set CWD=%cd%
set SDK_DIR=%CWD%\sdk
set SDK_VERSION=20240805
Expand Down Expand Up @@ -37,9 +45,9 @@ mkdir build
cd "%CWD%\build"
mkdir output

cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%SDK_DIR% -DBUILD_ENGINE=OFF -DFRICTION_OFFICIAL_RELEASE=%REL% -DWIN_DEPLOY=ON -DGIT_COMMIT=%COMMIT% -DGIT_BRANCH=%BRANCH% ..
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=%BTYPE% -DCMAKE_PREFIX_PATH=%SDK_DIR% -DBUILD_ENGINE=OFF -DFRICTION_OFFICIAL_RELEASE=%REL% -DWIN_DEPLOY=ON -DGIT_COMMIT=%COMMIT% -DGIT_BRANCH=%BRANCH% ..
set /p VERSION=<version.txt
cmake --build . --config Release
cmake --build . --config %BTYPE%

if "%REL%" == "OFF" (
set VERSION="%VERSION%-%COMMIT%"
Expand All @@ -50,9 +58,9 @@ mkdir "%OUTPUT_DIR%"
mkdir "%OUTPUT_DIR%\audio"
mkdir "%OUTPUT_DIR%\platforms"

copy "%CWD%\build\src\core\release\frictioncore.dll" "%OUTPUT_DIR%\"
copy "%CWD%\build\src\ui\release\frictionui.dll" "%OUTPUT_DIR%\"
copy "%CWD%\build\src\app\release\friction.exe" "%OUTPUT_DIR%\"
copy "%CWD%\build\src\core\%BDIR%\frictioncore.dll" "%OUTPUT_DIR%\"
copy "%CWD%\build\src\ui\%BDIR%\frictionui.dll" "%OUTPUT_DIR%\"
copy "%CWD%\build\src\app\%BDIR%\friction.exe" "%OUTPUT_DIR%\"
copy "%SDK_DIR%\bin\svgo-win.exe" "%OUTPUT_DIR%\"
copy "%SDK_DIR%\bin\skia.dll" "%OUTPUT_DIR%\"
copy "%SDK_DIR%\bin\Qt5Core.dll" "%OUTPUT_DIR%\"
Expand Down

0 comments on commit 147266f

Please sign in to comment.