Skip to content

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

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
Contributor

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

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
Contributor

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.

strategy:
matrix:
platform: [windows, ubuntu, macos]
platform: [windows, ubuntu]
Copy link
Contributor

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
Contributor

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
Contributor

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
@marty-johnson59
Copy link
Contributor

Merging - 3 approvals

@marty-johnson59 marty-johnson59 merged commit c6291b8 into KhronosGroup:main Dec 12, 2024
18 checks passed
@SaschaWillems
Copy link
Collaborator

Not sure if this did improve anything. Before this PR, builds took ~3h 30m, while the last build (from today) took ~3h 47m (actually slower).

@spencer-lunarg
Copy link
Contributor Author

spencer-lunarg commented Dec 17, 2024

Not sure if this did improve anything

The idea was not to speed up build time, the goal was to not waste minutes on things that are going to fail (bad PRs)

so if someone pushes up a bad PR, it will fail the cheap actions first and not waste the minutes on the expensive runs (aka the Mac runs)

@spencer-lunarg spencer-lunarg deleted the spencer-lunarg-ci branch December 17, 2024 00:13
@spencer-lunarg
Copy link
Contributor Author

an example of it working

https://github.com/KhronosGroup/Vulkan-Samples/actions/runs/12327204395

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