From 530e5e99df38ee8f656825763b4151ca0bf355da Mon Sep 17 00:00:00 2001 From: Not_Leonian <75620009+NotLeonian@users.noreply.github.com> Date: Thu, 24 Sep 2026 00:37:02 +0900 Subject: [PATCH] =?UTF-8?q?verify=20CI=20=E3=81=AE=E3=82=AD=E3=83=A3?= =?UTF-8?q?=E3=83=83=E3=82=B7=E3=83=A5=E3=81=AE=E6=96=B9=E5=BC=8F=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/verify.yml | 10 +++++----- README.md | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index d8d37df..cea1d6a 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -124,10 +124,10 @@ jobs: uses: actions/cache/restore@v6 with: path: ${{ runner.temp }}/competitive-verifier-ci-result/merged-result.json - # CI で使う verifier は resolved_ref で区別し、uv の依存関係の更新では結果を破棄しない。 - key: competitive-verifier-ci-result-${{ runner.os }}-verifier-${{ steps.competitive-verifier-package.outputs.resolved_ref }}-inputs-${{ hashFiles('.competitive-verifier/config.toml', '.github/workflows/verify.yml', '.github/scripts/*.sh', '.github/scripts/*.py') }}-${{ github.run_id }}-${{ github.run_attempt }} + # ジャッジの設定や実行方法に関わるファイルだけをハッシュする。 + key: competitive-verifier-ci-result-${{ runner.os }}-verifier-${{ steps.competitive-verifier-package.outputs.resolved_ref }}-inputs-${{ hashFiles('.competitive-verifier/config.toml', '.github/scripts/resolve_verify_files.sh', '.github/scripts/run_verify_split.sh') }}-${{ github.run_id }}-${{ github.run_attempt }} restore-keys: | - competitive-verifier-ci-result-${{ runner.os }}-verifier-${{ steps.competitive-verifier-package.outputs.resolved_ref }}-inputs-${{ hashFiles('.competitive-verifier/config.toml', '.github/workflows/verify.yml', '.github/scripts/*.sh', '.github/scripts/*.py') }}- + competitive-verifier-ci-result-${{ runner.os }}-verifier-${{ steps.competitive-verifier-package.outputs.resolved_ref }}-inputs-${{ hashFiles('.competitive-verifier/config.toml', '.github/scripts/resolve_verify_files.sh', '.github/scripts/run_verify_split.sh') }}- - name: Download verify_files.json id: verify_files uses: competitive-verifier/actions/download-verify-artifact@v2 @@ -139,12 +139,12 @@ jobs: - name: Verify shell: bash run: | + # ジャッジの制限時間は、キャッシュキーに含まれる run_verify_split.sh で指定する。 args=( --output "$RUNNER_TEMP/result.json" --verify-files "$VERIFY_FILES_JSON" --split-size "$SPLIT_SIZE" --split-index "${{ matrix.index }}" - --timeout 1800 ) if [[ "$FULL_VERIFY" == "true" ]]; then args+=(--full) @@ -304,7 +304,7 @@ jobs: uses: actions/cache/save@v6 with: path: ${{ runner.temp }}/competitive-verifier-ci-result/merged-result.json - key: competitive-verifier-ci-result-${{ runner.os }}-verifier-${{ steps.competitive-verifier-package.outputs.resolved_ref }}-inputs-${{ hashFiles('.competitive-verifier/config.toml', '.github/workflows/verify.yml', '.github/scripts/*.sh', '.github/scripts/*.py') }}-${{ github.run_id }}-${{ github.run_attempt }} + key: competitive-verifier-ci-result-${{ runner.os }}-verifier-${{ steps.competitive-verifier-package.outputs.resolved_ref }}-inputs-${{ hashFiles('.competitive-verifier/config.toml', '.github/scripts/resolve_verify_files.sh', '.github/scripts/run_verify_split.sh') }}-${{ github.run_id }}-${{ github.run_attempt }} deploy: if: (success() || failure()) && github.ref == 'refs/heads/main' && needs.docs.outputs.upload-pages == 'true' runs-on: ubuntu-latest diff --git a/README.md b/README.md index efef4d0..91d1003 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ C++ library for competitive programming [.github/workflows/verify.yml](.github/workflows/verify.yml) は、PR またはブランチごとに並行して実行できます。同じ PR またはブランチで新しい実行が始まると、古い実行をキャンセルします。 -CI では、過去の verify 結果をキャッシュから復元し、ソースコードとその依存先に変更がない場合は再利用します。キャッシュは、OS、competitive-verifier の解決済み commit SHA、設定、ワークフロー、スクリプトによって区別します。CI で使う competitive-verifier は commit SHA を指定して導入するため、[uv.lock](uv.lock) や [pyproject.toml](pyproject.toml) の開発用依存関係だけが変わっても、結果を再利用できます。 +CI では、過去の verify 結果をキャッシュから復元し、ソースコードとその依存先に変更がない場合は再利用します。キャッシュは、OS、competitive-verifier の解決済み commit SHA、[.competitive-verifier/config.toml](.competitive-verifier/config.toml)、[.github/scripts/resolve_verify_files.sh](.github/scripts/resolve_verify_files.sh)、[.github/scripts/run_verify_split.sh](.github/scripts/run_verify_split.sh) によって区別します。ワークフローの整形チェックやドキュメント生成に関する変更では、過去の verify 結果を引き続き利用できます。CI で使う competitive-verifier は commit SHA を指定して導入するため、[uv.lock](uv.lock) や [pyproject.toml](pyproject.toml) の開発用依存関係だけが変わっても、結果を再利用できます。 キャッシュが見つからない場合、月次の定期実行、手動実行で `full_verify` を指定した場合は、全ての verify を実行します。