-
Notifications
You must be signed in to change notification settings - Fork 15
74 lines (70 loc) · 2.08 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: build
on:
push:
branches:
- '*'
tags:
- '*'
jobs:
build:
runs-on: windows-2022
env:
WORKDIR: D:/build
SCCACHE_GHA_ENABLED: "true"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
steps:
- name: Enable Git support for long file paths
run: git config --system core.longpaths true
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Load CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.29.5
- name: Set up directories
run: "md -Path 'C:\\moon\\randomizer'"
- name: Extract tag
uses: olegtarasov/get-tag@v2.1
id: tagName
with:
tagRegex: "v?([^-]*)"
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Symlink build directory
run: |
$path = Resolve-Path .
New-Item -Path ${{ env.WORKDIR }} -ItemType SymbolicLink -Value $path
- uses: ilammy/msvc-dev-cmd@v1
- name: Update vcpkg repository
shell: cmd
run: |
cd /d C:\vcpkg
git pull
- name: Generate solution
shell: cmd
working-directory: ${{ env.WORKDIR }}
run: |
generate-cmake.release-ninja.bat
IF ERRORLEVEL 1 (
echo GENERATING FAILED
exit 1
)
- name: Compile Wotw Rando
shell: cmd
working-directory: ${{ env.WORKDIR }}
run: |
cmake --build cmake-build-relwithdebinfo --target INSTALL_RUNTIME --config RelWithDebInfo
IF ERRORLEVEL 1 (
echo BUILD FAILED
exit 1
)
- name: Archive randomizer
uses: actions/upload-artifact@v4
with:
name: randomizer
path: 'C:\moon\randomizer\*'