From 3d3d4e652b3a542b44190cd788b84ec8ba99e3b9 Mon Sep 17 00:00:00 2001 From: Peter Ebden Date: Mon, 14 Sep 2026 16:38:56 +0100 Subject: [PATCH 1/2] Add caching to GHA --- .github/workflows/plugin_test.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/plugin_test.yaml b/.github/workflows/plugin_test.yaml index fa5e8e0..1d4420a 100644 --- a/.github/workflows/plugin_test.yaml +++ b/.github/workflows/plugin_test.yaml @@ -38,6 +38,20 @@ jobs: update-environment: false - name: Check out code uses: actions/checkout@v5 + - name: Determine Please version + if: ${{ inputs.platform != 'freebsd_amd64' }} + id: please_version + run: echo "version=$(./pleasew --version | awk '{print $NF}')" >> "$GITHUB_OUTPUT" + - name: Cache Please downloads + # The FreeBSD tests run inside a nested VM, so the host's cache directory isn't visible to them. + if: ${{ inputs.platform != 'freebsd_amd64' }} + uses: actions/cache@v4 + with: + path: ~/.cache/please + key: please-${{ inputs.platform }}-${{ steps.please_version.outputs.version }}-${{ hashFiles('plugins/BUILD', 'third_party/**/BUILD') }} + restore-keys: | + please-${{ inputs.platform }}-${{ steps.please_version.outputs.version }}- + please-${{ inputs.platform }}- - name: Configure plugin to use please_pex tool built from source if: inputs.please_pex_from_repo # PexTool can't be set to //tools/please_pex for e2e tests because it can't be built inside the e2e test From 85df79d99e4845855f74099a753d2697288a53f4 Mon Sep 17 00:00:00 2001 From: Peter Ebden Date: Mon, 14 Sep 2026 16:52:39 +0100 Subject: [PATCH 2/2] Add CI test profile --- .github/workflows/plugin_test.yaml | 8 ++++---- .plzconfig.ci | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .plzconfig.ci diff --git a/.github/workflows/plugin_test.yaml b/.github/workflows/plugin_test.yaml index 1d4420a..673437c 100644 --- a/.github/workflows/plugin_test.yaml +++ b/.github/workflows/plugin_test.yaml @@ -72,18 +72,18 @@ jobs: _external_interpreter="python${{ inputs.python }}" _in_repo_interpreter="//third_party/cc/cpython:cpython_${{ inputs.python }}|python" echo "*** Running tests using external Python interpreter: $_external_interpreter" - ./pleasew -o "plugin.python.defaultinterpreter:$_external_interpreter" test --rerun --keep_going --log_file plz-out/log/test-external_interpreter.log ${{ inputs.test_targets }} + ./pleasew -o "plugin.python.defaultinterpreter:$_external_interpreter" test --profile ci --keep_going --log_file plz-out/log/test-external_interpreter.log ${{ inputs.test_targets }} echo "*** Running tests using in-repo Python interpreter: $_in_repo_interpreter" - ./pleasew -o "plugin.python.defaultinterpreter:$_in_repo_interpreter" test --rerun --keep_going --log_file plz-out/log/test-in_repo_interpreter.log ${{ inputs.test_targets }} + ./pleasew -o "plugin.python.defaultinterpreter:$_in_repo_interpreter" test --profile ci --keep_going --log_file plz-out/log/test-in_repo_interpreter.log ${{ inputs.test_targets }} - name: Run tests (on host) if: ${{ inputs.platform != 'freebsd_amd64' }} run: | _external_interpreter="${{ steps.python.outputs.python-path }}" _in_repo_interpreter="//third_party/cc/cpython:cpython_${{ inputs.python }}|python" echo "*** Running tests using external Python interpreter: $_external_interpreter" - ./pleasew -o "plugin.python.defaultinterpreter:$_external_interpreter" test --rerun --keep_going --log_file plz-out/log/test-external_interpreter.log ${{ inputs.test_targets }} + ./pleasew -o "plugin.python.defaultinterpreter:$_external_interpreter" test --profile ci --keep_going --log_file plz-out/log/test-external_interpreter.log ${{ inputs.test_targets }} echo "*** Running tests using in-repo Python interpreter: $_in_repo_interpreter" - ./pleasew -o "plugin.python.defaultinterpreter:$_in_repo_interpreter" test --rerun --keep_going --log_file plz-out/log/test-in_repo_interpreter.log ${{ inputs.test_targets }} + ./pleasew -o "plugin.python.defaultinterpreter:$_in_repo_interpreter" test --profile ci --keep_going --log_file plz-out/log/test-in_repo_interpreter.log ${{ inputs.test_targets }} - name: Archive logs uses: actions/upload-artifact@v7 with: diff --git a/.plzconfig.ci b/.plzconfig.ci new file mode 100644 index 0000000..0646402 --- /dev/null +++ b/.plzconfig.ci @@ -0,0 +1,3 @@ +[cache] +dircompress = true +dirclean = false