Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spencer-lunarg
Copy link
Contributor

Recently we have found productivity slow down in other KhronosGroups repos because it can take hours for CI to run due to running out of Github Actions minutes. We have found that MacOS/iOS are charged as 10x the minute cost which really starts to add up. The goal is to not have those expensive CI actions run unless we know other things work first.

Also there are many variations of MacOS being built, I would like to know if anyone has actually seen where only the Debug MacOS build fails, but everything else passes. I realize it seems great to test every combination, but unfortunately we have finite CI resources currently

(There is an internal issue on this, but for short term, I have just been apply these types of YAML chanegs aroudn the repos https://gitlab.khronos.org/khronos-general/khronos-issues/-/issues/127)

@CLAassistant
Copy link

CLAassistant commented Nov 5, 2024

CLA assistant check
All committers have signed the CLA.

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-ci branch 2 times, most recently from b20973a to 59d1989 Compare November 5, 2024 05:05
@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how this looks in practice

image

Copy link
Collaborator

Choose a reason for hiding this comment

The 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)

Copy link
Collaborator

Choose a reason for hiding this comment

The 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)

Wouldn't that cause problems for PRs? How would people know if their changes would break iOS/Mac?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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]
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

- name: Configure
run: cmake -B"build/${{ matrix.platform }}" -DVKB_BUILD_TESTS=ON

- name: "Build Components ${{ matrix.platform }} in ${{ matrix.build_type }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these three steps to the existing build pipeline please. That would preserve running unit tests. This should be a fast operation.

@@ -15,7 +15,7 @@ jobs:
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
strategy:
matrix:
platform: [windows, ubuntu, macos]
platform: [windows, ubuntu]
Copy link
Collaborator

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 )

Copy link
Collaborator

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

Copy link
Contributor Author

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?

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"

@SaschaWillems SaschaWillems added the build This is relevant to the build system label Nov 6, 2024
@tomadamatkinson
Copy link
Collaborator

tomadamatkinson commented Nov 19, 2024

Hey @spencer-lunarg can you rebase this. I think that will fix the antora check and we can get this merged. I will then follow with a PR that re enables macos in the same style as your IOS change

Currently we are still burning minutes

@spencer-lunarg
Copy link
Contributor Author

Hey @spencer-lunarg can you rebase this

done

@SaschaWillems SaschaWillems self-requested a review December 2, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build This is relevant to the build system Expedite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants