Skip to content

Commit 514492a

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_BITS=64. Use artifact-tag to avoid artifact name collisions.
1 parent 21681fd commit 514492a

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ jobs:
7676
- target: i686-unknown-linux-gnu
7777
docker: true
7878
os: ubuntu-24.04
79+
- target: i686-unknown-linux-gnu
80+
docker: true
81+
os: ubuntu-24.04
82+
artifact-tag: offset-bits64
83+
env:
84+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
7985
- target: x86_64-unknown-linux-gnu
8086
docker: true
8187
os: ubuntu-24.04
@@ -128,7 +134,7 @@ jobs:
128134
- uses: actions/upload-artifact@v4
129135
if: always() && steps.create_artifacts.outcome == 'success'
130136
with:
131-
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
137+
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
132138
path: ${{ env.ARCHIVE_PATH }}
133139
retention-days: 5
134140

@@ -148,15 +154,11 @@ jobs:
148154
- aarch64-unknown-linux-gnu
149155
- aarch64-unknown-linux-musl
150156
- arm-linux-androideabi
151-
- arm-unknown-linux-gnueabihf
152157
- arm-unknown-linux-musleabihf
153158
- i686-linux-android
154159
- i686-unknown-linux-musl
155160
- loongarch64-unknown-linux-gnu
156161
- loongarch64-unknown-linux-musl
157-
# FIXME(ppc): SIGILL running tests, see
158-
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
159-
# - powerpc-unknown-linux-gnu
160162
- powerpc64-unknown-linux-gnu
161163
- powerpc64le-unknown-linux-gnu
162164
- riscv64gc-unknown-linux-gnu
@@ -171,6 +173,19 @@ jobs:
171173
# FIXME: It seems some items in `src/unix/mod.rs`
172174
# aren't defined on redox actually.
173175
# - x86_64-unknown-redox
176+
include:
177+
- target: arm-unknown-linux-gnueabihf
178+
- target: arm-unknown-linux-gnueabihf
179+
env:
180+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
181+
artifact-tag: offset-bits64
182+
# FIXME(ppc): SIGILL running tests, see
183+
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
184+
# - target: powerpc-unknown-linux-gnu
185+
# - target: powerpc-unknown-linux-gnu
186+
# env:
187+
# RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
188+
# artifact-tag: offset-bits64
174189
timeout-minutes: 25
175190
env:
176191
TARGET: ${{ matrix.target }}
@@ -199,7 +214,7 @@ jobs:
199214
- uses: actions/upload-artifact@v4
200215
if: always() && steps.create_artifacts.outcome == 'success'
201216
with:
202-
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
217+
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
203218
path: ${{ env.ARCHIVE_PATH }}
204219
retention-days: 5
205220

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_BITS \
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_BITS=64 $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)