Skip to content

Commit 4d009b4

Browse files
snoggetgross35
authored andcommitted
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. (backport <rust-lang#4345>) (cherry picked from commit 874e399)
1 parent aed5b56 commit 4d009b4

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
@@ -77,6 +77,12 @@ jobs:
7777
- target: i686-unknown-linux-gnu
7878
docker: true
7979
os: ubuntu-24.04
80+
- target: i686-unknown-linux-gnu
81+
docker: true
82+
os: ubuntu-24.04
83+
artifact-tag: offset-bits64
84+
env:
85+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
8086
- target: x86_64-unknown-linux-gnu
8187
docker: true
8288
os: ubuntu-24.04
@@ -129,7 +135,7 @@ jobs:
129135
- uses: actions/upload-artifact@v4
130136
if: always() && steps.create_artifacts.outcome == 'success'
131137
with:
132-
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
138+
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
133139
path: ${{ env.ARCHIVE_PATH }}
134140
retention-days: 5
135141

@@ -149,15 +155,11 @@ jobs:
149155
- aarch64-unknown-linux-gnu
150156
- aarch64-unknown-linux-musl
151157
- arm-linux-androideabi
152-
- arm-unknown-linux-gnueabihf
153158
- arm-unknown-linux-musleabihf
154159
- i686-linux-android
155160
- i686-unknown-linux-musl
156161
- loongarch64-unknown-linux-gnu
157162
- loongarch64-unknown-linux-musl
158-
# FIXME(ppc): SIGILL running tests, see
159-
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
160-
# - powerpc-unknown-linux-gnu
161163
- powerpc64-unknown-linux-gnu
162164
- powerpc64le-unknown-linux-gnu
163165
- riscv64gc-unknown-linux-gnu
@@ -172,6 +174,19 @@ jobs:
172174
# FIXME: It seems some items in `src/unix/mod.rs`
173175
# aren't defined on redox actually.
174176
# - x86_64-unknown-redox
177+
include:
178+
- target: arm-unknown-linux-gnueabihf
179+
- target: arm-unknown-linux-gnueabihf
180+
env:
181+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
182+
artifact-tag: offset-bits64
183+
# FIXME(ppc): SIGILL running tests, see
184+
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
185+
# - target: powerpc-unknown-linux-gnu
186+
# - target: powerpc-unknown-linux-gnu
187+
# env:
188+
# RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
189+
# artifact-tag: offset-bits64
175190
timeout-minutes: 25
176191
env:
177192
TARGET: ${{ matrix.target }}
@@ -200,7 +215,7 @@ jobs:
200215
- uses: actions/upload-artifact@v4
201216
if: always() && steps.create_artifacts.outcome == 'success'
202217
with:
203-
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
218+
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
204219
path: ${{ env.ARCHIVE_PATH }}
205220
retention-days: 5
206221

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
@@ -75,6 +75,11 @@ test_target() {
7575
if [ "$os" = "linux" ]; then
7676
# Test with the equivalent of __USE_TIME_BITS64
7777
RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64=1 $cmd
78+
case "$target" in
79+
# Test with the equivalent of __FILE_OFFSET_BITS=64
80+
arm*-gnu*|i*86*-gnu|powerpc-*-gnu*|mips*-gnu|sparc-*-gnu|thumb-*gnu*)
81+
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS=64 $cmd;;
82+
esac
7883
fi
7984

8085
# Test again without default features, i.e. without "std"
@@ -92,7 +97,7 @@ test_target() {
9297
stable-x86_64-*freebsd*) do_freebsd_checks=1 ;;
9398
nightly-i686*freebsd*) do_freebsd_checks=1 ;;
9499
esac
95-
100+
96101
if [ -n "${do_freebsd_checks:-}" ]; then
97102
for version in $freebsd_versions; do
98103
export RUST_LIBC_UNSTABLE_FREEBSD_VERSION="$version"
@@ -300,7 +305,7 @@ filter_and_run() {
300305
if [ "$target" = "wasm32-wasip2" ] && [ "$supports_wasi_pn" = "0" ]; then
301306
return
302307
fi
303-
308+
304309
test_target "$target" "$no_dist"
305310
some_tests_run=1
306311
fi

0 commit comments

Comments
 (0)