Skip to content

Commit d69581d

Browse files
committed
ci: Run gnu env tests as part of the main job
Since glibc supports both 32- and 64-bit time_t and off_t without different setup (just a header define in libc-test), these don't have any need to be standalone jobs. Switch glibc config variants to be checked as part of `run.sh`, which means we are now covering all 32-bit platforms by default. (backport <#4785>) (cherry picked from commit cbf2b8a)
1 parent 806d311 commit d69581d

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ jobs:
113113
- target: i686-pc-windows-msvc
114114
os: windows-2025
115115
- target: i686-unknown-linux-gnu
116-
- target: i686-unknown-linux-gnu
117-
artifact-tag: offset-bits64
118-
env: { RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64 }
119-
- target: i686-unknown-linux-gnu
120-
artifact-tag: time-bits64
121-
env: { RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64 }
122116
- target: x86_64-pc-windows-gnu
123117
os: windows-2025
124118
env: { ARCH_BITS: 64, ARCH: x86_64 }
@@ -181,12 +175,6 @@ jobs:
181175
artifact-tag: new-musl
182176
- target: arm-linux-androideabi
183177
- target: arm-unknown-linux-gnueabihf
184-
- target: arm-unknown-linux-gnueabihf
185-
env: { RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64 }
186-
artifact-tag: offset-bits64
187-
- target: arm-unknown-linux-gnueabihf
188-
env: { RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64 }
189-
artifact-tag: time-bits64
190178
- target: arm-unknown-linux-musleabihf
191179
- target: arm-unknown-linux-musleabihf
192180
env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 }
@@ -228,12 +216,6 @@ jobs:
228216
# FIXME(ppc): SIGILL running tests, see
229217
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
230218
# - target: powerpc-unknown-linux-gnu
231-
# - target: powerpc-unknown-linux-gnu
232-
# env: { RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64 }
233-
# artifact-tag: offset-bits64
234-
# - target: powerpc-unknown-linux-gnu
235-
# env: { RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64 }
236-
# artifact-tag: time-bits64
237219
runs-on: ${{ matrix.os && matrix.os || 'ubuntu-24.04' }}
238220
timeout-minutes: 25
239221
env:

ci/run.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,21 @@ case "$target" in
2525
*) cmd="$cmd --workspace" ;;
2626
esac
2727

28+
env="$(rustc --print cfg --target "$target" | sed -n 's/target_env="\(.*\)"/\1/p')"
29+
bits="$(rustc --print cfg --target "$target" | sed -n 's/target_pointer_width="\(.*\)"/\1/p')"
30+
2831
# shellcheck disable=SC2086
2932
$cmd --no-default-features -- $test_flags
3033
# shellcheck disable=SC2086
3134
$cmd -- $test_flags
3235
# shellcheck disable=SC2086
3336
$cmd --features extra_traits -- $test_flags
37+
38+
# On relevant platforms, also test with our optional settings
39+
40+
if [ "$env" = "gnu" ] && [ "$bits" = "32" ]; then
41+
# shellcheck disable=SC2086
42+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS=64 $cmd -- $test_flags
43+
# shellcheck disable=SC2086
44+
RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64 $cmd -- $test_flags
45+
fi

0 commit comments

Comments
 (0)