@@ -16,210 +16,7 @@ permissions:
1616 contents : read
1717
1818jobs :
19- delete_cache :
20- name : Delete github action cache
19+ test_latest_deps :
20+ name : Daily test all (latest dependencies)
2121 if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-daily-ci')
22- runs-on : ubuntu-latest
23- continue-on-error : true
24- permissions :
25- actions : write
26- steps :
27- - name : Delete caches for this ref
28- env :
29- GH_TOKEN : ${{ github.token }}
30- REF : ${{ github.ref }}
31- REPO : ${{ github.repository }}
32- run : |
33- set -u
34- gh cache list -R "$REPO" --ref "$REF" --limit 100 --json id --jq '.[].id' \
35- | while read -r id; do
36- gh cache delete -R "$REPO" "$id" || echo "skipped $id (already gone)"
37- done
38-
39- resolve_deps :
40- name : Resolve newest dependencies
41- if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-daily-ci')
42- runs-on : ubuntu-latest
43- outputs :
44- deps : ${{ steps.resolve.outputs.deps }}
45- test_deps : ${{ steps.resolve.outputs.test_deps }}
46- steps :
47- - name : Checkout
48- uses : actions/checkout@v6
49-
50- - name : Resolve dependencies
51- id : resolve
52- env :
53- GITHUB_TOKEN : ${{ github.token }}
54- run : |
55- if ! DEPS=$(python3 tools/resolve_newest_deps.py .pinned 2>"$RUNNER_TEMP/resolve_deps.log"); then
56- cat "$RUNNER_TEMP/resolve_deps.log"
57- exit 1
58- fi
59- if ! TEST_DEPS=$(python3 tools/resolve_newest_deps.py tests/.pinned 2>"$RUNNER_TEMP/resolve_test_deps.log"); then
60- cat "$RUNNER_TEMP/resolve_test_deps.log"
61- exit 1
62- fi
63- cat "$RUNNER_TEMP/resolve_deps.log"
64- cat "$RUNNER_TEMP/resolve_test_deps.log"
65- if [ -z "$DEPS" ]; then
66- echo "ERROR: dependency resolver produced no output" >&2
67- exit 1
68- fi
69- if [ -z "$TEST_DEPS" ]; then
70- echo "ERROR: test dependency resolver produced no output" >&2
71- exit 1
72- fi
73- printf 'deps=%s\n' "$DEPS" >> "$GITHUB_OUTPUT"
74- printf 'test_deps=%s\n' "$TEST_DEPS" >> "$GITHUB_OUTPUT"
75-
76- test :
77- needs : [delete_cache, resolve_deps]
78- if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run-daily-ci')
79- env :
80- NIMBLE_COMMIT : 9207e8b2bbdf66b5a4d1020214cff44d2d30df92 # v0.20.1
81- timeout-minutes : 70
82- strategy :
83- fail-fast : false
84- matrix :
85- config :
86- - os : linux
87- cpu : amd64
88- cc : gcc
89- builder : ubuntu-22.04
90- shell : bash
91- - os : linux-gcc-14
92- cpu : amd64
93- cc : gcc
94- builder : ubuntu-24.04
95- shell : bash
96- - os : windows
97- cpu : amd64
98- cc : clang
99- builder : windows-2022
100- shell : bash
101- - os : windows
102- cpu : amd64
103- cc : gcc
104- builder : windows-2022
105- shell : " msys2 {0}"
106- - os : linux
107- cpu : i386
108- cc : gcc
109- builder : ubuntu-22.04
110- shell : bash
111- nim :
112- - ref : v2.2.4
113- memory_management : refc
114- - ref : v2.2.10
115- memory_management : refc
116- - ref : devel
117- memory_management : refc
118-
119- defaults :
120- run :
121- shell : ${{ matrix.config.shell }}
122-
123- name : " ${{ matrix.config.os }}-${{ matrix.config.cpu }} (${{ matrix.nim.ref }}; ${{ matrix.config.cc }}; ${{ matrix.nim.memory_management }})"
124- runs-on : ${{ matrix.config.builder }}
125- steps :
126- - name : Checkout
127- uses : actions/checkout@v6
128- with :
129- submodules : true
130-
131- - name : Setup Nim
132- uses : " ./.github/actions/install_nim"
133- with :
134- os : ${{ matrix.config.os }}
135- shell : ${{ matrix.config.shell }}
136- nim_ref : ${{ matrix.nim.ref }}
137- cpu : ${{ matrix.config.cpu }}
138-
139- - name : Restore llvm-mingw (Windows) from cache
140- if : runner.os == 'Windows' && matrix.config.cc == 'clang'
141- id : windows-mingw-cache
142- uses : actions/cache@v5
143- with :
144- path : external/mingw-${{ matrix.config.cpu }}
145- key : ' mingw-llvm-17-${{ matrix.config.cpu }}'
146-
147- - name : Install llvm-mingw dependency (Windows)
148- if : >
149- steps.windows-mingw-cache.outputs.cache-hit != 'true' &&
150- runner.os == 'Windows' &&
151- matrix.config.cc == 'clang'
152- run : |
153- mkdir -p external
154- MINGW_BASE="https://github.com/mstorsjo/llvm-mingw/releases/download/20230905"
155- MINGW_URL="$MINGW_BASE/llvm-mingw-20230905-ucrt-x86_64.zip"
156- curl -L "$MINGW_URL" -o "external/mingw-${{ matrix.config.cpu }}.zip"
157- 7z x -y "external/mingw-${{ matrix.config.cpu }}.zip" -oexternal/mingw-${{ matrix.config.cpu }}/
158- mv external/mingw-${{ matrix.config.cpu }}/**/* ./external/mingw-${{ matrix.config.cpu }}
159-
160- - name : Use gcc 14
161- if : ${{ matrix.config.os == 'linux-gcc-14'}}
162- run : |
163- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
164- sudo update-alternatives --set gcc /usr/bin/gcc-14
165-
166- - name : Path to cached dependencies (Windows)
167- if : >
168- runner.os == 'Windows' &&
169- matrix.config.cc == 'clang'
170- run : |
171- echo '${{ github.workspace }}'"/external/mingw-${{ matrix.config.cpu }}/bin" >> $GITHUB_PATH
172- echo "." >> $GITHUB_PATH
173-
174- - name : Install nasm (Windows)
175- if : runner.os == 'Windows'
176- shell : pwsh
177- run : |
178- choco install nasm --no-progress -y
179- "C:\Program Files\NASM" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
180-
181- - name : Install dependencies (newest used across projects)
182- env :
183- DEPS : ${{ needs.resolve_deps.outputs.deps }}
184- TEST_DEPS : ${{ needs.resolve_deps.outputs.test_deps }}
185- run : |
186- if [ -z "$DEPS" ]; then
187- echo "ERROR: dependency resolver produced no output for this workflow run" >&2
188- exit 1
189- fi
190- if [ -z "$TEST_DEPS" ]; then
191- echo "ERROR: test dependency resolver produced no output for this workflow run" >&2
192- exit 1
193- fi
194- echo "=== Installing resolved newest dependencies ==="
195- # nimbledeps/ switches nimble to local-dep mode for the pinned build.
196- rm -rf nimbledeps tests/nimbledeps
197- mkdir nimbledeps
198- echo "nimble install -y $DEPS"
199- nimble install -y $DEPS
200- mkdir tests/nimbledeps
201- echo "cd tests && nimble install -y $TEST_DEPS"
202- (cd tests && nimble install -y $TEST_DEPS)
203-
204- - name : Build prerequisites
205- run : make nimble.paths tests/nimble.paths
206-
207- - name : Build test_all
208- run : |
209- NIMFLAGS="--mm:${{ matrix.nim.memory_management }} --opt:speed --styleCheck:usages --styleCheck:error --parallelBuild:0 --threads:on --skipUserCfg"
210- NIMFLAGS="$NIMFLAGS -d:chronicles_log_level=DEBUG"
211- NIMFLAGS="$NIMFLAGS --debugger:native --stacktrace:off --import:libbacktrace --define:nimStackTraceOverride"
212- if [[ '${{ matrix.config.cc }}' == 'clang' ]]; then
213- NIMFLAGS="$NIMFLAGS --cc:clang"
214- fi
215- nim c $NIMFLAGS ./tests/test_all
216-
217- - name : Run tests
218- run : |
219- ./tests/test_all --output-level=VERBOSE --console --xml:tests/results_test_all.xml
220-
221- - name : Run integration tests
222- if : ${{ matrix.config.os == 'linux' && matrix.config.cpu == 'amd64' }}
223- run : |
224- export NIMFLAGS="${NIMFLAGS} -d:chronicles_log_level=DEBUG"
225- make test_integration
22+ uses : ./.github/workflows/daily_test_all_latest_deps_matrix.yml
0 commit comments