Skip to content

Commit 01526ab

Browse files
Add 30 minute timeout to github actions
1 parent e24db63 commit 01526ab

1 file changed

Lines changed: 119 additions & 103 deletions

File tree

.github/workflows/build.yml

Lines changed: 119 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
linux:
3838
needs: codegen
3939
runs-on: ${{matrix.os}}
40+
timeout-minutes: 30
4041
strategy:
4142
matrix:
4243
compiler: [ {cc: gcc, cxx: g++}, {cc: clang, cxx: clang++} ]
@@ -77,6 +78,7 @@ jobs:
7778

7879
codegen:
7980
runs-on: ubuntu-latest
81+
timeout-minutes: 30
8082
steps:
8183
- uses: actions/checkout@v4
8284
- run: scripts/update_deps.py --dir ext --no-build
@@ -85,6 +87,7 @@ jobs:
8587
linux-no-asm:
8688
needs: codegen
8789
runs-on: ubuntu-24.04
90+
timeout-minutes: 30
8891
steps:
8992
- uses: actions/checkout@v4
9093
- run: sudo apt update
@@ -105,6 +108,7 @@ jobs:
105108
linux-32:
106109
needs: codegen
107110
runs-on: ubuntu-24.04
111+
timeout-minutes: 30
108112
strategy:
109113
matrix:
110114
config: [ Debug, Release ]
@@ -143,6 +147,7 @@ jobs:
143147
linux-32-no-asm:
144148
needs: codegen
145149
runs-on: ubuntu-24.04
150+
timeout-minutes: 30
146151
steps:
147152
- uses: actions/checkout@v4
148153
- uses: actions/setup-python@v5
@@ -178,6 +183,7 @@ jobs:
178183
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
179184
needs: linux-no-asm
180185
runs-on: windows-latest
186+
timeout-minutes: 30
181187
strategy:
182188
matrix:
183189
arch: [ Win32, x64 ]
@@ -199,6 +205,7 @@ jobs:
199205
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
200206
needs: linux-no-asm
201207
runs-on: windows-latest
208+
timeout-minutes: 30
202209
strategy:
203210
matrix:
204211
arch: [ Win32, x64 ]
@@ -218,13 +225,14 @@ jobs:
218225
# Test both clang and clang-cl (Chromium project uses clang-cl)
219226
windows_clang:
220227
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
221-
needs: linux-no-asm
222-
runs-on: windows-2022
223-
strategy:
224-
matrix:
225-
compiler: [ clang, clang-cl ]
226-
config: [ Debug, Release ]
227-
steps:
228+
needs: linux-no-asm
229+
runs-on: windows-2022
230+
timeout-minutes: 30
231+
strategy:
232+
matrix:
233+
compiler: [ clang, clang-cl ]
234+
config: [ Debug, Release ]
235+
steps:
228236
- uses: actions/checkout@v4
229237
- uses: ilammy/msvc-dev-cmd@v1
230238
- run: |
@@ -244,6 +252,7 @@ jobs:
244252
# Mac is 10x expensive to run on GitHub machines, so only run if we know something else passed as well
245253
needs: windows_clang
246254
runs-on: macos-13
255+
timeout-minutes: 30
247256
strategy:
248257
matrix:
249258
config: [ Debug, Release ]
@@ -270,14 +279,15 @@ jobs:
270279
- run: ctest --parallel --output-on-failure --test-dir build/
271280

272281
apple-cross-compile:
273-
# Mac is 10x expensive to run on GitHub machines, so only run if we know something else passed as well
274-
needs: windows_clang
275-
name: ${{ matrix.CMAKE_SYSTEM_NAME }}
276-
runs-on: macos-13
277-
strategy:
278-
matrix:
279-
CMAKE_SYSTEM_NAME: [ iOS, tvOS ]
280-
steps:
282+
# Mac is 10x expensive to run on GitHub machines, so only run if we know something else passed as well
283+
needs: windows_clang
284+
name: ${{ matrix.CMAKE_SYSTEM_NAME }}
285+
runs-on: macos-13
286+
timeout-minutes: 30
287+
strategy:
288+
matrix:
289+
CMAKE_SYSTEM_NAME: [ iOS, tvOS ]
290+
steps:
281291
- uses: actions/checkout@v4
282292
- uses: actions/setup-python@v5
283293
with:
@@ -306,6 +316,7 @@ jobs:
306316
needs: windows_clang
307317
name: "Universal Binary Testing (STATIC ${{ matrix.static }}) w/ ${{ matrix.generator }}"
308318
runs-on: macos-latest
319+
timeout-minutes: 30
309320
strategy:
310321
matrix:
311322
static: [ 'ON', 'OFF' ]
@@ -336,99 +347,104 @@ jobs:
336347
vtool -show-build /tmp/lib/libvulkan.dylib | grep 'architecture arm64'
337348
338349
chromium:
339-
needs: codegen
340-
runs-on: ubuntu-latest
341-
steps:
342-
- uses: actions/checkout@v4
343-
- run: scripts/gn/gn.py
350+
needs: codegen
351+
runs-on: ubuntu-latest
352+
timeout-minutes: 30
353+
steps:
354+
- uses: actions/checkout@v4
355+
- run: scripts/gn/gn.py
344356

345357
mingw:
346-
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
347-
if: false # Disabled due to issues with msys2 making CMake unable to find a working compiler
348-
needs: linux-no-asm
349-
runs-on: windows-2022
350-
defaults:
351-
run:
352-
shell: bash
353-
steps:
354-
- uses: actions/checkout@v4
355-
- uses: actions/setup-python@v5
356-
with:
357-
python-version: '3.11'
358-
- name: Setup uasm
359-
run: |
360-
C:/msys64/usr/bin/pacman -Sy --noconfirm --needed mingw-w64-x86_64-uasm
361-
printf '%s\n' 'C:/msys64/mingw64/bin' >> $GITHUB_PATH
362-
- name: UASM Check
363-
run: uasm -?
364-
- run: |
365-
cmake -S. -B build \
366-
-D UPDATE_DEPS=ON \
367-
-D CMAKE_BUILD_TYPE=Release \
368-
-D BUILD_WERROR=ON \
369-
-G Ninja
370-
- run: cmake --build build
371-
- run: cmake --install build --prefix /tmp
358+
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
359+
needs: linux-no-asm
360+
if: false # Disabled due to issues with msys2 making CMake unable to find a working compiler
361+
runs-on: windows-2022
362+
timeout-minutes: 30
363+
defaults:
364+
run:
365+
shell: bash
366+
steps:
367+
- uses: actions/checkout@v4
368+
- uses: actions/setup-python@v5
369+
with:
370+
python-version: '3.11'
371+
- name: Setup uasm
372+
run: |
373+
C:/msys64/usr/bin/pacman -Sy --noconfirm --needed mingw-w64-x86_64-uasm
374+
printf '%s\n' 'C:/msys64/mingw64/bin' >> $GITHUB_PATH
375+
- name: UASM Check
376+
run: uasm -?
377+
- run: |
378+
cmake -S. -B build \
379+
-D UPDATE_DEPS=ON \
380+
-D CMAKE_BUILD_TYPE=Release \
381+
-D BUILD_WERROR=ON \
382+
-G Ninja
383+
- run: cmake --build build
384+
- run: cmake --install build --prefix /tmp
372385

373386
mingw-use-gas:
374-
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
375-
needs: linux-no-asm
376-
runs-on: windows-2022
377-
defaults:
378-
run:
379-
shell: bash
380-
steps:
381-
- uses: actions/checkout@v4
382-
- uses: actions/setup-python@v5
383-
with:
384-
python-version: '3.11'
385-
- run: |
386-
cmake -S. -B build \
387-
-D UPDATE_DEPS=ON \
388-
-D CMAKE_BUILD_TYPE=Release \
389-
-D BUILD_WERROR=ON \
390-
-D USE_GAS=ON \
391-
-G Ninja
392-
- run: cmake --build build
393-
- run: cmake --install build --prefix /tmp
387+
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
388+
needs: linux-no-asm
389+
runs-on: windows-2022
390+
timeout-minutes: 30
391+
defaults:
392+
run:
393+
shell: bash
394+
steps:
395+
- uses: actions/checkout@v4
396+
- uses: actions/setup-python@v5
397+
with:
398+
python-version: '3.11'
399+
- run: |
400+
cmake -S. -B build \
401+
-D UPDATE_DEPS=ON \
402+
-D CMAKE_BUILD_TYPE=Release \
403+
-D BUILD_WERROR=ON \
404+
-D USE_GAS=ON \
405+
-G Ninja
406+
- run: cmake --build build
407+
- run: cmake --install build --prefix /tmp
394408

395409
mingw-no-asm:
396-
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
397-
needs: linux-no-asm
398-
runs-on: windows-2022
399-
defaults:
400-
run:
401-
shell: bash
402-
steps:
403-
- uses: actions/checkout@v4
404-
- uses: actions/setup-python@v5
405-
with:
406-
python-version: '3.11'
407-
# Make sure this doesn't fail even without explicitly setting '-D USE_MASM=OFF' and without uasm
408-
- run: |
409-
cmake -S. -B build \
410-
-D UPDATE_DEPS=ON \
411-
-D CMAKE_BUILD_TYPE=Release \
412-
-D BUILD_WERROR=ON \
413-
-G Ninja
414-
- run: cmake --build build
415-
- run: cmake --install build --prefix /tmp
410+
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
411+
needs: linux-no-asm
412+
runs-on: windows-2022
413+
timeout-minutes: 30
414+
defaults:
415+
run:
416+
shell: bash
417+
steps:
418+
- uses: actions/checkout@v4
419+
- uses: actions/setup-python@v5
420+
with:
421+
python-version: '3.11'
422+
# Make sure this doesn't fail even without explicitly setting '-D USE_MASM=OFF' and without uasm
423+
- run: |
424+
cmake -S. -B build \
425+
-D UPDATE_DEPS=ON \
426+
-D CMAKE_BUILD_TYPE=Release \
427+
-D BUILD_WERROR=ON \
428+
-G Ninja
429+
- run: cmake --build build
430+
- run: cmake --install build --prefix /tmp
416431

417432
mingw-no-asm-explicit:
418-
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
419-
needs: linux-no-asm
420-
runs-on: windows-2022
421-
defaults:
422-
run:
423-
shell: bash
424-
steps:
425-
- uses: actions/checkout@v4
426-
- run: |
427-
cmake -S. -B build \
428-
-D UPDATE_DEPS=ON \
429-
-D CMAKE_BUILD_TYPE=Release \
430-
-D BUILD_WERROR=ON \
431-
-D USE_MASM=OFF \
432-
-G Ninja
433-
- run: cmake --build build
434-
- run: cmake --install build --prefix /tmp
433+
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
434+
needs: linux-no-asm
435+
runs-on: windows-2022
436+
timeout-minutes: 30
437+
defaults:
438+
run:
439+
shell: bash
440+
steps:
441+
- uses: actions/checkout@v4
442+
- run: |
443+
cmake -S. -B build \
444+
-D UPDATE_DEPS=ON \
445+
-D CMAKE_BUILD_TYPE=Release \
446+
-D BUILD_WERROR=ON \
447+
-D USE_MASM=OFF \
448+
-G Ninja
449+
- run: cmake --build build
450+
- run: cmake --install build --prefix /tmp

0 commit comments

Comments
 (0)