Skip to content

Commit 4775d54

Browse files
Add 30 minute timeout to github actions
1 parent 0817c63 commit 4775d54

File tree

1 file changed

+119
-103
lines changed

1 file changed

+119
-103
lines changed

.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++} ]
@@ -74,6 +75,7 @@ jobs:
7475

7576
codegen:
7677
runs-on: ubuntu-latest
78+
timeout-minutes: 30
7779
steps:
7880
- uses: actions/checkout@v4
7981
- run: scripts/update_deps.py --dir ext --no-build
@@ -82,6 +84,7 @@ jobs:
8284
linux-no-asm:
8385
needs: codegen
8486
runs-on: ubuntu-24.04
87+
timeout-minutes: 30
8588
steps:
8689
- uses: actions/checkout@v4
8790
- run: sudo apt update
@@ -102,6 +105,7 @@ jobs:
102105
linux-32:
103106
needs: codegen
104107
runs-on: ubuntu-24.04
108+
timeout-minutes: 30
105109
strategy:
106110
matrix:
107111
config: [ Debug, Release ]
@@ -140,6 +144,7 @@ jobs:
140144
linux-32-no-asm:
141145
needs: codegen
142146
runs-on: ubuntu-24.04
147+
timeout-minutes: 30
143148
steps:
144149
- uses: actions/checkout@v4
145150
- uses: actions/setup-python@v5
@@ -175,6 +180,7 @@ jobs:
175180
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
176181
needs: linux-no-asm
177182
runs-on: windows-latest
183+
timeout-minutes: 30
178184
strategy:
179185
matrix:
180186
arch: [ Win32, x64 ]
@@ -196,6 +202,7 @@ jobs:
196202
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
197203
needs: linux-no-asm
198204
runs-on: windows-latest
205+
timeout-minutes: 30
199206
strategy:
200207
matrix:
201208
arch: [ Win32, x64 ]
@@ -215,13 +222,14 @@ jobs:
215222
# Test both clang and clang-cl (Chromium project uses clang-cl)
216223
windows_clang:
217224
# windows is 2x expensive to run on GitHub machines, so only run if we know something else simple passed as well
218-
needs: linux-no-asm
219-
runs-on: windows-2022
220-
strategy:
221-
matrix:
222-
compiler: [ clang, clang-cl ]
223-
config: [ Debug, Release ]
224-
steps:
225+
needs: linux-no-asm
226+
runs-on: windows-2022
227+
timeout-minutes: 30
228+
strategy:
229+
matrix:
230+
compiler: [ clang, clang-cl ]
231+
config: [ Debug, Release ]
232+
steps:
225233
- uses: actions/checkout@v4
226234
- uses: ilammy/msvc-dev-cmd@v1
227235
- run: |
@@ -241,6 +249,7 @@ jobs:
241249
# Mac is 10x expensive to run on GitHub machines, so only run if we know something else passed as well
242250
needs: windows_clang
243251
runs-on: macos-13
252+
timeout-minutes: 30
244253
strategy:
245254
matrix:
246255
config: [ Debug, Release ]
@@ -267,14 +276,15 @@ jobs:
267276
- run: ctest --parallel --output-on-failure --test-dir build/
268277

269278
apple-cross-compile:
270-
# Mac is 10x expensive to run on GitHub machines, so only run if we know something else passed as well
271-
needs: windows_clang
272-
name: ${{ matrix.CMAKE_SYSTEM_NAME }}
273-
runs-on: macos-13
274-
strategy:
275-
matrix:
276-
CMAKE_SYSTEM_NAME: [ iOS, tvOS ]
277-
steps:
279+
# Mac is 10x expensive to run on GitHub machines, so only run if we know something else passed as well
280+
needs: windows_clang
281+
name: ${{ matrix.CMAKE_SYSTEM_NAME }}
282+
runs-on: macos-13
283+
timeout-minutes: 30
284+
strategy:
285+
matrix:
286+
CMAKE_SYSTEM_NAME: [ iOS, tvOS ]
287+
steps:
278288
- uses: actions/checkout@v4
279289
- uses: actions/setup-python@v5
280290
with:
@@ -303,6 +313,7 @@ jobs:
303313
needs: windows_clang
304314
name: "Universal Binary Testing (STATIC ${{ matrix.static }}) w/ ${{ matrix.generator }}"
305315
runs-on: macos-latest
316+
timeout-minutes: 30
306317
strategy:
307318
matrix:
308319
static: [ 'ON', 'OFF' ]
@@ -333,99 +344,104 @@ jobs:
333344
vtool -show-build /tmp/lib/libvulkan.dylib | grep 'architecture arm64'
334345
335346
chromium:
336-
needs: codegen
337-
runs-on: ubuntu-latest
338-
steps:
339-
- uses: actions/checkout@v4
340-
- run: scripts/gn/gn.py
347+
needs: codegen
348+
runs-on: ubuntu-latest
349+
timeout-minutes: 30
350+
steps:
351+
- uses: actions/checkout@v4
352+
- run: scripts/gn/gn.py
341353

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

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

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

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

0 commit comments

Comments
 (0)