Skip to content

Commit 5a9c2e4

Browse files
committed
more consistency (more could be templated?)
1 parent dff0249 commit 5a9c2e4

File tree

4 files changed

+29
-36
lines changed

4 files changed

+29
-36
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ jobs:
9292
timeout-minutes: 60
9393
needs: check_source
9494
if: needs.check_source.outputs.run_tests == 'true'
95-
env:
96-
SCCACHE_GHA_ENABLED: "true"
9795
steps:
9896
- uses: actions/checkout@v4
9997
- uses: actions/setup-python@v5
@@ -111,10 +109,11 @@ jobs:
111109
run: sudo ./.github/workflows/posix-deps-apt.sh
112110
- name: Start sccache-cache
113111
uses: mozilla-actions/[email protected]
114-
- name: Configure CC and CXX environment variables
112+
- name: Configure CC and CXX env vars
115113
run: |
116114
echo "CC=sccache gcc" >> "$GITHUB_ENV"
117115
echo "CXX=sccache gcc" >> "$GITHUB_ENV"
116+
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
118117
- name: Configure CPython
119118
run: |
120119
# Build Python with the libpython dynamic library
@@ -286,13 +285,13 @@ jobs:
286285
- name: Install OpenSSL
287286
if: steps.cache-openssl.outputs.cache-hit != 'true'
288287
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
289-
- name: Add ccache to PATH
288+
- name: Start sccache-cache
289+
uses: mozilla-actions/[email protected]
290+
- name: Configure CC and CXX env vars
290291
run: |
291-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
292-
- name: Configure ccache action
293-
uses: hendrikmuhs/[email protected]
294-
with:
295-
save: false
292+
echo "CC=sccache gcc" >> "$GITHUB_ENV"
293+
echo "CXX=sccache gcc" >> "$GITHUB_ENV"
294+
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
296295
- name: Configure CPython
297296
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
298297
- name: Build CPython
@@ -339,13 +338,13 @@ jobs:
339338
- name: Install OpenSSL
340339
if: steps.cache-openssl.outputs.cache-hit != 'true'
341340
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
342-
- name: Add ccache to PATH
341+
- name: Start sccache-cache
342+
uses: mozilla-actions/[email protected]
343+
- name: Configure CC and CXX env vars
343344
run: |
344-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
345-
- name: Configure ccache action
346-
uses: hendrikmuhs/[email protected]
347-
with:
348-
save: false
345+
echo "CC=sccache gcc" >> "$GITHUB_ENV"
346+
echo "CXX=sccache gcc" >> "$GITHUB_ENV"
347+
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
349348
- name: Setup directory envs for out-of-tree builds
350349
run: |
351350
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -468,14 +467,13 @@ jobs:
468467
- name: Install OpenSSL
469468
if: steps.cache-openssl.outputs.cache-hit != 'true'
470469
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
471-
- name: Add ccache to PATH
470+
- name: Start sccache-cache
471+
uses: mozilla-actions/[email protected]
472+
- name: Configure CC and CXX env vars
472473
run: |
473-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
474-
- name: Configure ccache action
475-
uses: hendrikmuhs/[email protected]
476-
with:
477-
save: ${{ github.event_name == 'push' }}
478-
max-size: "200M"
474+
echo "CC=sccache gcc" >> "$GITHUB_ENV"
475+
echo "CXX=sccache gcc" >> "$GITHUB_ENV"
476+
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
479477
- name: Configure CPython
480478
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
481479
- name: Build CPython

.github/workflows/reusable-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
HOMEBREW_NO_INSTALL_CLEANUP: 1
2626
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
2727
PYTHONSTRICTEXTENSIONBUILD: 1
28-
SCCACHE_GHA_ENABLED: "true"
2928
TERM: linux
3029
runs-on: ${{ inputs.os }}
3130
steps:
@@ -44,10 +43,11 @@ jobs:
4443
brew link tcl-tk@8
4544
- name: Start sccache-cache
4645
uses: mozilla-actions/[email protected]
47-
- name: Configure CC and CXX environment variables
46+
- name: Configure CC and CXX env vars
4847
run: |
4948
echo "CC=sccache clang" >> "$GITHUB_ENV"
5049
echo "CXX=sccache clang" >> "$GITHUB_ENV"
50+
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
5151
- name: Configure CPython
5252
run: |
5353
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \

.github/workflows/reusable-tsan.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,14 @@ jobs:
4545
sudo update-alternatives --set clang++ /usr/bin/clang++-17
4646
# Reduce ASLR to avoid TSAN crashing
4747
sudo sysctl -w vm.mmap_rnd_bits=28
48+
- name: Start sccache-cache
49+
uses: mozilla-actions/[email protected]
4850
- name: TSAN Option Setup
4951
run: |
5052
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }} handle_segv=0" >> "$GITHUB_ENV"
51-
echo "CC=clang" >> "$GITHUB_ENV"
52-
echo "CXX=clang++" >> "$GITHUB_ENV"
53-
- name: Add ccache to PATH
54-
run: |
55-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
56-
- name: Configure ccache action
57-
uses: hendrikmuhs/[email protected]
58-
with:
59-
save: ${{ github.event_name == 'push' }}
60-
max-size: "200M"
53+
echo "CC=sccache clang" >> "$GITHUB_ENV"
54+
echo "CXX=sccache clang++" >> "$GITHUB_ENV"
55+
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
6156
- name: Configure CPython
6257
run: ${{ inputs.options }}
6358
- name: Build CPython

.github/workflows/reusable-ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
FORCE_COLOR: 1
2626
OPENSSL_VER: 3.0.15
2727
PYTHONSTRICTEXTENSIONBUILD: 1
28-
SCCACHE_GHA_ENABLED: "true"
2928
TERM: linux
3029
steps:
3130
- uses: actions/checkout@v4
@@ -35,10 +34,11 @@ jobs:
3534
run: sudo ./.github/workflows/posix-deps-apt.sh
3635
- name: Start sccache-cache
3736
uses: mozilla-actions/[email protected]
38-
- name: Configure CC and CXX environment variables
37+
- name: Configure CC and CXX env vars
3938
run: |
4039
echo "CC=sccache gcc" >> "$GITHUB_ENV"
4140
echo "CXX=sccache gcc" >> "$GITHUB_ENV"
41+
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
4242
- name: Configure OpenSSL env vars
4343
run: |
4444
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)