|
|
|
@@ -27,16 +27,18 @@
|
|
|
|
|
# jobs, so they never wait behind a build). For pushes to main and the merge queue only, the
|
|
|
|
|
# repository checks, Clippy, the doc tests, the reference tests and all four test shards run on the
|
|
|
|
|
# self-hosted runners (`self-hosted-fast`, warm build directories via scripts/ci/warm-target.sh);
|
|
|
|
|
# a pull request runs them on GitHub's runners, so it never holds up the queue. Fork PRs' Linux
|
|
|
|
|
# jobs run on the isolated, ephemeral `self-hosted-untrusted` runners (no warm caches) when the
|
|
|
|
|
# PR number ends in 7, 8 or 9 (the rest of the fork PRs, and everything else, run on GitHub's
|
|
|
|
|
# runners, which have far more free slots).
|
|
|
|
|
# Where the test shards run on GitHub's runners, the test archive is built there too: the
|
|
|
|
|
# self-hosted machine has a newer glibc, so its binaries wouldn't start on ubuntu-24.04, while the
|
|
|
|
|
# a pull request runs them on Blacksmith's runners (blacksmith-<N>vcpu-ubuntu-2404, ephemeral
|
|
|
|
|
# VMs sized per job), so it never holds up the queue. Every fork PR's Linux jobs run there too.
|
|
|
|
|
# The self-hosted-untrusted pool (isolated gVisor boxes) is not routed to now; to use it again,
|
|
|
|
|
# send fork PR jobs to `self-hosted-untrusted` in the `runs-on` of the jobs that had it.
|
|
|
|
|
# Where the test shards run on Blacksmith's runners, the test archive is built there too: the
|
|
|
|
|
# self-hosted machine has a newer glibc, so its binaries wouldn't start on Ubuntu 24.04, while the
|
|
|
|
|
# archive runs there unchanged (same /home/runner/work checkout path). The self-hosted shards
|
|
|
|
|
# (main and the merge queue) skip the archive and build the tests in their warm build directories.
|
|
|
|
|
# Fork pull requests, the nightly run and Run workflow use GitHub's runners only; the self-hosted
|
|
|
|
|
# runners refuse any other job.
|
|
|
|
|
# Blacksmith's runners count as self-hosted to GitHub, so steps tell our machines apart by
|
|
|
|
|
# runner name (minisforum-*, ci-box-*), not by runner.environment. The Windows jobs run on
|
|
|
|
|
# GitHub's runners. The nightly run and Run workflow use Blacksmith's runners only; the
|
|
|
|
|
# self-hosted runners refuse any other job.
|
|
|
|
|
name: CI
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
@@ -77,7 +79,7 @@ jobs:
|
|
|
|
|
dependency-advisories:
|
|
|
|
|
name: Dependency advisories
|
|
|
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
|
|
|
timeout-minutes: 20
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
@@ -93,7 +95,7 @@ jobs:
|
|
|
|
|
# approved-for-ci either (the same skip, for the same reason).
|
|
|
|
|
if: (github.event_name != 'pull_request' || !github.event.pull_request.draft) && (github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci')
|
|
|
|
|
# Trusted runs (see the top of this file) use the self-hosted runners.
|
|
|
|
|
runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && 'self-hosted-light' || 'ubuntu-24.04' }}
|
|
|
|
|
runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && 'self-hosted-light' || 'blacksmith-4vcpu-ubuntu-2404' }}
|
|
|
|
|
permissions:
|
|
|
|
|
contents: read
|
|
|
|
|
# To ask whether the merge queue already tested a commit pushed to main.
|
|
|
|
@@ -109,8 +111,8 @@ jobs:
|
|
|
|
|
packages: ${{ steps.paths.outputs.packages }}
|
|
|
|
|
oracle: ${{ steps.paths.outputs.oracle }}
|
|
|
|
|
# The fast self-hosted runners are kept for main and the merge queue (the pre-merge gate);
|
|
|
|
|
# pull requests, same-repo ones included, take the GitHub-hosted or untrusted paths.
|
|
|
|
|
local: ${{ runner.environment == 'self-hosted' && github.event_name != 'pull_request' }}
|
|
|
|
|
# pull requests, same-repo ones included, run on Blacksmith's runners.
|
|
|
|
|
local: ${{ (startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-')) && github.event_name != 'pull_request' }}
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
|
with:
|
|
|
|
@@ -223,19 +225,18 @@ jobs:
|
|
|
|
|
checks:
|
|
|
|
|
name: Format and repository checks
|
|
|
|
|
if: (github.event_name != 'pull_request' || !github.event.pull_request.draft) && (github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci')
|
|
|
|
|
runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'self-hosted-fast' || 'ubuntu-24.04' }}
|
|
|
|
|
runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'self-hosted-fast' || 'blacksmith-4vcpu-ubuntu-2404' }}
|
|
|
|
|
timeout-minutes: 15
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
|
- name: Warm build directory (self-hosted runner)
|
|
|
|
|
if: runner.environment == 'self-hosted' && !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
|
|
|
|
|
if: (startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-'))
|
|
|
|
|
run: scripts/ci/warm-target.sh checks
|
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
with:
|
|
|
|
|
components: rustfmt
|
|
|
|
|
# The trusted self-hosted runners keep their build directory and Cargo home instead; the
|
|
|
|
|
# untrusted ones (fork pull requests) start empty and restore main's cache, read-only.
|
|
|
|
|
- if: runner.environment == 'github-hosted' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
|
|
|
|
|
# Our self-hosted runners keep their build directory and Cargo home instead.
|
|
|
|
|
- if: ${{ !(startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-')) }}
|
|
|
|
|
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
|
|
|
with:
|
|
|
|
|
key: repo-checks
|
|
|
|
@@ -266,14 +267,14 @@ jobs:
|
|
|
|
|
name: Quick compile
|
|
|
|
|
needs: changes
|
|
|
|
|
if: needs.changes.outputs.quick == 'true'
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-light' || 'ubuntu-24.04' }}
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-light' || 'blacksmith-8vcpu-ubuntu-2404' }}
|
|
|
|
|
timeout-minutes: 30
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
|
- name: Size parallel compiles to the job's memory
|
|
|
|
|
run: scripts/ci/build-jobs.sh
|
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
- if: runner.environment == 'github-hosted'
|
|
|
|
|
- if: ${{ !(startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-')) }}
|
|
|
|
|
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
|
|
|
with:
|
|
|
|
|
key: quick-compile
|
|
|
|
@@ -285,19 +286,18 @@ jobs:
|
|
|
|
|
name: Native Linux Clippy
|
|
|
|
|
needs: changes
|
|
|
|
|
if: needs.changes.outputs.native == 'true'
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-fast' || 'ubuntu-24.04' }}
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-fast' || 'blacksmith-16vcpu-ubuntu-2404' }}
|
|
|
|
|
timeout-minutes: 30
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
|
- name: Warm build directory (self-hosted runner)
|
|
|
|
|
if: runner.environment == 'self-hosted' && !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
|
|
|
|
|
if: (startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-'))
|
|
|
|
|
run: scripts/ci/warm-target.sh clippy
|
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
with:
|
|
|
|
|
components: clippy
|
|
|
|
|
# The trusted self-hosted runners keep their build directory and Cargo home instead; the
|
|
|
|
|
# untrusted ones (fork pull requests) start empty and restore main's cache, read-only.
|
|
|
|
|
- if: runner.environment == 'github-hosted' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
|
|
|
|
|
# Our self-hosted runners keep their build directory and Cargo home instead.
|
|
|
|
|
- if: ${{ !(startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-')) }}
|
|
|
|
|
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
|
|
|
with:
|
|
|
|
|
key: native-clippy
|
|
|
|
@@ -318,7 +318,7 @@ jobs:
|
|
|
|
|
# The self-hosted shards (main and the merge queue) build from their warm build directories
|
|
|
|
|
# instead: downloading the 3 GB archive took them longer than building.
|
|
|
|
|
if: needs.changes.outputs.native == 'true' && needs.changes.outputs.local != 'true'
|
|
|
|
|
runs-on: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (endsWith(format('{0}', github.event.pull_request.number), '7') || endsWith(format('{0}', github.event.pull_request.number), '8') || endsWith(format('{0}', github.event.pull_request.number), '9'))) && 'self-hosted-untrusted' || 'ubuntu-24.04' }}
|
|
|
|
|
runs-on: blacksmith-16vcpu-ubuntu-2404
|
|
|
|
|
# Fork builds compile inside gVisor on shared boxes; give them room to finish and upload.
|
|
|
|
|
timeout-minutes: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (endsWith(format('{0}', github.event.pull_request.number), '7') || endsWith(format('{0}', github.event.pull_request.number), '8') || endsWith(format('{0}', github.event.pull_request.number), '9'))) && 90 || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) && 60 || 45 }}
|
|
|
|
|
env:
|
|
|
|
@@ -365,7 +365,7 @@ jobs:
|
|
|
|
|
name: Native Linux tests (${{ matrix.shard }}/4)
|
|
|
|
|
needs: [changes, build-tests]
|
|
|
|
|
if: ${{ !cancelled() && needs.changes.outputs.native == 'true' && (needs.changes.outputs.local == 'true' || needs.build-tests.result == 'success') }}
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-fast' || ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (endsWith(format('{0}', github.event.pull_request.number), '7') || endsWith(format('{0}', github.event.pull_request.number), '8') || endsWith(format('{0}', github.event.pull_request.number), '9'))) && 'self-hosted-untrusted' || 'ubuntu-24.04') }}
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-fast' || 'blacksmith-8vcpu-ubuntu-2404' }}
|
|
|
|
|
timeout-minutes: 60
|
|
|
|
|
strategy:
|
|
|
|
|
fail-fast: false
|
|
|
|
@@ -382,7 +382,7 @@ jobs:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
|
- name: Install a software Vulkan driver (lavapipe)
|
|
|
|
|
# Preinstalled on the self-hosted runner, which has no sudo.
|
|
|
|
|
if: runner.environment == 'github-hosted'
|
|
|
|
|
if: ${{ !(startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-')) }}
|
|
|
|
|
run: |
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install -y --no-install-recommends mesa-vulkan-drivers libvulkan1
|
|
|
|
@@ -464,7 +464,7 @@ jobs:
|
|
|
|
|
name: Action matrix (${{ matrix.shard }}/16)
|
|
|
|
|
needs: build-tests
|
|
|
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
|
|
|
timeout-minutes: 55
|
|
|
|
|
strategy:
|
|
|
|
|
fail-fast: false
|
|
|
|
@@ -506,7 +506,7 @@ jobs:
|
|
|
|
|
name: Action matrix determinism
|
|
|
|
|
needs: build-tests
|
|
|
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
|
|
|
timeout-minutes: 45
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
@@ -528,7 +528,7 @@ jobs:
|
|
|
|
|
name: Property tests (many cases)
|
|
|
|
|
needs: build-tests
|
|
|
|
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
|
|
|
timeout-minutes: 60
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
@@ -552,7 +552,7 @@ jobs:
|
|
|
|
|
name: Doc tests
|
|
|
|
|
needs: changes
|
|
|
|
|
if: needs.changes.outputs.native == 'true'
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-fast' || 'ubuntu-24.04' }}
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-fast' || 'blacksmith-8vcpu-ubuntu-2404' }}
|
|
|
|
|
timeout-minutes: 45
|
|
|
|
|
env:
|
|
|
|
|
CARGO_INCREMENTAL: "0"
|
|
|
|
@@ -564,12 +564,11 @@ jobs:
|
|
|
|
|
- name: Size parallel compiles to the job's memory
|
|
|
|
|
run: scripts/ci/build-jobs.sh
|
|
|
|
|
- name: Warm build directory (self-hosted runner)
|
|
|
|
|
if: runner.environment == 'self-hosted' && !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
|
|
|
|
|
if: (startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-'))
|
|
|
|
|
run: scripts/ci/warm-target.sh doc-tests
|
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
# The trusted self-hosted runners keep their build directory and Cargo home instead; the
|
|
|
|
|
# untrusted ones (fork pull requests) start empty and restore main's cache, read-only.
|
|
|
|
|
- if: runner.environment == 'github-hosted' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
|
|
|
|
|
# Our self-hosted runners keep their build directory and Cargo home instead.
|
|
|
|
|
- if: ${{ !(startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-')) }}
|
|
|
|
|
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
|
|
|
with:
|
|
|
|
|
key: doc-tests
|
|
|
|
@@ -605,7 +604,7 @@ jobs:
|
|
|
|
|
name: Reference tests
|
|
|
|
|
needs: changes
|
|
|
|
|
if: needs.changes.outputs.oracle == 'true'
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-fast' || ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && (endsWith(format('{0}', github.event.pull_request.number), '7') || endsWith(format('{0}', github.event.pull_request.number), '8') || endsWith(format('{0}', github.event.pull_request.number), '9'))) && 'self-hosted-untrusted' || 'ubuntu-24.04') }}
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-fast' || 'blacksmith-8vcpu-ubuntu-2404' }}
|
|
|
|
|
timeout-minutes: 60
|
|
|
|
|
env:
|
|
|
|
|
CARGO_INCREMENTAL: "0"
|
|
|
|
@@ -617,12 +616,11 @@ jobs:
|
|
|
|
|
- name: Size parallel compiles to the job's memory
|
|
|
|
|
run: scripts/ci/build-jobs.sh
|
|
|
|
|
- name: Warm build directory (self-hosted runner)
|
|
|
|
|
if: runner.environment == 'self-hosted' && !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
|
|
|
|
|
if: (startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-'))
|
|
|
|
|
run: scripts/ci/warm-target.sh oracle
|
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
# The trusted self-hosted runners keep their build directory and Cargo home instead; the
|
|
|
|
|
# untrusted ones (fork pull requests) start empty and restore main's cache, read-only.
|
|
|
|
|
- if: runner.environment == 'github-hosted' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
|
|
|
|
|
# Our self-hosted runners keep their build directory and Cargo home instead.
|
|
|
|
|
- if: ${{ !(startsWith(runner.name, 'minisforum-') || startsWith(runner.name, 'ci-box-')) }}
|
|
|
|
|
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
|
|
|
with:
|
|
|
|
|
key: oracle
|
|
|
|
@@ -706,7 +704,7 @@ jobs:
|
|
|
|
|
name: ${{ github.event.action == 'labeled' && github.event.label.name != 'approved-for-ci' && 'ci (ignored label)' || 'ci' }}
|
|
|
|
|
needs: [changes, checks, quick-compile, clippy, build-tests, tests, doc-tests, oracle, windows-fxc, windows-startup]
|
|
|
|
|
if: always() && (github.event_name != 'pull_request' || !github.event.pull_request.draft) && (github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci')
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-light' || 'ubuntu-24.04' }}
|
|
|
|
|
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-light' || 'blacksmith-4vcpu-ubuntu-2404' }}
|
|
|
|
|
steps:
|
|
|
|
|
- name: Verify required checks
|
|
|
|
|
env:
|
|
|
|
@@ -750,7 +748,7 @@ jobs:
|
|
|
|
|
wasm:
|
|
|
|
|
name: Compile WebAssembly (manual)
|
|
|
|
|
if: github.event_name == 'workflow_dispatch' && inputs.cross_compile
|
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
|
runs-on: blacksmith-8vcpu-ubuntu-2404
|
|
|
|
|
timeout-minutes: 30
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
@@ -766,7 +764,7 @@ jobs:
|
|
|
|
|
riscv64-gates:
|
|
|
|
|
name: Compile RISC-V (manual)
|
|
|
|
|
if: github.event_name == 'workflow_dispatch' && inputs.cross_compile
|
|
|
|
|
runs-on: ubuntu-24.04
|
|
|
|
|
runs-on: blacksmith-8vcpu-ubuntu-2404
|
|
|
|
|
timeout-minutes: 30
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
|