Lightweight coding agent that runs in your terminal
Rust
ci: keep argument comment lint checks materialized (#18926)
Michael Bolin03ae4db0f43d
diff --git a/.github/actions/run-argument-comment-lint/action.yml b/.github/actions/run-argument-comment-lint/action.ymlnew file mode 100644index 0000000000..80fb23d417--- /dev/null+++ b/.github/actions/run-argument-comment-lint/action.yml@@ -0,0 +1,54 @@+name: Run argument comment lint+description: Run argument-comment-lint on codex-rs via Bazel.++inputs:+ target:+ description: Runner target passed to setup-bazel-ci.+ required: true+ buildbuddy-api-key:+ description: BuildBuddy API key used by Bazel CI.+ required: false+ default: ""++runs:+ using: composite+ steps:+ - uses: ./.github/actions/setup-bazel-ci+ with:+ target: ${{ inputs.target }}+ install-test-prereqs: true++ - name: Install Linux sandbox build dependencies+ if: ${{ runner.os == 'Linux' }}+ shell: bash+ run: |+ sudo DEBIAN_FRONTEND=noninteractive apt-get update+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends pkg-config libcap-dev++ - name: Run argument comment lint on codex-rs via Bazel+ if: ${{ runner.os != 'Windows' }}+ env:+ BUILDBUDDY_API_KEY: ${{ inputs.buildbuddy-api-key }}+ shell: bash+ run: |+ bazel_targets="$(./tools/argument-comment-lint/list-bazel-targets.sh)"+ ./.github/scripts/run-bazel-ci.sh \+ -- \+ build \+ --config=argument-comment-lint \+ --keep_going \+ --build_metadata=COMMIT_SHA=${GITHUB_SHA} \+ -- \+ ${bazel_targets}++ - name: Run argument comment lint on codex-rs via Bazel+ if: ${{ runner.os == 'Windows' }}+ env:+ BUILDBUDDY_API_KEY: ${{ inputs.buildbuddy-api-key }}+ shell: bash+ run: |+ ./.github/scripts/run-argument-comment-lint-bazel.sh \+ --config=argument-comment-lint \+ --platforms=//:local_windows \+ --keep_going \+ --build_metadata=COMMIT_SHA=${GITHUB_SHA}diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.ymlindex 4da750b7e4..f62e5458a3 100644--- a/.github/workflows/rust-ci.yml+++ b/.github/workflows/rust-ci.yml@@ -41,6 +41,7 @@ jobs:for f in "${files[@]}"; do[[ $f == codex-rs/* ]] && codex=true[[ $f == codex-rs/* || $f == tools/argument-comment-lint/* || $f == justfile ]] && argument_comment_lint=true+ [[ $f == defs.bzl || $f == workspace_root_test_launcher.sh.tpl || $f == workspace_root_test_launcher.bat.tpl ]] && argument_comment_lint=true[[ $f == tools/argument-comment-lint/* || $f == .github/workflows/rust-ci.yml || $f == .github/workflows/rust-ci-full.yml ]] && argument_comment_lint_package=true[[ $f == .github/* ]] && workflows=truedone@@ -136,7 +137,6 @@ jobs:runs-on: ${{ matrix.runs_on || matrix.runner }}timeout-minutes: ${{ matrix.timeout_minutes }}needs: changed- if: ${{ needs.changed.outputs.argument_comment_lint == 'true' || needs.changed.outputs.workflows == 'true' }}strategy:fail-fast: falsematrix:@@ -154,43 +154,28 @@ jobs:group: codex-runnerslabels: codex-windows-x64steps:- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6- - uses: ./.github/actions/setup-bazel-ci- with:- target: ${{ runner.os }}- install-test-prereqs: true- - name: Install Linux sandbox build dependencies- if: ${{ runner.os == 'Linux' }}+ - name: Check whether argument comment lint should run+ id: argument_comment_lint_gateshell: bash- run: |- sudo DEBIAN_FRONTEND=noninteractive apt-get update- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends pkg-config libcap-dev- - name: Run argument comment lint on codex-rs via Bazel- if: ${{ runner.os != 'Windows' }}env:- BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}- shell: bash+ ARGUMENT_COMMENT_LINT: ${{ needs.changed.outputs.argument_comment_lint }}+ WORKFLOWS: ${{ needs.changed.outputs.workflows }}run: |- bazel_targets="$(./tools/argument-comment-lint/list-bazel-targets.sh)"- ./.github/scripts/run-bazel-ci.sh \- -- \- build \- --config=argument-comment-lint \- --keep_going \- --build_metadata=COMMIT_SHA=${GITHUB_SHA} \- -- \- ${bazel_targets}+ if [[ "$ARGUMENT_COMMENT_LINT" == "true" || "$WORKFLOWS" == "true" ]]; then+ echo "run=true" >> "$GITHUB_OUTPUT"+ exit 0+ fi++ echo "No argument-comment-lint relevant changes."+ echo "run=false" >> "$GITHUB_OUTPUT"+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6+ if: ${{ steps.argument_comment_lint_gate.outputs.run == 'true' }}- name: Run argument comment lint on codex-rs via Bazel- if: ${{ runner.os == 'Windows' }}- env:- BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}- shell: bash- run: |- ./.github/scripts/run-argument-comment-lint-bazel.sh \- --config=argument-comment-lint \- --platforms=//:local_windows \- --keep_going \- --build_metadata=COMMIT_SHA=${GITHUB_SHA}+ if: ${{ steps.argument_comment_lint_gate.outputs.run == 'true' }}+ uses: ./.github/actions/run-argument-comment-lint+ with:+ target: ${{ runner.os }}+ buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}# --- Gatherer job that you mark as the ONLY required status -----------------results: