Skip to content

Commit c4efb16

Browse files
authored
ci: reduce verbosity & install zoneinfo backport on <3.9 (#5136)
* ci: fixup verbosity & install zoneinfo backport on <3.9 * correct typo * try different syntax for `verbose`
1 parent b61dc7f commit c4efb16

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919
MSRV:
2020
required: true
2121
type: string
22+
verbose:
23+
type: boolean
24+
default: false
2225

2326
jobs:
2427
build:
@@ -66,6 +69,10 @@ jobs:
6669
run: |
6770
echo "CARGO_BUILD_TARGET=i686-pc-windows-msvc" >> $GITHUB_ENV
6871
72+
- name: Install zoneinfo backport for Python 3.7 / 3.8
73+
if: contains(fromJSON('["3.7", "3.8"]'), inputs.python-version)
74+
run: python -m pip install backports.zoneinfo
75+
6976
- uses: Swatinem/rust-cache@v2
7077
with:
7178
save-if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
@@ -86,8 +93,8 @@ jobs:
8693
if: ${{ inputs.rust == 'stable' && !startsWith(inputs.python-version, 'graalpy') }}
8794
id: ffi-changes
8895
with:
89-
base: ${{ github.event.pull_request.base.ref || github.event.merge_group.base_ref }}
90-
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
96+
base: ${{ github.event.merge_group.base_ref }}
97+
ref: ${{ github.event.merge_group.head_ref }}
9198
filters: |
9299
changed:
93100
- 'pyo3-ffi/**'
@@ -142,7 +149,7 @@ jobs:
142149
token: ${{ secrets.CODECOV_TOKEN }}
143150

144151
env:
145-
CARGO_TERM_VERBOSE: true
152+
CARGO_TERM_VERBOSE: ${{ inputs.verbose }}
146153
RUST_BACKTRACE: 1
147154
RUSTFLAGS: "-D warnings"
148155
RUSTDOCFLAGS: "-D warnings"

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
runs-on: ubuntu-latest
3838
outputs:
3939
MSRV: ${{ steps.resolve-msrv.outputs.MSRV }}
40+
verbose: ${{ runner.debug == '1' }}
4041
steps:
4142
- uses: actions/checkout@v4
4243
- uses: actions/setup-python@v5
@@ -175,6 +176,7 @@ jobs:
175176
rust: ${{ matrix.rust }}
176177
rust-target: ${{ matrix.platform.rust-target }}
177178
MSRV: ${{ needs.resolve.outputs.MSRV }}
179+
verbose: ${{ needs.resolve.outputs.verbose == 'true' }}
178180
secrets: inherit
179181
strategy:
180182
# If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
@@ -248,6 +250,7 @@ jobs:
248250
rust: ${{ matrix.rust }}
249251
rust-target: ${{ matrix.platform.rust-target }}
250252
MSRV: ${{ needs.resolve.outputs.MSRV }}
253+
verbose: ${{ needs.resolve.outputs.verbose == 'true' }}
251254
secrets: inherit
252255
strategy:
253256
# If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present

0 commit comments

Comments
 (0)