Simplify windows job a little by removing absolute paths
This commit is contained in:
parent
1af69b2236
commit
6d4066aa52
1 changed files with 9 additions and 13 deletions
22
.github/workflows/ci-main.yml
vendored
22
.github/workflows/ci-main.yml
vendored
|
@ -275,29 +275,25 @@ jobs:
|
|||
runs-on: windows-2019
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- { uses: actions/checkout@v3, with: { submodules: "recursive" } }
|
||||
|
||||
- name: Cache object files
|
||||
id: windows-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
D:/a/wesnoth/wesnoth/vcpkg_installed
|
||||
path: vcpkg_installed # vcpkg generates this dir next to vcpkg.json
|
||||
key: win-cache-master-${{ matrix.cfg }}-0002
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.1.3
|
||||
|
||||
# checkout a specific commit to prevent cmake from thinking it can't use the cached dependencies anymore
|
||||
# checkout a specific commit to prevent vcpkg ABI changes from invalidating the cache (https://learn.microsoft.com/en-us/vcpkg/users/binarycaching#abi-hash)
|
||||
# the commit itself is just whatever happens to be the latest commit when a newer version is needed
|
||||
- name: Build vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg.git D:/a/wesnoth/vcpkg
|
||||
cd D:/a/wesnoth/vcpkg
|
||||
git checkout 5b081066f0740e54bdcbe4d0772d85dbb1d8e266
|
||||
D:/a/wesnoth/vcpkg/bootstrap-vcpkg.bat
|
||||
git clone https://github.com/microsoft/vcpkg
|
||||
git -C vcpkg checkout 5b081066f0740e54bdcbe4d0772d85dbb1d8e266
|
||||
vcpkg/bootstrap-vcpkg.bat
|
||||
|
||||
- name: Setup cmake
|
||||
uses: jwlawson/actions-setup-cmake@v1.13
|
||||
|
@ -306,19 +302,19 @@ jobs:
|
|||
|
||||
- name: Run cmake
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=%CFG% -DENABLE_GAME=true -DENABLE_SERVER=true -DENABLE_CAMPAIGN_SERVER=true -DENABLE_TESTS=true -DENABLE_MYSQL=false -DENABLE_NLS=false -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=D:/a/wesnoth/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 16 2019" .
|
||||
cmake -DCMAKE_BUILD_TYPE=%CFG% -DENABLE_GAME=true -DENABLE_SERVER=true -DENABLE_CAMPAIGN_SERVER=true -DENABLE_TESTS=true -DENABLE_MYSQL=false -DENABLE_NLS=false -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 16 2019" .
|
||||
|
||||
# delete buildtrees directory to free up space after cmake invokes vcpkg to build the dependencies
|
||||
# otherwise the job was failing when trying to write a .obj file
|
||||
# building vcpkg on the more spacious C drive didn't work since for some reason vcpkg decides to not create the pango/cairo pkgconfig files there
|
||||
- name: Build wesnoth, wesnothd, campaignd and unit tests
|
||||
run: |
|
||||
rmdir /s /q D:\a\wesnoth\vcpkg\buildtrees
|
||||
rmdir /s /q vcpkg\buildtrees
|
||||
MSBuild.exe wesnoth.sln -p:Configuration=%CFG%
|
||||
|
||||
- name: Run WML unit tests
|
||||
if: matrix.cfg == 'Release'
|
||||
run: python run_wml_tests -v -g -c -t 20 -p D:/a/wesnoth/wesnoth/%CFG%/wesnoth.exe
|
||||
run: python run_wml_tests -v -g -c -t 20 -p %CFG%/wesnoth.exe
|
||||
|
||||
# run after all other jobs have completed to check overall build status
|
||||
discord-notification:
|
||||
|
|
Loading…
Add table
Reference in a new issue