Skip to content

Commit

Permalink
ci: Reduce CI to unblock Github Action minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
sjfricke committed Nov 5, 2024
1 parent 96887d8 commit 59d1989
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 45 deletions.
60 changes: 59 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
strategy:
matrix:
platform: [windows, ubuntu, macos]
platform: [windows, ubuntu]
build_type: [Debug, Release]
env:
PARALLEL: -j 2
Expand Down Expand Up @@ -55,6 +55,62 @@ jobs:
cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON
cmake --build "build/${{ matrix.platform }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
build_v2:
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
strategy:
matrix:
platform: [windows, ubuntu]
build_type: [Release]
env:
PARALLEL: -j 2
runs-on: "${{ matrix.platform }}-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"

- if: ${{ matrix.platform == 'ubuntu' }}
name: Install RandR headers
run: |
sudo apt-get update
sudo apt install xorg-dev libglu1-mesa-dev
- name: Configure
run: cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON

- name: "Build Components ${{ matrix.platform }} in ${{ matrix.build_type }}"
run: cmake --build "build/${{ matrix.platform }}" --target vkb__components --config ${{ matrix.build_type }} ${{ env.PARALLEL }}

- name: "Build Tests ${{ matrix.platform }} in ${{ matrix.build_type }}"
run: cmake --build "build/${{ matrix.platform }}" --target vkb__tests --config ${{ matrix.build_type }} ${{ env.PARALLEL }}

- name: "Run Tests ${{ matrix.platform }} in ${{ matrix.build_type }}"
run: ctest -C ${{ matrix.build_type }} --test-dir "build/${{ matrix.platform }}" --output-on-failure

build_macos:
needs: build
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
strategy:
# masoc is 10x expensive to run on GitHub machines, so only build simplest variations
matrix:
platform: [macos]
build_type: [Release]
env:
PARALLEL: -j 2
runs-on: "${{ matrix.platform }}-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.os }}
- name: Configure and build
run: |
cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON -DVKB_BUILD_SAMPLES=ON
cmake --build "build/${{ matrix.platform }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
build_d2d:
name: "Build Ubuntu with Direct To Display"
env:
Expand Down Expand Up @@ -108,6 +164,8 @@ jobs:
run: NDK_CCACHE=1 NDK_CCACHE_BIN=ccache ./gradlew app:assemble${{ matrix.build_type }} --info

build_ios:
# iOS is 10x expensive to run on GitHub machines, so only run if we know something else fast/simple passed as well
needs: build
name: "Build ios in ${{ matrix.build_type }}"
runs-on: macos-latest
strategy:
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/v2.yml

This file was deleted.

0 comments on commit 59d1989

Please sign in to comment.