-
Notifications
You must be signed in to change notification settings - Fork 12
74 lines (63 loc) · 2.63 KB
/
Copy pathbuild-windows.yml
File metadata and controls
74 lines (63 loc) · 2.63 KB
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 Windows
on:
push:
branches: [ master, development ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
# The LLVM/Clang dev toolchain is provisioned by setup.ps1 itself
# (LLVM.PREBUILT, see scripts/setup/setup_llvm.ps1) into deps/llvm-conda,
# which the deps cache below picks up.
- name: Setup sccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
key: ${{ github.job }}-${{ runner.os }}
max-size: 2G
- name: Cache AnyDSL toolchain (thorin/artic/runtime)
uses: actions/cache@v4
with:
path: deps
# v2: setup.ps1 provisions LLVM into deps/llvm-conda itself; caches
# from the setup-micromamba era bake dead env paths into the AnyDSL
# cmake exports and must never be restored.
key: anydsl-deps-v2-${{ runner.os }}-${{ hashFiles('scripts/setup/config.json', 'scripts/setup/*.ps1') }}
restore-keys: |
anydsl-deps-v2-${{ runner.os }}-
- name: Cache CPM sources
uses: actions/cache@v4
with:
path: .cpm-cache
key: cpm-${{ runner.os }}-${{ hashFiles('cmake/Dependencies.cmake') }}
restore-keys: |
cpm-${{ runner.os }}-
- name: Generate CI setup config
shell: pwsh
run: |
$cfg = Get-Content scripts/setup/config.json -Raw | ConvertFrom-Json
# Keep the dependency tree inside the workspace so it can be cached.
$cfg.LOCATION = "$env:GITHUB_WORKSPACE/deps"
$cfg.CMAKE.EXTRA_ARGS += "-DCMAKE_C_COMPILER_LAUNCHER=sccache"
$cfg.CMAKE.EXTRA_ARGS += "-DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
# zlib ships in the prebuilt LLVM env (LLVM.PREBUILT_PACKAGES), so skip
# the flaky from-source build; setup_llvm.ps1 puts the env on
# CMAKE_PREFIX_PATH and Ignis resolves it from there.
$cfg.ZLIB.ENABLED = $false
$cfg | ConvertTo-Json -Depth 16 | Set-Content scripts/setup/config.ci.json
- name: Setup dependencies and build Ignis
shell: pwsh
run: |
$env:CPM_SOURCE_CACHE = "$env:GITHUB_WORKSPACE/.cpm-cache"
./scripts/setup/setup.ps1 -config_file scripts/setup/config.ci.json
- name: Run tests
shell: pwsh
run: ctest --test-dir build/Release --output-on-failure -E "(ignis_test_integrator)|(ignis_test_multiple_runtimes)"