Skip to content

Commit cbf2b8a

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.
1 parent 7b9f8fd commit cbf2b8a

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
@@ -122,12 +122,6 @@ jobs:
122122
- target: i686-pc-windows-msvc
123123
os: windows-2025
124124
- target: i686-unknown-linux-gnu
125-
- target: i686-unknown-linux-gnu
126-
artifact-tag: offset-bits64
127-
env: { RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64 }
128-
- target: i686-unknown-linux-gnu
129-
artifact-tag: time-bits64
130-
env: { RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64 }
131125
- target: x86_64-pc-windows-gnu
132126
os: windows-2025
133127
env: { ARCH_BITS: 64, ARCH: x86_64 }
@@ -189,12 +183,6 @@ jobs:
189183
artifact-tag: new-musl
190184
- target: arm-linux-androideabi
191185
- target: arm-unknown-linux-gnueabihf
192-
- target: arm-unknown-linux-gnueabihf
193-
env: { RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64 }
194-
artifact-tag: offset-bits64
195-
- target: arm-unknown-linux-gnueabihf
196-
env: { RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64 }
197-
artifact-tag: time-bits64
198186
- target: arm-unknown-linux-musleabihf
199187
- target: arm-unknown-linux-musleabihf
200188
env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 }
@@ -236,12 +224,6 @@ jobs:
236224
# FIXME(ppc): SIGILL running tests, see
237225
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
238226
# - target: powerpc-unknown-linux-gnu
239-
# - target: powerpc-unknown-linux-gnu
240-
# env: { RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64 }
241-
# artifact-tag: offset-bits64
242-
# - target: powerpc-unknown-linux-gnu
243-
# env: { RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64 }
244-
# artifact-tag: time-bits64
245227
runs-on: ${{ matrix.os && matrix.os || 'ubuntu-24.04' }}
246228
timeout-minutes: 25
247229
env:

ci/run.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,21 @@ case "$target" in
3333
powerpc64le*musl) cmd="$cmd --exclude ctest --exclude ctest-test --exclude ctest-next" ;;
3434
esac
3535

36+
env="$(rustc --print cfg --target "$target" | sed -n 's/target_env="\(.*\)"/\1/p')"
37+
bits="$(rustc --print cfg --target "$target" | sed -n 's/target_pointer_width="\(.*\)"/\1/p')"
38+
3639
# shellcheck disable=SC2086
3740
$cmd --no-default-features -- $test_flags
3841
# shellcheck disable=SC2086
3942
$cmd -- $test_flags
4043
# shellcheck disable=SC2086
4144
$cmd --features extra_traits -- $test_flags
45+
46+
# On relevant platforms, also test with our optional settings
47+
48+
if [ "$env" = "gnu" ] && [ "$bits" = "32" ]; then
49+
# shellcheck disable=SC2086
50+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS=64 $cmd -- $test_flags
51+
# shellcheck disable=SC2086
52+
RUST_LIBC_UNSTABLE_GNU_TIME_BITS=64 $cmd -- $test_flags
53+
fi

0 commit comments

Comments
 (0)