diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index 2c98a1a502..c2191bd454 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -16,9 +16,21 @@ on: description: only this case, for example discourse-bundler (optional) type: string default: "" + cli_artifact: + description: BoringCache artifact id of a candidate CLI to run instead of the pinned release; never recorded (optional) + type: string + default: "" + cli_jsonl: + description: keep BoringCache CLI JSONL in each job's results artifact; never recorded + type: boolean + default: false run-name: Dependency cache update step ${{ inputs.step }}${{ inputs.case && format(' {0}', inputs.case) || '' }}${{ inputs.mode == 'preflight' && ' (preflight)' || '' }} +env: + CANDIDATE_CLI_ARTIFACT: ${{ inputs.cli_artifact }} + BORINGCACHE_OBSERVABILITY_JSONL_PATH: ${{ inputs.cli_jsonl && format('{0}/deps-results/boringcache.jsonl', github.workspace) || '' }} + concurrency: group: cache-deps cancel-in-progress: false @@ -133,7 +145,7 @@ jobs: publish: needs: [plan, seed, update, verify] - if: ${{ !cancelled() && needs.plan.result == 'success' && github.ref == 'refs/heads/main' && inputs.mode == 'run' }} + if: ${{ !cancelled() && needs.plan.result == 'success' && github.ref == 'refs/heads/main' && inputs.mode == 'run' && inputs.cli_artifact == '' && !inputs.cli_jsonl }} runs-on: ubuntu-24.04 permissions: contents: write diff --git a/deps/plan.toml b/deps/plan.toml index e455111b66..97e925dcbb 100644 --- a/deps/plan.toml +++ b/deps/plan.toml @@ -47,3 +47,19 @@ steps = [["bab418487a463eede4c7d2f6415fe2eb966a3883", "bbb722e4322eba62306788b6d BUNDLE_PATH = "vendor/bundle" BUNDLE_DEPLOYMENT = "true" BUNDLE_WITHOUT = "development" + +[cases.mastodon-bundler] +repo = "mastodon/mastodon" +tool = "bundler" +ruby = "4.0.7" +lockfile = "Gemfile.lock" +path = "upstream/vendor/bundle" +apt = ["libpq-dev", "libicu-dev", "libidn-dev", "libyaml-dev"] +install = "bundle install --jobs 4" +check = "bundle check" +steps = [["85cc1449181c774a226ae42ec19dca3a2f7cce26", "bcbf3651da6d2e9d9e7966e8e97fb59bbe7665e0"]] + +[cases.mastodon-bundler.env] +BUNDLE_PATH = "vendor/bundle" +BUNDLE_DEPLOYMENT = "true" +BUNDLE_WITHOUT = "development" diff --git a/scripts/install-boringcache.sh b/scripts/install-boringcache.sh index d7fa0cafb4..41f353ddfa 100644 --- a/scripts/install-boringcache.sh +++ b/scripts/install-boringcache.sh @@ -14,4 +14,11 @@ cd "$dir" curl --fail --silent --show-error --location --retry 3 --remote-name-all "$base/SHA256SUMS" "$base/$asset" grep " $asset\$" SHA256SUMS | sha256sum --check install -m 0755 "$asset" "$dir/boringcache" +if [ -n "${CANDIDATE_CLI_ARTIFACT:-}" ]; then + candidate="$RUNNER_TEMP/boringcache-candidate" + "$dir/boringcache" ci run --oidc-provider github-actions -- \ + "$dir/boringcache" artifact pull "$CANDIDATE_CLI_ARTIFACT" "$candidate" --workspace boringcache/benchmarks + install -m 0755 "$candidate/$asset" "$dir/boringcache" + "$dir/boringcache" --version +fi echo "$dir" >> "$GITHUB_PATH"