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

Switch some workflows to use container: instead of docker_run.sh. #18252

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

ScottTodd
Copy link
Member

Progress on #15332 and #18238 .

The build_tools/docker/docker_run.sh script does a bunch of weird/hacky setup, including setup for gcloud (for working with GCP) and Bazel-specific Docker workarounds. Most CMake builds can just use a container for the entire workflow (https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/running-jobs-in-a-container). Note that GitHub in its infinite wisdom changed the default shell just for jobs that run in a container, from bash to sh, so we flip it back.

These jobs run nightly on GitHub-hosted runners, so I tested here:

(Those jobs should also run on this PR, but they'll take a while)

skip-ci: no impact on other workflows

@ScottTodd ScottTodd added infrastructure Relating to build systems, CI, or testing cleanup 🧹 labels Aug 16, 2024
@ScottTodd ScottTodd requested review from benvanik and marbre August 16, 2024 16:21
@@ -28,13 +28,14 @@ concurrency:
jobs:
linux_x64_clang_byollvm:
runs-on: ubuntu-20.04
container: gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446
Copy link
Member Author

Choose a reason for hiding this comment

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

I have similar changes planned for workflows like https://github.com/iree-org/iree/blob/main/.github/workflows/ci_linux_x64_clang_tsan.yml, but those aren't as simple... something about docker_run.sh seems to be load bearing there when it shouldn't be.

Copy link
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

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

With the assumption that CI - Linux x64 gcc will pass, this is good to merge :)

@ScottTodd
Copy link
Member Author

With the assumption that CI - Linux x64 gcc will pass, this is good to merge :)

Yeah I can just wait the 4 hours until the jobs on this PR finish before merging.

@marbre
Copy link
Member

marbre commented Aug 16, 2024

I think it is fair to be confident enough that it will pass :)

@ScottTodd ScottTodd merged commit f1319fc into iree-org:main Aug 16, 2024
24 checks passed
@ScottTodd ScottTodd deleted the infra-docker-run-workflows branch August 16, 2024 20:04
ScottTodd added a commit that referenced this pull request Aug 19, 2024
Progress on #15332 and
#18238 .

Similar to #18252, this drops a
dependency on the
[`build_tools/docker/docker_run.sh`](https://github.com/iree-org/iree/blob/main/build_tools/docker/docker_run.sh)
script. Unlike that PR, this goes a step further and also stops using
[`build_tools/cmake/build_all.sh`](https://github.com/iree-org/iree/blob/main/build_tools/cmake/build_all.sh).

Functional changes:
* No more building `iree-test-deps`
* We only get marginal value out of compiling test files using a debug
compiler
* Those tests are on the path to being moved to
https://github.com/iree-org/iree-test-suites
* No more ccache
* The debug build cache is too large for a local / GitHub Actions cache
* I want to limit our reliance on the remote cache at
`http://storage.googleapis.com/iree-sccache/ccache` (which uses GCP for
storage and needs GCP auth)
* Experiments show that this build is not significantly faster when
using a cache, or at least dropping `iree-test-deps` provides equivalent
time savings

Logs before:
https://github.com/iree-org/iree/actions/runs/10417779910/job/28864909582
(96% cache hits, 9 minute build but 19 minutes total, due to
`iree-test-deps`)
Logs after:
https://github.com/iree-org/iree/actions/runs/10423409599/job/28870060781?pr=18255
(no cache, 11 minute build)

ci-exactly: linux_x64_clang_debug

---------

Co-authored-by: Marius Brehler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup 🧹 infrastructure Relating to build systems, CI, or testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants