Skip to content

Commit c6291b8

Browse files
ci: Reduce CI to unblock Github Action minutes (#1217)
Co-authored-by: sjfricke <spencerfricke@gmail.com>
1 parent 3751770 commit c6291b8

File tree

2 files changed

+61
-46
lines changed

2 files changed

+61
-46
lines changed

.github/workflows/build.yml

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
1616
strategy:
1717
matrix:
18-
platform: [windows, ubuntu, macos]
18+
platform: [windows, ubuntu]
1919
build_type: [Debug, Release]
2020
env:
2121
PARALLEL: -j 2
@@ -55,6 +55,63 @@ jobs:
5555
cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON
5656
cmake --build "build/${{ matrix.platform }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
5757
58+
build_v2:
59+
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
60+
strategy:
61+
matrix:
62+
platform: [windows, ubuntu]
63+
build_type: [Release]
64+
env:
65+
PARALLEL: -j 2
66+
runs-on: "${{ matrix.platform }}-latest"
67+
steps:
68+
- uses: actions/checkout@v4
69+
with:
70+
submodules: "recursive"
71+
72+
- if: ${{ matrix.platform == 'ubuntu' }}
73+
name: Install RandR headers
74+
run: |
75+
sudo apt-get update
76+
sudo apt install xorg-dev libglu1-mesa-dev
77+
78+
- name: Configure
79+
run: cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON
80+
81+
- name: "Build Components ${{ matrix.platform }} in ${{ matrix.build_type }}"
82+
run: cmake --build "build/${{ matrix.platform }}" --target vkb__components --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
83+
84+
- name: "Build Tests ${{ matrix.platform }} in ${{ matrix.build_type }}"
85+
run: cmake --build "build/${{ matrix.platform }}" --target vkb__tests --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
86+
87+
- name: "Run Tests ${{ matrix.platform }} in ${{ matrix.build_type }}"
88+
run: ctest -C ${{ matrix.build_type }} --test-dir "build/${{ matrix.platform }}" --output-on-failure
89+
90+
build_macos:
91+
needs: build
92+
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
93+
strategy:
94+
# masoc is 10x expensive to run on GitHub machines, so only build simplest variations
95+
matrix:
96+
platform: [macos]
97+
# Release builds are about 3 times faster than debug builds
98+
build_type: [Release]
99+
env:
100+
PARALLEL: -j 2
101+
runs-on: "${{ matrix.platform }}-latest"
102+
steps:
103+
- uses: actions/checkout@v4
104+
with:
105+
submodules: "recursive"
106+
- name: ccache
107+
uses: hendrikmuhs/ccache-action@v1.2.9
108+
with:
109+
key: ${{ github.job }}-${{ matrix.os }}
110+
- name: Configure and build
111+
run: |
112+
cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON
113+
cmake --build "build/${{ matrix.platform }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
114+
58115
build_d2d:
59116
name: "Build Ubuntu with Direct To Display"
60117
env:
@@ -108,11 +165,13 @@ jobs:
108165
run: NDK_CCACHE=1 NDK_CCACHE_BIN=ccache ./gradlew app:assemble${{ matrix.build_type }} --info
109166

110167
build_ios:
168+
# iOS is 10x expensive to run on GitHub machines, so only run if we know something else fast/simple passed as well
169+
needs: build
111170
name: "Build ios in ${{ matrix.build_type }}"
112171
runs-on: macos-latest
113172
strategy:
114173
matrix:
115-
build_type: [Debug]
174+
build_type: [Release]
116175

117176
steps:
118177
- uses: actions/checkout@v4

.github/workflows/v2.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)