Skip to content

Commit 0adb22f

Browse files
committed
gnu: Set up the CI for _FILE_OFFSET_BITS=64
Add new jobs for i686 in test_tier1 and arm and powerpc in test_tier2 where RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS64=1. Use artifact-tag to avoid artifact name collisions.
1 parent 601beeb commit 0adb22f

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ jobs:
6666
- target: i686-unknown-linux-gnu
6767
docker: true
6868
os: ubuntu-24.04
69+
- target: i686-unknown-linux-gnu
70+
docker: true
71+
os: ubuntu-24.04
72+
artifact-tag: offset-bits64
73+
env:
74+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS64: 1
6975
- target: x86_64-unknown-linux-gnu
7076
docker: true
7177
os: ubuntu-24.04
@@ -118,7 +124,7 @@ jobs:
118124
- uses: actions/upload-artifact@v4
119125
if: always() && steps.create_artifacts.outcome == 'success'
120126
with:
121-
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
127+
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
122128
path: ${{ env.ARCHIVE_PATH }}
123129
retention-days: 5
124130

@@ -138,15 +144,11 @@ jobs:
138144
- aarch64-unknown-linux-gnu
139145
- aarch64-unknown-linux-musl
140146
- arm-linux-androideabi
141-
- arm-unknown-linux-gnueabihf
142147
- arm-unknown-linux-musleabihf
143148
- i686-linux-android
144149
- i686-unknown-linux-musl
145150
- loongarch64-unknown-linux-gnu
146151
- loongarch64-unknown-linux-musl
147-
# FIXME(ppc): SIGILL running tests, see
148-
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
149-
# - powerpc-unknown-linux-gnu
150152
- powerpc64-unknown-linux-gnu
151153
- powerpc64le-unknown-linux-gnu
152154
- riscv64gc-unknown-linux-gnu
@@ -161,6 +163,17 @@ jobs:
161163
# FIXME: It seems some items in `src/unix/mod.rs`
162164
# aren't defined on redox actually.
163165
# - x86_64-unknown-redox
166+
include:
167+
- target: arm-unknown-linux-gnueabihf
168+
- target: arm-unknown-linux-gnueabihf
169+
env:
170+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS64: 1
171+
artifact-tag: offset-bits64
172+
# - target: powerpc-unknown-linux-gnu
173+
# - target: powerpc-unknown-linux-gnu
174+
# env:
175+
# RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS64: 1
176+
# artifact-tag: offset-bits64
164177
timeout-minutes: 25
165178
env:
166179
TARGET: ${{ matrix.target }}
@@ -189,7 +202,7 @@ jobs:
189202
- uses: actions/upload-artifact@v4
190203
if: always() && steps.create_artifacts.outcome == 'success'
191204
with:
192-
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
205+
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
193206
path: ${{ env.ARCHIVE_PATH }}
194207
retention-days: 5
195208

ci/run-docker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ run() {
4343
--user "$(id -u)":"$(id -g)" \
4444
--env LIBC_CI \
4545
--env LIBC_CI_ZBUILD_STD \
46+
--env RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS64 \
4647
--env CARGO_HOME=/cargo \
4748
--env CARGO_TARGET_DIR=/checkout/target \
4849
--volume "$CARGO_HOME":/cargo \

ci/verify-build.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ test_target() {
7474
if [ "$os" = "linux" ]; then
7575
# Test with the equivalent of __USE_TIME_BITS64
7676
RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64=1 $cmd
77+
case "$target" in
78+
# Test with the equivalent of __FILE_OFFSET_BITS=64
79+
arm*-gnu*|i*86*-gnu|powerpc-*-gnu*|mips*-gnu|sparc-*-gnu|thumb-*gnu*)
80+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS64=1 $cmd;;
81+
esac
7782
fi
7883

7984
# Test again without default features, i.e. without "std"
@@ -91,7 +96,7 @@ test_target() {
9196
stable-x86_64-*freebsd*) do_freebsd_checks=1 ;;
9297
nightly-i686*freebsd*) do_freebsd_checks=1 ;;
9398
esac
94-
99+
95100
if [ -n "${do_freebsd_checks:-}" ]; then
96101
for version in $freebsd_versions; do
97102
export RUST_LIBC_UNSTABLE_FREEBSD_VERSION="$version"
@@ -296,7 +301,7 @@ filter_and_run() {
296301
if [ "$target" = "wasm32-wasip2" ] && [ "$supports_wasi_pn" = "0" ]; then
297302
return
298303
fi
299-
304+
300305
test_target "$target" "$no_dist"
301306
some_tests_run=1
302307
fi

0 commit comments

Comments
 (0)