Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
eef435d
Upgrade all dependencies to latest
tgross35 Oct 25, 2025
307297b
ci: Simplify job matrix with defaults
tgross35 Oct 25, 2025
fcee697
ci: Sort the tier1 targets
tgross35 Oct 25, 2025
d4f893a
ci: Update the tier1 jobs
tgross35 Oct 25, 2025
757cb1d
ci: Switch tier2 to use `include` style
tgross35 Oct 25, 2025
0cc7293
ci: Increase tier 2 max-parallel
tgross35 Oct 25, 2025
79fd792
ci: Don't retry the s390x job
tgross35 Oct 25, 2025
d968de3
ci: Add an x86_64-apple job
tgross35 Oct 25, 2025
20c1d85
Add missing defines/functions needed by rust stdlib
hax0kartik Oct 26, 2025
e652533
ci: Switch `verify-build` to a python script
tgross35 Oct 26, 2025
5df6fdf
ci: Update targets in verify-build
tgross35 Oct 26, 2025
5cff45f
ci: Always run verify-build on Linux
tgross35 Oct 26, 2025
6c3d7d2
ci: Print elapsed time as part of verify-build
tgross35 Oct 26, 2025
4b11b92
ci: Launch create-artifacts.py with python
tgross35 Oct 26, 2025
bfaae4f
aix: Resolve function comparison and `unnecessary_transmutes` warnings
tgross35 Oct 26, 2025
d16571a
ci: For no-dist targets, do a check rather than a full build
tgross35 Oct 26, 2025
5e1a496
macros: Allow `s!` and `s_no_extra_traits!` to take private items
tgross35 Oct 27, 2025
681779f
ci: Pass the `MUSL_V1_2_3` env in docker
tgross35 Oct 26, 2025
3bd6f96
musl: Fix skips with recent versions
tgross35 Oct 26, 2025
4c464c9
ci: Also check builds with `musl_v1_2_3`
tgross35 Oct 27, 2025
ad2d7df
ci: Run gnu env tests as part of the main job
tgross35 Oct 26, 2025
507a73e
ci: Only test against one of two musl versions
tgross35 Oct 27, 2025
4e71247
Change errno EWOULDBLOCK to make it an alias of EAGAIN.
xingxue-ibm Oct 27, 2025
05c7505
build(deps): bump actions/upload-artifact from 4 to 5
dependabot[bot] Oct 27, 2025
fa6360a
Add an `offset_of` macro
tgross35 Oct 27, 2025
5796438
ci: Commonize dockerfile style
tgross35 Oct 28, 2025
f54c822
ci: Remove unused dependency installs
tgross35 Oct 29, 2025
a1d1c3f
Adding defines and functions required for vxworks
gautam899 Oct 15, 2025
d597864
VxWorks: Mention that the release ID represents minor+patch
tgross35 Oct 29, 2025
0f00b8c
doc: Fix rustdoc `bare_urls` warnings
tgross35 Oct 25, 2025
b06e475
reorg: Introduce a posix/unistd module
tgross35 Oct 25, 2025
2d42e17
glibc: Initial setup of source reorganization
tgross35 Jul 8, 2025
9a1041d
ci: Skip hexagon-unknown-linux-musl
tgross35 Oct 30, 2025
8f2e6a7
ci: Re-enable ohos check builds
tgross35 Oct 30, 2025
31ead46
ohos: Don't emit duplicate lfs64 definitions
tgross35 Oct 30, 2025
04ca756
musl: Switch to the new structure for `socket.h`
tgross35 Jul 8, 2025
85d7416
Flip `Copy` and `PartialEq, Hash` derives for packed struct support
tgross35 Nov 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 85 additions & 102 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ jobs:
name: Verify build
strategy:
matrix:
toolchain: [stable, nightly, 1.63.0]
os: [ubuntu-24.04, macos-15, windows-2025]
toolchain: [stable, 1.63.0]
include:
# Nightly has a lot of targets, so split it in half
- toolchain: nightly
half: 1
- toolchain: nightly
half: 2
- toolchain: beta
os: ubuntu-24.04
runs-on: ${{ matrix.os }}
only: '(aarch64|x86_64)' # just a spot check for beta
- toolchain: stable
- toolchain: 1.63.0 # msrv
runs-on: ubuntu-24.04
timeout-minutes: 25
env:
TOOLCHAIN: ${{ matrix.toolchain }}
Expand All @@ -78,12 +84,15 @@ jobs:
- name: Target size after restoring cache
run: du -sh target | sort -k 2 || true

- name: Execute build.sh
- name: Execute build check
run: |
set -eux
# Remove `-Dwarnings` at the MSRV since lints may be different
[ "${{ matrix.toolchain }}" = "1.63.0" ] && export RUSTFLAGS=""
./ci/verify-build.sh
python3 ci/verify-build.py \
--toolchain "$TOOLCHAIN" \
${{ matrix.only && format('--only "{0}"', matrix.only) }} \
${{ matrix.half && format('--half "{0}"', matrix.half) }}
- name: Target size after job completion
run: du -sh target | sort -k 2

Expand All @@ -92,41 +101,25 @@ jobs:
strategy:
matrix:
include:
- target: i686-unknown-linux-gnu
docker: true
os: ubuntu-24.04
- target: i686-unknown-linux-gnu
docker: true
os: ubuntu-24.04
artifact-tag: offset-bits64
env:
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
- target: i686-unknown-linux-gnu
docker: true
os: ubuntu-24.04
artifact-tag: time-bits64
env:
RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64
- target: x86_64-unknown-linux-gnu
docker: true
os: ubuntu-24.04
- target: aarch64-apple-darwin
os: macos-15
- target: x86_64-pc-windows-gnu
os: windows-2025
env:
ARCH_BITS: 64
ARCH: x86_64
- target: x86_64-pc-windows-msvc
os: windows-2025
- target: aarch64-pc-windows-msvc
os: windows-11-arm
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
# FIXME: It currently causes segfaults.
#- target: i686-pc-windows-gnu
# env:
# ARCH_BITS: 32
# ARCH: i686
# env: { ARCH_BITS: 32, ARCH: i686 }
- target: i686-pc-windows-msvc
os: windows-2025
runs-on: ${{ matrix.os }}
- target: i686-unknown-linux-gnu
- target: x86_64-pc-windows-gnu
os: windows-2025
env: { ARCH_BITS: 64, ARCH: x86_64 }
- target: x86_64-pc-windows-msvc
os: windows-2025
- target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os && matrix.os || 'ubuntu-24.04' }}
timeout-minutes: 25
env:
TARGET: ${{ matrix.target }}
Expand All @@ -146,17 +139,17 @@ jobs:
shell: bash

- name: Run natively
if: "!matrix.docker"
if: runner.os != 'Linux'
run: ./ci/run.sh ${{ matrix.target }}
- name: Run in Docker
if: "matrix.docker"
if: runner.os == 'Linux'
run: ./ci/run-docker.sh ${{ matrix.target }}

- name: Create CI artifacts
id: create_artifacts
if: always()
run: ./ci/create-artifacts.py
- uses: actions/upload-artifact@v4
run: python3 ci/create-artifacts.py
- uses: actions/upload-artifact@v5
if: always() && steps.create_artifacts.outcome == 'success'
with:
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
Expand All @@ -166,79 +159,64 @@ jobs:
# Unlike `main` this job doesn't have `needs`, in order to speed up backports a bit
test_tier2:
name: Test tier2
runs-on: ubuntu-24.04
needs: [test_tier1, style_check]
strategy:
fail-fast: true
max-parallel: 12
max-parallel: 16
matrix:
target:
include:
# FIXME(sparc): this takes much longer to run than any other job, put
# it first to make sure it gets a head start.
- sparc64-unknown-linux-gnu
- aarch64-linux-android
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- arm-linux-androideabi
- arm-unknown-linux-musleabihf
# FIXME(#4297): Disabled due to spurious failueSome android jobs are disabled because of high rates of
# - i686-linux-android
- i686-unknown-linux-musl
- loongarch64-unknown-linux-gnu
- loongarch64-unknown-linux-musl
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- powerpc64le-unknown-linux-musl
- riscv64gc-unknown-linux-gnu
- s390x-unknown-linux-gnu
- wasm32-unknown-emscripten
- wasm32-wasip1
- wasm32-wasip2
- x86_64-linux-android
# FIXME: Exec format error (os error 8)
# - x86_64-unknown-linux-gnux32
- x86_64-unknown-linux-musl
# FIXME: It seems some items in `src/unix/mod.rs`
# aren't defined on redox actually.
# - x86_64-unknown-redox
include:
- target: arm-unknown-linux-gnueabihf
- target: arm-unknown-linux-gnueabihf
env:
RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
artifact-tag: offset-bits64
- target: arm-unknown-linux-gnueabihf
env:
RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64
artifact-tag: time-bits64
- target: sparc64-unknown-linux-gnu
- target: aarch64-linux-android
- target: aarch64-unknown-linux-musl
env:
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
- target: aarch64-unknown-linux-musl
env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 }
artifact-tag: new-musl
- target: arm-linux-androideabi
- target: arm-unknown-linux-gnueabihf
- target: arm-unknown-linux-musleabihf
- target: arm-unknown-linux-musleabihf
env:
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 }
artifact-tag: new-musl
# FIXME(#4297): Disabled due to spurious failue
# - target: i686-linux-android
- target: i686-unknown-linux-musl
env:
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
- target: i686-unknown-linux-musl
env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 }
artifact-tag: new-musl
- target: loongarch64-unknown-linux-gnu
- target: loongarch64-unknown-linux-musl
- target: loongarch64-unknown-linux-musl
env:
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 }
artifact-tag: new-musl
- target: powerpc64-unknown-linux-gnu
- target: powerpc64le-unknown-linux-gnu
- target: powerpc64le-unknown-linux-musl
env:
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
- target: powerpc64le-unknown-linux-musl
env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 }
artifact-tag: new-musl
- target: riscv64gc-unknown-linux-gnu
- target: s390x-unknown-linux-gnu
- target: wasm32-unknown-emscripten
- target: wasm32-wasip1
- target: wasm32-wasip2
- target: x86_64-apple-darwin
os: macos-15-intel
- target: x86_64-linux-android
# FIXME: Exec format error (os error 8)
# - target: x86_64-unknown-linux-gnux32
- target: x86_64-unknown-linux-musl
- target: x86_64-unknown-linux-musl
env:
RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1
env: { RUST_LIBC_UNSTABLE_MUSL_V1_2_3: 1 }
artifact-tag: new-musl
# FIXME: It seems some items in `src/unix/mod.rs` aren't defined on redox actually.
# - target: x86_64-unknown-redox

# FIXME(ppc): SIGILL running tests, see
# https://github.com/rust-lang/libc/pull/4254#issuecomment-2636288713
# - target: powerpc-unknown-linux-gnu
# - target: powerpc-unknown-linux-gnu
# env:
# RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS: 64
# artifact-tag: offset-bits64
# - target: powerpc-unknown-linux-gnu
# env:
# RUST_LIBC_UNSTABLE_GNU_TIME_BITS: 64
# artifact-tag: time-bits64
runs-on: ${{ matrix.os && matrix.os || 'ubuntu-24.04' }}
timeout-minutes: 25
env:
TARGET: ${{ matrix.target }}
Expand All @@ -257,14 +235,18 @@ jobs:
jq -r 'to_entries | map("\(.key)=\(.value|tostring)") | .[]' >>$GITHUB_ENV
shell: bash

- name: Execute run-docker.sh
- name: Run natively
if: runner.os != 'Linux'
run: ./ci/run.sh ${{ matrix.target }}
- name: Run in Docker
if: runner.os == 'Linux'
run: ./ci/run-docker.sh ${{ matrix.target }}

- name: Create CI artifacts
id: create_artifacts
if: always()
run: ./ci/create-artifacts.py
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v5
if: always() && steps.create_artifacts.outcome == 'success'
with:
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}${{ matrix.artifact-tag && format('-{0}', matrix.artifact-tag) }}
Expand All @@ -277,13 +259,14 @@ jobs:
strategy:
fail-fast: true
matrix:
target:
- x86_64-pc-solaris
include:
- target: x86_64-pc-solaris
timeout-minutes: 25
steps:
- uses: actions/checkout@v5
- name: test on Solaris
uses: vmactions/[email protected]
if: contains(matrix.target, 'solaris')
with:
release: "11.4-gcc"
usesh: true
Expand Down
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ but this is not guaranteed.
You can see the platform(target)-specific docs on [docs.rs], select a platform
you want to see.

See [`ci/verify-build.sh`](https://github.com/rust-lang/libc/blob/HEAD/ci/verify-build.sh) for
See [`ci/verify-build.py`](https://github.com/rust-lang/libc/blob/HEAD/ci/verify-build.py) for
the platforms on which `libc` is guaranteed to build for each Rust toolchain.
The test-matrix at [GitHub Actions] and [Cirrus CI] show the platforms in which
`libc` tests are run.
Expand Down
Loading