From 0b653387275a9dace11f2283dd729ad4e8095fa4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 25 Aug 2023 12:58:00 -0700 Subject: [PATCH] Disable MIPS in CI. (#793) * Disable MIPS in CI. Enable check-only testing. * Unpin nightly. * Disable MIPS check tests too. * Mention `rusl` as another similar crate. * Fix a test on illumos. --- .github/workflows/main.yml | 182 +++++++++---------------------------- README.md | 5 +- 2 files changed, 46 insertions(+), 141 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ef35ca81..0a492b327 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: rust: stable - build: nightly os: ubuntu-latest - rust: nightly-2023-07-03 + rust: nightly - build: 1.48 os: ubuntu-latest rust: 1.48 @@ -66,8 +66,6 @@ jobs: aarch64-unknown-linux-gnu aarch64-unknown-linux-musl powerpc64le-unknown-linux-gnu - mipsel-unknown-linux-gnu - mips64el-unknown-linux-gnuabi64 armv5te-unknown-linux-gnueabi s390x-unknown-linux-gnu arm-linux-androideabi @@ -126,8 +124,6 @@ jobs: - run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-musl --features=all-apis --all-targets - run: cargo check --workspace --release -vv --target=aarch64-unknown-linux-musl --features=use-libc,all-apis --all-targets - run: cargo check --workspace --release -vv --target=powerpc64le-unknown-linux-gnu --features=all-apis --all-targets - - run: cargo check --workspace --release -vv --target=mipsel-unknown-linux-gnu --features=all-apis --all-targets - - run: cargo check --workspace --release -vv --target=mips64el-unknown-linux-gnuabi64 --features=all-apis --all-targets - run: cargo check --workspace --release -vv --target=armv5te-unknown-linux-gnueabi --features=all-apis --all-targets - run: cargo check --workspace --release -vv --target=s390x-unknown-linux-gnu --features=all-apis --all-targets - run: cargo check --workspace --release -vv --target=arm-linux-androideabi --features=all-apis --all-targets @@ -149,7 +145,7 @@ jobs: include: - build: nightly os: ubuntu-latest - rust: nightly-2023-07-03 + rust: nightly env: # -D warnings is commented out in our install-rust action; re-add it here. @@ -173,7 +169,7 @@ jobs: include: - build: nightly os: ubuntu-latest - rust: nightly-2023-07-03 + rust: nightly steps: - uses: actions/checkout@v3 @@ -200,7 +196,7 @@ jobs: include: - build: nightly os: ubuntu-latest - rust: nightly-2023-07-03 + rust: nightly steps: - uses: actions/checkout@v3 @@ -232,24 +228,24 @@ jobs: QEMU_BUILD_VERSION: 7.0.0 strategy: matrix: - build: [ubuntu, ubuntu-20.04, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, s390x-linux, arm-linux, ubuntu-stable, ubuntu-1.48, i686-linux-stable, aarch64-linux-stable, riscv64-linux-stable, s390x-linux-stable, mipsel-linux-stable, mips64el-linux-stable, powerpc64le-linux-stable, arm-linux-stable, ubuntu-1.48, i686-linux-1.48, aarch64-linux-1.48, riscv64-linux-1.48, s390x-linux-1.48, mipsel-linux-1.48, mips64el-linux-1.48, powerpc64le-linux-1.48, arm-linux-1.48, macos-latest, macos-11, windows, windows-2019] + build: [ubuntu, ubuntu-20.04, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, s390x-linux, arm-linux, ubuntu-stable, ubuntu-1.48, i686-linux-stable, aarch64-linux-stable, riscv64-linux-stable, s390x-linux-stable, powerpc64le-linux-stable, arm-linux-stable, ubuntu-1.48, i686-linux-1.48, aarch64-linux-1.48, riscv64-linux-1.48, s390x-linux-1.48, powerpc64le-linux-1.48, arm-linux-1.48, macos-latest, macos-11, windows, windows-2019] include: - build: ubuntu - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 + os: ubuntu-latest + rust: nightly - build: ubuntu-20.04 os: ubuntu-20.04 - rust: nightly-2023-07-03 + rust: nightly - build: i686-linux - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 + os: ubuntu-latest + rust: nightly target: i686-unknown-linux-gnu gcc_package: gcc-i686-linux-gnu gcc: i686-linux-gnu-gcc libc_package: libc-dev-i386-cross - build: aarch64-linux - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 + os: ubuntu-latest + rust: nightly target: aarch64-unknown-linux-gnu gcc_package: gcc-aarch64-linux-gnu gcc: aarch64-linux-gnu-gcc @@ -257,35 +253,17 @@ jobs: qemu_args: -L /usr/aarch64-linux-gnu qemu_target: aarch64-linux-user - build: powerpc64le-linux - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 + os: ubuntu-latest + rust: nightly target: powerpc64le-unknown-linux-gnu gcc_package: gcc-powerpc64le-linux-gnu gcc: powerpc64le-linux-gnu-gcc qemu: qemu-ppc64le qemu_args: -L /usr/powerpc64le-linux-gnu qemu_target: ppc64le-linux-user - - build: mips64el-linux - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 - target: mips64el-unknown-linux-gnuabi64 - gcc_package: gcc-mips64el-linux-gnuabi64 - gcc: mips64el-linux-gnuabi64-gcc - qemu: qemu-mips64el - qemu_args: -L /usr/mips64el-linux-gnuabi64 - qemu_target: mips64el-linux-user - - build: mipsel-linux - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 - target: mipsel-unknown-linux-gnu - gcc_package: gcc-mipsel-linux-gnu - gcc: mipsel-linux-gnu-gcc - qemu: qemu-mipsel - qemu_args: -L /usr/mipsel-linux-gnu - qemu_target: mipsel-linux-user - build: riscv64-linux - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 + os: ubuntu-latest + rust: nightly target: riscv64gc-unknown-linux-gnu gcc_package: gcc-riscv64-linux-gnu gcc: riscv64-linux-gnu-gcc @@ -293,8 +271,8 @@ jobs: qemu_args: -L /usr/riscv64-linux-gnu qemu_target: riscv64-linux-user - build: s390x-linux - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 + os: ubuntu-latest + rust: nightly target: s390x-unknown-linux-gnu gcc_package: gcc-s390x-linux-gnu gcc: s390x-linux-gnu-gcc @@ -302,8 +280,8 @@ jobs: qemu_args: -L /usr/s390x-linux-gnu qemu_target: s390x-linux-user - build: arm-linux - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: nightly-2023-07-03 + os: ubuntu-latest + rust: nightly target: armv5te-unknown-linux-gnueabi gcc_package: gcc-arm-linux-gnueabi gcc: arm-linux-gnueabi-gcc @@ -311,17 +289,17 @@ jobs: qemu_args: -L /usr/arm-linux-gnueabi qemu_target: arm-linux-user - build: ubuntu-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: stable - build: i686-linux-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: stable target: i686-unknown-linux-gnu gcc_package: gcc-i686-linux-gnu gcc: i686-linux-gnu-gcc libc_package: libc-dev-i386-cross - build: aarch64-linux-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: stable target: aarch64-unknown-linux-gnu gcc_package: gcc-aarch64-linux-gnu @@ -330,7 +308,7 @@ jobs: qemu_args: -L /usr/aarch64-linux-gnu qemu_target: aarch64-linux-user - build: riscv64-linux-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: stable target: riscv64gc-unknown-linux-gnu gcc_package: gcc-riscv64-linux-gnu @@ -339,7 +317,7 @@ jobs: qemu_args: -L /usr/riscv64-linux-gnu qemu_target: riscv64-linux-user - build: s390x-linux-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: stable target: s390x-unknown-linux-gnu gcc_package: gcc-s390x-linux-gnu @@ -348,7 +326,7 @@ jobs: qemu_args: -L /usr/s390x-linux-gnu qemu_target: s390x-linux-user - build: powerpc64le-linux-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: stable target: powerpc64le-unknown-linux-gnu gcc_package: gcc-powerpc64le-linux-gnu @@ -356,26 +334,8 @@ jobs: qemu: qemu-ppc64le qemu_args: -L /usr/powerpc64le-linux-gnu qemu_target: ppc64le-linux-user - - build: mips64el-linux-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: stable - target: mips64el-unknown-linux-gnuabi64 - gcc_package: gcc-mips64el-linux-gnuabi64 - gcc: mips64el-linux-gnuabi64-gcc - qemu: qemu-mips64el - qemu_args: -L /usr/mips64el-linux-gnuabi64 - qemu_target: mips64el-linux-user - - build: mipsel-linux-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: stable - target: mipsel-unknown-linux-gnu - gcc_package: gcc-mipsel-linux-gnu - gcc: mipsel-linux-gnu-gcc - qemu: qemu-mipsel - qemu_args: -L /usr/mipsel-linux-gnu - qemu_target: mipsel-linux-user - build: arm-linux-stable - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: stable target: armv5te-unknown-linux-gnueabi gcc_package: gcc-arm-linux-gnueabi @@ -384,17 +344,17 @@ jobs: qemu_args: -L /usr/arm-linux-gnueabi qemu_target: arm-linux-user - build: ubuntu-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: 1.48 - build: i686-linux-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: 1.48 target: i686-unknown-linux-gnu gcc_package: gcc-i686-linux-gnu gcc: i686-linux-gnu-gcc libc_package: libc-dev-i386-cross - build: aarch64-linux-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: 1.48 target: aarch64-unknown-linux-gnu gcc_package: gcc-aarch64-linux-gnu @@ -403,7 +363,7 @@ jobs: qemu_args: -L /usr/aarch64-linux-gnu qemu_target: aarch64-linux-user - build: riscv64-linux-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: 1.48 target: riscv64gc-unknown-linux-gnu gcc_package: gcc-riscv64-linux-gnu @@ -412,7 +372,7 @@ jobs: qemu_args: -L /usr/riscv64-linux-gnu qemu_target: riscv64-linux-user - build: s390x-linux-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: 1.48 target: s390x-unknown-linux-gnu gcc_package: gcc-s390x-linux-gnu @@ -421,7 +381,7 @@ jobs: qemu_args: -L /usr/s390x-linux-gnu qemu_target: s390x-linux-user - build: powerpc64le-linux-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: 1.48 target: powerpc64le-unknown-linux-gnu gcc_package: gcc-powerpc64le-linux-gnu @@ -429,26 +389,8 @@ jobs: qemu: qemu-ppc64le qemu_args: -L /usr/powerpc64le-linux-gnu qemu_target: ppc64le-linux-user - - build: mips64el-linux-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: 1.48 - target: mips64el-unknown-linux-gnuabi64 - gcc_package: gcc-mips64el-linux-gnuabi64 - gcc: mips64el-linux-gnuabi64-gcc - qemu: qemu-mips64el - qemu_args: -L /usr/mips64el-linux-gnuabi64 - qemu_target: mips64el-linux-user - - build: mipsel-linux-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) - rust: 1.48 - target: mipsel-unknown-linux-gnu - gcc_package: gcc-mipsel-linux-gnu - gcc: mipsel-linux-gnu-gcc - qemu: qemu-mipsel - qemu_args: -L /usr/mipsel-linux-gnu - qemu_target: mipsel-linux-user - build: arm-linux-1.48 - os: ubuntu-20.04 # TODO: remove pin when fixed (#483) + os: ubuntu-latest rust: 1.48 target: armv5te-unknown-linux-gnueabi gcc_package: gcc-arm-linux-gnueabi @@ -464,10 +406,10 @@ jobs: rust: stable - build: windows os: windows-latest - rust: nightly-2023-07-03 + rust: nightly - build: windows-2019 os: windows-2019 - rust: nightly-2023-07-03 + rust: nightly steps: - uses: actions/checkout@v3 with: @@ -486,7 +428,7 @@ jobs: with: path: ${{ runner.tool_cache }}/qemu key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}-patched - if: matrix.target != '' && matrix.os == 'ubuntu-20.04' # TODO: remove pin when fixed (#483) + if: matrix.target != '' && matrix.os == 'ubuntu-latest' - name: Install cross-compilation tools run: | @@ -495,14 +437,14 @@ jobs: sudo apt-get install -y ${{ matrix.gcc_package }} ninja-build upcase=$(echo ${{ matrix.target }} | awk '{ print toupper($0) }' | sed 's/-/_/g') echo CARGO_TARGET_${upcase}_LINKER=${{ matrix.gcc }} >> $GITHUB_ENV - if: matrix.gcc_package != '' && matrix.os == 'ubuntu-20.04' # TODO: remove pin when fixed (#483) + if: matrix.gcc_package != '' && matrix.os == 'ubuntu-latest' - name: Install cross-compilation libraries run: | set -ex sudo apt-get update sudo apt-get install -y ${{ matrix.libc_package }} - if: matrix.libc_package != '' && matrix.os == 'ubuntu-20.04' # TODO: remove pin when fixed (#483) + if: matrix.libc_package != '' && matrix.os == 'ubuntu-latest' - name: Install qemu run: | @@ -523,7 +465,7 @@ jobs: patch -p1 < $GITHUB_WORKSPACE/ci/s390x-stat-have-nsec.patch ./configure --target-list=${{ matrix.qemu_target }} --prefix=${{ runner.tool_cache }}/qemu --disable-tools --disable-slirp --disable-fdt --disable-capstone --disable-docs ninja -C build install - if: matrix.qemu != '' && matrix.os == 'ubuntu-20.04' # TODO: remove pin when fixed (#483) + if: matrix.qemu != '' && matrix.os == 'ubuntu-latest' - name: Use specific dependency versions for Rust 1.48 compatibility. if: matrix.rust == '1.48' @@ -575,7 +517,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - build: [ubuntu, i686-linux, aarch64-linux, powerpc64le-linux, mips64el-linux, mipsel-linux, riscv64-linux, arm-linux] + build: [ubuntu, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, arm-linux] include: - build: ubuntu os: ubuntu-latest @@ -605,24 +547,6 @@ jobs: qemu: qemu-ppc64le qemu_args: -L /usr/powerpc64le-linux-gnu qemu_target: ppc64le-linux-user - - build: mips64el-linux - os: ubuntu-latest - rust: stable - target: mips64el-unknown-linux-gnuabi64 - gcc_package: gcc-mips64el-linux-gnuabi64 - gcc: mips64el-linux-gnuabi64-gcc - qemu: qemu-mips64el - qemu_args: -L /usr/mips64el-linux-gnuabi64 - qemu_target: mips64el-linux-user - - build: mipsel-linux - os: ubuntu-latest - rust: stable - target: mipsel-unknown-linux-gnu - gcc_package: gcc-mipsel-linux-gnu - gcc: mipsel-linux-gnu-gcc - qemu: qemu-mipsel - qemu_args: -L /usr/mipsel-linux-gnu - qemu_target: mipsel-linux-user - build: riscv64-linux os: ubuntu-latest rust: stable @@ -712,42 +636,22 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - build: [powerpc64le-linux, mipsel-linux, mips64el-linux] + build: [powerpc64le-linux] include: - build: powerpc64le-linux os: ubuntu-latest - rust: nightly-2023-07-03 + rust: nightly target: powerpc64le-unknown-linux-gnu gcc_package: gcc-powerpc64le-linux-gnu gcc: powerpc64le-linux-gnu-gcc qemu: qemu-ppc64le qemu_args: -L /usr/powerpc64le-linux-gnu qemu_target: ppc64le-linux-user - - build: mips64el-linux - os: ubuntu-latest - rust: nightly-2023-07-03 - target: mips64el-unknown-linux-gnuabi64 - gcc_package: gcc-mips64el-linux-gnuabi64 - gcc: mips64el-linux-gnuabi64-gcc - qemu: qemu-mips64el - qemu_args: -L /usr/mips64el-linux-gnuabi64 - qemu_target: mips64el-linux-user - - build: mipsel-linux - os: ubuntu-latest - rust: nightly-2023-07-03 - target: mipsel-unknown-linux-gnu - gcc_package: gcc-mipsel-linux-gnu - gcc: mipsel-linux-gnu-gcc - qemu: qemu-mipsel - qemu_args: -L /usr/mipsel-linux-gnu - qemu_target: mipsel-linux-user env: # -D warnings is commented out in our install-rust action; re-add it here. RUSTFLAGS: --cfg rustix_use_experimental_asm -D warnings RUSTDOCFLAGS: --cfg rustix_use_experimental_asm CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUSTFLAGS: --cfg rustix_use_experimental_asm - CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_RUSTFLAGS: --cfg rustix_use_experimental_asm - CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_RUSTFLAGS: --cfg rustix_use_experimental_asm QEMU_BUILD_VERSION: 7.0.0 steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index 276fa9c04..e13bcb336 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,8 @@ by default. The rest of the API is conditional with cargo feature flags: ## Similar crates -`rustix` is similar to [`nix`], [`simple_libc`], [`unix`], [`nc`], and -[`uapi`]. `rustix` is architected for [I/O safety] with most APIs using +`rustix` is similar to [`nix`], [`simple_libc`], [`unix`], [`nc`], [`uapi`], +and [`rusl`]. `rustix` is architected for [I/O safety] with most APIs using [`OwnedFd`] and [`AsFd`] to manipulate file descriptors rather than `File` or even `c_int`, and supporting multiple backends so that it can use direct syscalls while still being usable on all platforms `libc` supports. Like `nix`, @@ -136,6 +136,7 @@ version of this crate. [`nc`]: https://crates.io/crates/nc [`simple_libc`]: https://crates.io/crates/simple_libc [`uapi`]: https://crates.io/crates/uapi +[`rusl`]: https://lib.rs/crates/rusl [`relibc`]: https://github.com/redox-os/relibc [`syscall`]: https://crates.io/crates/syscall [`sc`]: https://crates.io/crates/sc