ci: move workflows onto org self-hosted runners - #382
Draft
loverustfs wants to merge 1 commit into
Draft
loverustfs wants to merge 1 commit into
loverustfs wants to merge 1 commit into
Conversation
Stop automatic GitHub-hosted Actions usage. Linux jobs run on sm-standard-2, sm-standard-4, or dind-sm-standard-2, with host tools installed that those images do not ship. macOS and Windows stay on GitHub-hosted runners and run only from workflow_dispatch. Co-authored-by: RustFS <hello@rustfs.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Stops GitHub-hosted (billed) Actions usage on automatic runs. There is no tracked issue for this change.
Problem
Every job in
.github/workflowsused a GitHub-hosted label (ubuntu-latest,macos-latest, orwindows-latest).ci.ymlran test and build on Ubuntu, macOS, and Windows for pushes tomain/developand for pull requests.integration.ymlalso runs on a daily cron. Tag pushes built macOS and Windows release binaries on GitHub-hosted runners.The org already has self-hosted Linux runners (
sm-standard-2,sm-standard-4,dind-sm-standard-2). It has no self-hosted macOS or Windows runners.Solution
Linux jobs now run on those org runners. Jobs that need a Docker daemon use
dind-sm-standard-2:cargo-deny-actionis a container action,crossbuilds run in Docker, integration tests start RustFS withdocker run, and the image workflow uses Buildx.The
sm-standardimages do not ship the C toolchain, CMake, or several tools that GitHub-hosted Ubuntu includes..github/actions/setup-self-hostedinstalls what each job actually needs (linker, CMake, Perl,libssl-devforaws-lc-sys; Python 3 and OpenSSL for the compatibility probes;fileandshasumfor packaging; GitHub CLI; AWS CLI v2 for R2). Test commands are unchanged.macOS and Windows are not cross-compiled:
cargo test/cargo buildmust execute on that OS. A Linux cross-compile would not run those tests. Windows coverage iscfg(windows)and would not be exercised.x86_64-apple-darwin,aarch64-apple-darwin) need the Apple SDK and linker, which are not on the Linux images.x86_64-pc-windows-msvc. A gnu or zig/xwin build would ship a different binary than the current artifact.Those jobs remain on
macos-latest/windows-latestand run only forworkflow_dispatch. Each one prints a warning that it is a billed, manual-only runner. Tag pushes build Linux artifacts only. Dispatching Build and Release still builds macOS and Windows and uploads them with the Linux artifacts. DEB/RPM packaging only needs the Linux musl archives, so tag-push packaging is unchanged.Pull requests cancel the previous run of the same PR (
ci.yml,integration.yml). Scheduled and push runs are not cancelled by that. Every job has a timeout.Runner group access
sm-standard-2,sm-standard-4, anddind-sm-standard-2are org runners. The runner group may not yet allowrustfs/cli. An org admin needs to grant this repository access to that group. Until then, these jobs will queue with no runner.Job runners
ubuntu-latestdind-sm-standard-2ubuntu-latestsm-standard-2ubuntu-latestsm-standard-4Test (ubuntu-latest)ubuntu-latestsm-standard-4Test (macos-latest)macos-latestmacos-latestTest (windows-latest)windows-latestwindows-latestBuild (ubuntu-latest)ubuntu-latestsm-standard-4Build (macos-latest)macos-latestmacos-latestBuild (windows-latest)windows-latestwindows-latestubuntu-latestsm-standard-4ubuntu-latestsm-standard-2ubuntu-latestsm-standard-4ubuntu-latestsm-standard-4ubuntu-latestdind-sm-standard-2ubuntu-latestdind-sm-standard-2ubuntu-latestsm-standard-4ubuntu-latestsm-standard-2ubuntu-latestsm-standard-2ubuntu-latestsm-standard-2ubuntu-latestsm-standard-2ubuntu-latestsm-standard-2ubuntu-latestsm-standard-2ubuntu-latestsm-standard-4ubuntu-latestdind-sm-standard-2cargo deny check advisoriessm-standard-2ubuntu-latestsm-standard-4ubuntu-latestdind-sm-standard-2crossneeds Dockerubuntu-latestsm-standard-4ubuntu-latestdind-sm-standard-2crossneeds Dockermacos-latestmacos-latestmacos-latestmacos-latestwindows-latestwindows-latestubuntu-latestsm-standard-4ubuntu-latestsm-standard-2ubuntu-latestubuntu-latestsm-standard-4ubuntu-latestdind-sm-standard-2No
ubuntu-*label remains.macos-latestandwindows-latestappear only on jobs thatworkflow_dispatchincludes.Branch protection
Linux check names changed from
Test (ubuntu-latest)/Build (ubuntu-latest)toTest (linux)/Build (linux). macOS and Windows checks are renamed with a, manualsuffix and are skipped on pull requests. If branch protection requires the old names, update it. A skipped required check is treated as success, so do not require the manual macOS/Windows checks if they should not gate merges.Test status
Workflow YAML parses, and the release matrix selector was executed locally: tag
pushemits only the four Linux targets;workflow_dispatchadds the three GitHub-hosted targets.cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspaceAll three passed on stable 1.98.1. These workflows were not executed on the org runners from this environment.