diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caaed2ff76b..a769fa92a5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ env: RUSTFLAGS: -D warnings jobs: ci: - runs-on: [self-hosted, linux, arm64] + runs-on: ubicloud-standard-16-arm timeout-minutes: 360 steps: - name: Checkout @@ -63,14 +63,14 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins) 2>&1 | tee "$BUILD_LOG"; then + if ! (cargo build -p v1-compiler --release --features text_lookup_work_counter --bins) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" RETRY_LOG=$(mktemp) - if ! ( CARGO_BUILD_JOBS=1 "$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins ) 2>&1 | tee "$RETRY_LOG"; then + if ! ( CARGO_BUILD_JOBS=1 cargo build -p v1-compiler --release --features text_lookup_work_counter --bins ) 2>&1 | tee "$RETRY_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$RETRY_LOG"; then echo "::warning::cargo/sccache still failing; retry without RUSTC_WRAPPER" - env -u RUSTC_WRAPPER CARGO_BUILD_JOBS=1 "$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins || exit 1 + env -u RUSTC_WRAPPER CARGO_BUILD_JOBS=1 cargo build -p v1-compiler --release --features text_lookup_work_counter --bins || exit 1 else exit 1 fi @@ -98,7 +98,7 @@ jobs: git fetch --no-tags origin main "$ROOT/target/release/gunbc" run --source-root dsl --source-root src/v2 --entry dsl/tools/merge_admission_gate.dag --function main rust_tests: - runs-on: [self-hosted, linux, arm64] + runs-on: ubicloud-standard-16-arm timeout-minutes: 360 steps: - name: Checkout @@ -152,14 +152,14 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins) 2>&1 | tee "$BUILD_LOG"; then + if ! (cargo build -p v1-compiler --release --features text_lookup_work_counter --bins) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" RETRY_LOG=$(mktemp) - if ! ( CARGO_BUILD_JOBS=1 "$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins ) 2>&1 | tee "$RETRY_LOG"; then + if ! ( CARGO_BUILD_JOBS=1 cargo build -p v1-compiler --release --features text_lookup_work_counter --bins ) 2>&1 | tee "$RETRY_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$RETRY_LOG"; then echo "::warning::cargo/sccache still failing; retry without RUSTC_WRAPPER" - env -u RUSTC_WRAPPER CARGO_BUILD_JOBS=1 "$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins || exit 1 + env -u RUSTC_WRAPPER CARGO_BUILD_JOBS=1 cargo build -p v1-compiler --release --features text_lookup_work_counter --bins || exit 1 else exit 1 fi @@ -199,7 +199,7 @@ jobs: if [ -x "$BIN" ]; then "$BIN" --measure-cgroup-peak; else echo "[measurement] cgroup peak: unavailable (claim_executor not built)"; fi if: always() deploy_dashboard_srv1: - runs-on: [self-hosted, linux, arm64] + runs-on: ubicloud-standard-16-arm needs: [ci] timeout-minutes: 360 if: github.ref == 'refs/heads/main' && github.event_name == 'push' @@ -247,14 +247,14 @@ jobs: ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd) set -o pipefail BUILD_LOG=$(mktemp) - if ! ("$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins) 2>&1 | tee "$BUILD_LOG"; then + if ! (cargo build -p v1-compiler --release --features text_lookup_work_counter --bins) 2>&1 | tee "$BUILD_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$BUILD_LOG"; then echo "::warning::cargo/sccache EAGAIN under fleet pressure; cold retry CARGO_BUILD_JOBS=1 (keep sccache)" RETRY_LOG=$(mktemp) - if ! ( CARGO_BUILD_JOBS=1 "$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins ) 2>&1 | tee "$RETRY_LOG"; then + if ! ( CARGO_BUILD_JOBS=1 cargo build -p v1-compiler --release --features text_lookup_work_counter --bins ) 2>&1 | tee "$RETRY_LOG"; then if grep -qiE 'Resource temporarily unavailable|failed to spawn|sccache: encountered fatal error|(exit status: 254)|sccache: error: failed to execute compile' "$RETRY_LOG"; then echo "::warning::cargo/sccache still failing; retry without RUSTC_WRAPPER" - env -u RUSTC_WRAPPER CARGO_BUILD_JOBS=1 "$CARGO_HOME/bin/cargo" build -p v1-compiler --release --features text_lookup_work_counter --bins || exit 1 + env -u RUSTC_WRAPPER CARGO_BUILD_JOBS=1 cargo build -p v1-compiler --release --features text_lookup_work_counter --bins || exit 1 else exit 1 fi diff --git a/dsl/gunbc/ci_spec.dag b/dsl/gunbc/ci_spec.dag index 7032890dfe2..dcdcd2df9f7 100644 --- a/dsl/gunbc/ci_spec.dag +++ b/dsl/gunbc/ci_spec.dag @@ -83,7 +83,7 @@ fn ci_repo_root_shell() -> String { fn ci_release_build_line() -> String { concat( concat( - "\"$CARGO_HOME/bin/cargo\" build -p v1-compiler --release --features ", + "cargo build -p v1-compiler --release --features ", ci_release_features ), " --bins" diff --git a/dsl/gunbc/runner_spec_from_offer.dag b/dsl/gunbc/runner_spec_from_offer.dag index 83ed260e891..af533b6376f 100644 --- a/dsl/gunbc/runner_spec_from_offer.dag +++ b/dsl/gunbc/runner_spec_from_offer.dag @@ -1,6 +1,6 @@ module gunbc.runner_spec_from_offer -import extdeps.github.actions { RunnerSpec, SelfHosted } +import extdeps.github.actions { RunnerSpec, SelfHosted, RunsOnExpression } import gunbc.ci_fleet { ComputeOffer, gunbc_ci_fleet_offer } import gunbc.fleet_intent { compute_host_primary_cpu } import extdeps.cpu { cpu_facts_architecture } @@ -47,6 +47,8 @@ fn runner_spec_from_offer(offer: ComputeOffer) -> RunnerSpec { } } +data gunbc_ci_ubicloud_runner_label: String = "ubicloud-standard-16-arm" + fn gunbc_ci_runner_spec() -> RunnerSpec { - runner_spec_from_offer(offer: gunbc_ci_fleet_offer) + RunsOnExpression { expression: gunbc_ci_ubicloud_runner_label } } diff --git a/dsl/test/claim/ci_runner_seam_witness_test.dag b/dsl/test/claim/ci_runner_seam_witness_test.dag index f997df75a6e..c11c37b3e89 100644 --- a/dsl/test/claim/ci_runner_seam_witness_test.dag +++ b/dsl/test/claim/ci_runner_seam_witness_test.dag @@ -1,38 +1,28 @@ module test.claim.ci_runner_seam_witness -import gunbc.ci_fleet { gunbc_ci_fleet_offer } -import gunbc.runner_spec_from_offer { runner_spec_from_offer, gunbc_ci_runner_spec } +import gunbc.runner_spec_from_offer { gunbc_ci_runner_spec, gunbc_ci_ubicloud_runner_label } import gunbc.ci_workflow { ci_workflow } import gunbc.ci_yaml_emit { expected_ci_yml } -import extdeps.github.actions { SelfHosted } +import extdeps.github.actions { RunsOnExpression } -fn witness_ci_runner_spec_derives_from_fleet_offer() -> Bool { - gunbc_ci_runner_spec() == runner_spec_from_offer(offer: gunbc_ci_fleet_offer) +fn witness_ci_runner_spec_is_ubicloud_hosted() -> Bool { + match gunbc_ci_runner_spec() { + RunsOnExpression { expression: e } => e == gunbc_ci_ubicloud_runner_label + _ => false + } } -fn witness_ci_workflow_runner_matches_fleet_offer() -> Bool { +fn witness_ci_workflow_runner_matches_spec() -> Bool { ci_workflow.jobs.first().runner == gunbc_ci_runner_spec() } -fn witness_ci_yaml_runs_on_projects_fleet_labels() -> Bool { +fn witness_ci_yaml_runs_on_projects_ubicloud_label() -> Bool { let yaml = expected_ci_yml() - string_contains(s: yaml, pattern: " runs-on: [self-hosted, linux, arm64]") -} - -fn witness_ci_runner_spec_is_self_hosted_arm64_linux() -> Bool { - match gunbc_ci_runner_spec() { - SelfHosted { labels: ls } => - ls.length() == 3 - && ls.first() == "self-hosted" - && ls.skip(n: 1).first() == "linux" - && ls.skip(n: 2).first() == "arm64" - _ => false - } + string_contains(s: yaml, pattern: " runs-on: ubicloud-standard-16-arm") } test fn ci_runner_seam_holds() -> Bool { - witness_ci_runner_spec_derives_from_fleet_offer() - && witness_ci_workflow_runner_matches_fleet_offer() - && witness_ci_yaml_runs_on_projects_fleet_labels() - && witness_ci_runner_spec_is_self_hosted_arm64_linux() + witness_ci_runner_spec_is_ubicloud_hosted() + && witness_ci_workflow_runner_matches_spec() + && witness_ci_yaml_runs_on_projects_ubicloud_label() }