Skip to content

Commit 7e99085

Browse files
committed
ci: add a native Windows build workflow
windows-latest + micromamba (conda-forge llvmdev/clangdev/lld) drives scripts/setup/setup.ps1 with LLVM.SYSTEM_DIR at the conda Library prefix and the AnyDSL toolchain cached. OpenGL/GLFW need no install on Windows (Windows SDK + CPM Win32 backend); TBB/zlib/half/OIDN are fetched by the setup scripts.
1 parent 6e735eb commit 7e99085

1 file changed

Lines changed: 45 additions & 7 deletions

File tree

.github/workflows/build-windows.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,61 @@ name: Build Windows
22

33
on:
44
push:
5+
branches: [ master, development ]
56
pull_request:
67

7-
env:
8-
DEV_DOWNLOAD: #TODO
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
10+
cancel-in-progress: true
911

1012
jobs:
1113
build:
1214

1315
runs-on: windows-latest
16+
permissions:
17+
contents: read
1418

1519
steps:
1620
- name: Checkout repository
1721
uses: actions/checkout@v7
1822

19-
# TODO: Get anydsl package
20-
# - name: Download dev environment
21-
# run: wget -O dev_env.7z ${{ env.DEV_DOWNLOAD }}
23+
# A complete, self-consistent LLVM + Clang dev toolchain (static libs and
24+
# cmake config), which the distribution installers do not provide.
25+
- name: Setup LLVM/Clang toolchain
26+
uses: mamba-org/setup-micromamba@v2
27+
with:
28+
environment-name: llvm
29+
create-args: >-
30+
llvmdev=20.1
31+
clangdev=20.1
32+
lld=20.1
33+
init-shell: powershell
34+
cache-environment: true
2235

23-
# - name: Extract dev environment
24-
# run: 7z x archive.zip
36+
- name: Cache AnyDSL toolchain (thorin/artic/runtime)
37+
uses: actions/cache@v4
38+
with:
39+
path: deps
40+
key: anydsl-deps-${{ runner.os }}-${{ hashFiles('scripts/setup/config.json', 'scripts/setup/*.ps1') }}
41+
restore-keys: |
42+
anydsl-deps-${{ runner.os }}-
43+
44+
- name: Generate CI setup config
45+
shell: pwsh
46+
run: |
47+
$cfg = Get-Content scripts/setup/config.json -Raw | ConvertFrom-Json
48+
# Keep the dependency tree inside the workspace so it can be cached.
49+
$cfg.LOCATION = "$env:GITHUB_WORKSPACE/deps"
50+
# conda places packages under <prefix>/Library on Windows.
51+
$cfg.LLVM.SYSTEM_DIR = "$env:CONDA_PREFIX/Library"
52+
$cfg | ConvertTo-Json -Depth 16 | Set-Content scripts/setup/config.ci.json
53+
54+
- name: Setup dependencies and build Ignis
55+
shell: pwsh
56+
run: |
57+
$env:CMAKE_PREFIX_PATH = "$env:CONDA_PREFIX/Library;$env:CMAKE_PREFIX_PATH"
58+
./scripts/setup/setup.ps1 -config_file scripts/setup/config.ci.json
59+
60+
- name: Run tests
61+
shell: pwsh
62+
run: ctest --test-dir build/Release --output-on-failure -E "(ignis_test_integrator)|(ignis_test_multiple_runtimes)"

0 commit comments

Comments
 (0)