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 a1e5bd7
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 46 deletions.
62 changes: 60 additions & 2 deletions .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,11 +164,13 @@ 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:
matrix:
build_type: [Debug]
build_type: [Release]

steps:
- uses: actions/checkout@v4
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/v2.yml

This file was deleted.

0 comments on commit a1e5bd7

Please sign in to comment.