-
Notifications
You must be signed in to change notification settings - Fork 0
162 lines (145 loc) · 5.13 KB
/
smoke.yml
File metadata and controls
162 lines (145 loc) · 5.13 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Smoke
on:
pull_request:
push:
branches:
- master
jobs:
smoke:
name: ${{ matrix.os }} / ${{ matrix.link_mode }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
link_mode:
- symlink
- hardlink
- copy
include:
- os: ubuntu-latest
native_build_arg: -j1
- os: windows-latest
native_build_arg: /m:1
env:
NAM_CACHE_ROOT: ${{ github.workspace }}/.nam-cache
SMOKE_BUILD_DIR: ${{ github.workspace }}/smoke/build
steps:
- uses: actions/checkout@v6
- name: Checkout first-party manifests
uses: actions/checkout@v6
with:
repository: Devsh-Graphics-Programming/Nabla-Asset-Manifests
path: official-manifests
- name: Restore NAM cache
uses: actions/cache@v5
with:
path: ${{ env.NAM_CACHE_ROOT }}
key: nam-cache-${{ runner.os }}-${{ hashFiles('official-manifests/**/*.dvc') }}
restore-keys: |
nam-cache-${{ runner.os }}-
- name: Configure smoke
shell: pwsh
run: |
cmake -E rm -rf $env:SMOKE_BUILD_DIR
cmake -E make_directory $env:NAM_CACHE_ROOT
$cmakeArgs = @(
'-S', 'smoke',
'-B', $env:SMOKE_BUILD_DIR,
"-DNAM_SMOKE_CACHE_ROOT=$env:NAM_CACHE_ROOT",
"-DNAM_SMOKE_MANIFEST_ROOT=$env:GITHUB_WORKSPACE/official-manifests",
"-DNAM_SMOKE_LINK_MODE=${{ matrix.link_mode }}"
)
& cmake @cmakeArgs
- name: Build smoke
shell: pwsh
run: cmake --build $env:SMOKE_BUILD_DIR --config Debug --target media -- ${{ matrix.native_build_arg }}
- name: Verify materialization stats
shell: pwsh
run: |
python smoke/ci/verify_materialization.py `
--build-dir $env:SMOKE_BUILD_DIR `
--cache-root $env:NAM_CACHE_ROOT `
--expected-mode ${{ matrix.link_mode }} `
--forbid-tree .nam/media/assets
smoke-flatten:
name: flatten / ${{ matrix.os }} / ${{ matrix.link_mode }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
link_mode:
- hardlink
include:
- os: ubuntu-latest
native_build_arg: -j1
- os: windows-latest
native_build_arg: /m:1
env:
GH_TOKEN: ${{ github.token }}
NAM_CACHE_ROOT: ${{ github.workspace }}/.nam-cache-flat
SMOKE_BUILD_DIR: ${{ github.workspace }}/smoke/build-flat
SMOKE_MANIFEST_DIR: ${{ github.workspace }}/official-manifests
steps:
- uses: actions/checkout@v6
- name: Download smoke-flatten manifests
shell: pwsh
run: |
cmake -E rm -rf $env:SMOKE_MANIFEST_DIR
cmake -E make_directory $env:SMOKE_MANIFEST_DIR
gh release download smoke-flatten `
--repo Devsh-Graphics-Programming/Nabla-Asset-Manifests `
--pattern smoke-flatten-manifests.zip `
--dir $env:GITHUB_WORKSPACE
Expand-Archive `
-Path "$env:GITHUB_WORKSPACE/smoke-flatten-manifests.zip" `
-DestinationPath $env:SMOKE_MANIFEST_DIR `
-Force
- name: Restore NAM flat cache
uses: actions/cache@v5
with:
path: ${{ env.NAM_CACHE_ROOT }}
key: nam-flat-cache-${{ runner.os }}-smoke-flatten-v1
restore-keys: |
nam-flat-cache-${{ runner.os }}-
- name: Configure flatten smoke
shell: pwsh
run: |
cmake -E rm -rf $env:SMOKE_BUILD_DIR
cmake -E make_directory $env:NAM_CACHE_ROOT
$cmakeArgs = @(
'-S', 'smoke',
'-B', $env:SMOKE_BUILD_DIR,
"-DNAM_SMOKE_CACHE_ROOT=$env:NAM_CACHE_ROOT",
"-DNAM_SMOKE_MANIFEST_ROOT=$env:SMOKE_MANIFEST_DIR",
'-DNAM_SMOKE_REPO=Devsh-Graphics-Programming/Nabla-Asset-Manifests',
'-DNAM_SMOKE_TAG=smoke-flatten',
'-DNAM_SMOKE_CHANNEL=smoke-flatten',
'-DNAM_SMOKE_FLAT_RELEASE_ASSET_NAMES=ON',
"-DNAM_SMOKE_LINK_MODE=${{ matrix.link_mode }}"
)
& cmake @cmakeArgs
- name: Build flatten smoke
shell: pwsh
run: cmake --build $env:SMOKE_BUILD_DIR --config Debug --target media -- ${{ matrix.native_build_arg }}
- name: Verify flatten materialization stats
shell: pwsh
run: |
python smoke/ci/verify_materialization.py `
--build-dir $env:SMOKE_BUILD_DIR `
--cache-root $env:NAM_CACHE_ROOT `
--expected-mode ${{ matrix.link_mode }} `
--root-subdir smoke-flatten `
--require-path alpha/config.dummy `
--require-path gamma/tools/run.dummy `
--require-path theta/one/two/three/value.dummy `
--require-path lambda/modules/deep/config.dummy `
--forbid-substring __ `
--forbid-tree .nam/smoke-flatten/assets