-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Reduce CI to unblock Github Action minutes #1217
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -55,6 +55,63 @@ 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] | ||
# Release builds are about 3 times faster than debug builds | ||
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: | ||
|
@@ -108,11 +165,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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could potentially move IOS to only run on main as well (see below for macos comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Wouldn't that cause problems for PRs? How would people know if their changes would break iOS/Mac? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think changing from Debug to Release will help a lot of build times. Also just making sure we are not running it unless others are passing is huge... so ya, maybe worth just keeping it for now |
||
name: "Build ios in ${{ matrix.build_type }}" | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
build_type: [Debug] | ||
build_type: [Release] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Release builds are about 3 times faster, this build is currently around 20+ minutes and should reduce it greatly |
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we can keep MacOS once merged?
Keep it in the matrix but add an if statement to the job to only run macos on main
Not sure what this would be in practice but something like
if !macos or ( macos and branch == main )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could follow with a PR to add this if it becomes an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that, but wasn't sure what people would think, @tomadamatkinson could you make a seperate PR with how you would do it, I think you probably know what you want better, this PR was more of a "here is a way to improve things"