-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (76 loc) · 2.57 KB
/
smoke.yml
File metadata and controls
85 lines (76 loc) · 2.57 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
name: Smoke
on:
pull_request:
push:
branches:
- master
jobs:
smoke:
name: ${{ matrix.os }} / ${{ matrix.manifest_source }} / ${{ 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
manifest_source:
- internal
- external
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 external manifests
if: matrix.manifest_source == 'external'
uses: actions/checkout@v6
with:
repository: AnastaZIuk/nam-smoke-manifests
path: external-manifests
- name: Restore NAM cache
uses: actions/cache@v5
with:
path: ${{ env.NAM_CACHE_ROOT }}
key: nam-cache-${{ runner.os }}-${{ matrix.manifest_source }}-${{ hashFiles('media/**/*.dvc', 'external-manifests/media/**/*.dvc') }}
restore-keys: |
nam-cache-${{ runner.os }}-${{ matrix.manifest_source }}-
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_LINK_MODE=${{ matrix.link_mode }}"
)
if ('${{ matrix.manifest_source }}' -eq 'external') {
$cmakeArgs += "-DNAM_SMOKE_MANIFEST_ROOT=$env:GITHUB_WORKSPACE/external-manifests"
$cmakeArgs += '-DNAM_SMOKE_REPO=AnastaZIuk/nam-smoke-manifests'
$cmakeArgs += '-DNAM_SMOKE_TAG=media'
}
& 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