Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove preserves_flags on 32-bit x86. #726

Merged
merged 10 commits into from
Jul 5, 2023
2 changes: 0 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ task:
freebsd_instance:
image_family: freebsd-13-0-snap
setup_script:
- pkg install -y curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh --default-toolchain stable -y --profile=minimal
- . $HOME/.cargo/env
Expand All @@ -20,7 +19,6 @@ task:
freebsd_instance:
image_family: freebsd-12-1
setup_script:
- pkg install -y curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh --default-toolchain stable -y --profile=minimal
- . $HOME/.cargo/env
Expand Down
91 changes: 51 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand All @@ -32,7 +32,7 @@ jobs:
rust: stable
- build: nightly
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
- build: 1.48
os: ubuntu-latest
rust: 1.48
Expand All @@ -41,7 +41,7 @@ jobs:
# -D warnings is commented out in our install-rust action; re-add it here.
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand All @@ -57,7 +57,6 @@ jobs:
x86_64-apple-darwin
x86_64-unknown-freebsd
x86_64-unknown-netbsd
x86_64-fuchsia
x86_64-unknown-illumos
i686-unknown-linux-gnu
i686-unknown-linux-musl
Expand All @@ -75,6 +74,11 @@ jobs:
sparcv9-sun-solaris
aarch64-linux-android
aarch64-apple-ios
- if: matrix.rust != '1.48'
run: rustup target add x86_64-unknown-fuchsia
- if: matrix.rust == '1.48'
run: rustup target add x86_64-fuchsia

- name: Install cross-compilation tools
run: |
set -ex
Expand All @@ -83,7 +87,9 @@ jobs:

- name: Use specific dependency versions for Rust 1.48 compatibility.
if: matrix.rust == '1.48'
run: cargo update --package=once_cell --precise 1.14.0
run: |
cargo update --package=once_cell --precise 1.14.0
cargo update --package=tempfile --precise=3.3.0

- run: cargo check --workspace --release -vv
- run: cargo check --workspace --release -vv --features=all-apis
Expand All @@ -97,7 +103,10 @@ jobs:
- run: cargo check --workspace --release -vv --target=x86_64-apple-darwin --features=all-apis
- run: cargo check --workspace --release -vv --target=x86_64-unknown-freebsd --features=all-apis
- run: cargo check --workspace --release -vv --target=x86_64-unknown-netbsd --features=all-apis
- run: cargo check --workspace --release -vv --target=x86_64-fuchsia --features=all-apis
- if: matrix.rust != '1.48'
run: cargo check --workspace --release -vv --target=x86_64-unknown-fuchsia --features=all-apis --all-targets
- if: matrix.rust == '1.48'
run: cargo check --workspace --release -vv --target=x86_64-fuchsia --features=all-apis --all-targets
- run: cargo check --workspace --release -vv --target=x86_64-unknown-illumos --features=all-apis
- run: cargo check --workspace --release -vv --target=i686-unknown-linux-gnu --features=all-apis
- run: cargo check --workspace --release -vv --target=i686-unknown-linux-musl --features=all-apis
Expand Down Expand Up @@ -127,13 +136,13 @@ jobs:
include:
- build: nightly
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03

env:
# -D warnings is commented out in our install-rust action; re-add it here.
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand All @@ -150,10 +159,10 @@ jobs:
include:
- build: nightly
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand All @@ -177,10 +186,10 @@ jobs:
include:
- build: nightly
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand All @@ -206,24 +215,21 @@ jobs:
QEMU_BUILD_VERSION: 7.0.0
strategy:
matrix:
build: [ubuntu, ubuntu-18.04, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, s390x-linux, arm-linux, ubuntu-stable, i686-linux-stable, aarch64-linux-stable, riscv64-linux-stable, s390x-linux-stable, mipsel-linux-stable, mips64el-linux-stable, powerpc64le-linux-stable, arm-linux-stable, macos-latest, macos-10.15, windows, windows-2019]
build: [ubuntu, i686-linux, aarch64-linux, powerpc64le-linux, riscv64-linux, s390x-linux, arm-linux, ubuntu-stable, i686-linux-stable, aarch64-linux-stable, riscv64-linux-stable, s390x-linux-stable, mipsel-linux-stable, mips64el-linux-stable, powerpc64le-linux-stable, arm-linux-stable, macos-latest, macos-10.15, windows, windows-2019]
include:
- build: ubuntu
os: ubuntu-latest
rust: nightly
- build: ubuntu-18.04
os: ubuntu-18.04
rust: nightly
rust: nightly-2023-07-03
- build: i686-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
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-latest
rust: nightly
rust: nightly-2023-07-03
target: aarch64-unknown-linux-gnu
gcc_package: gcc-aarch64-linux-gnu
gcc: aarch64-linux-gnu-gcc
Expand All @@ -232,7 +238,7 @@ jobs:
qemu_target: aarch64-linux-user
- build: powerpc64le-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: powerpc64le-unknown-linux-gnu
gcc_package: gcc-powerpc64le-linux-gnu
gcc: powerpc64le-linux-gnu-gcc
Expand All @@ -241,7 +247,7 @@ jobs:
qemu_target: ppc64le-linux-user
- build: mips64el-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: mips64el-unknown-linux-gnuabi64
gcc_package: gcc-mips64el-linux-gnuabi64
gcc: mips64el-linux-gnuabi64-gcc
Expand All @@ -250,7 +256,7 @@ jobs:
qemu_target: mips64el-linux-user
- build: mipsel-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: mipsel-unknown-linux-gnu
gcc_package: gcc-mipsel-linux-gnu
gcc: mipsel-linux-gnu-gcc
Expand All @@ -259,7 +265,7 @@ jobs:
qemu_target: mipsel-linux-user
- build: riscv64-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: riscv64gc-unknown-linux-gnu
gcc_package: gcc-riscv64-linux-gnu
gcc: riscv64-linux-gnu-gcc
Expand All @@ -268,7 +274,7 @@ jobs:
qemu_target: riscv64-linux-user
- build: s390x-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: s390x-unknown-linux-gnu
gcc_package: gcc-s390x-linux-gnu
gcc: s390x-linux-gnu-gcc
Expand All @@ -277,7 +283,7 @@ jobs:
qemu_target: s390x-linux-user
- build: arm-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: armv5te-unknown-linux-gnueabi
gcc_package: gcc-arm-linux-gnueabi
gcc: arm-linux-gnueabi-gcc
Expand Down Expand Up @@ -365,12 +371,12 @@ jobs:
rust: stable
- build: windows
os: windows-latest
rust: nightly
rust: nightly-2023-07-03
- build: windows-2019
os: windows-2019
rust: nightly
rust: nightly-2023-07-03
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand All @@ -383,7 +389,7 @@ jobs:
rustup target add ${{ matrix.target }}
if: matrix.target != ''

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ runner.tool_cache }}/qemu
key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}-patched
Expand Down Expand Up @@ -431,15 +437,20 @@ jobs:
ninja -C build install
if: matrix.qemu != '' && matrix.os == 'ubuntu-latest'

- name: Use specific dependency versions for Rust 1.48 compatibility.
if: matrix.rust == '1.48'
run: |
cargo update --package=once_cell --precise 1.14.0
cargo update --package=tempfile --precise=3.3.0

- run: |
# Run the tests, and check the prebuilt release libraries.
cargo test --verbose --features=all-impls,all-apis,cc --release --workspace -- --nocapture
# Run the tests.
cargo test --verbose --features=all-impls,all-apis --release --workspace -- --nocapture
env:
RUST_BACKTRACE: full

- run: |
# Check the prebuilt debug libraries too.
cargo check --features=all-impls,all-apis,cc
cargo check --features=all-impls,all-apis

test_use_libc:
name: Test use-libc
Expand Down Expand Up @@ -517,7 +528,7 @@ jobs:
RUSTFLAGS: -D warnings
QEMU_BUILD_VERSION: 7.0.0
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand All @@ -530,7 +541,7 @@ jobs:
rustup target add ${{ matrix.target }}
if: matrix.target != ''

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ runner.tool_cache }}/qemu
key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}-patched
Expand Down Expand Up @@ -592,7 +603,7 @@ jobs:
include:
- build: powerpc64le-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: powerpc64le-unknown-linux-gnu
gcc_package: gcc-powerpc64le-linux-gnu
gcc: powerpc64le-linux-gnu-gcc
Expand All @@ -601,7 +612,7 @@ jobs:
qemu_target: ppc64le-linux-user
- build: mips64el-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: mips64el-unknown-linux-gnuabi64
gcc_package: gcc-mips64el-linux-gnuabi64
gcc: mips64el-linux-gnuabi64-gcc
Expand All @@ -610,7 +621,7 @@ jobs:
qemu_target: mips64el-linux-user
- build: mipsel-linux
os: ubuntu-latest
rust: nightly
rust: nightly-2023-07-03
target: mipsel-unknown-linux-gnu
gcc_package: gcc-mipsel-linux-gnu
gcc: mipsel-linux-gnu-gcc
Expand All @@ -626,7 +637,7 @@ jobs:
CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_RUSTFLAGS: --cfg rustix_use_experimental_asm
QEMU_BUILD_VERSION: 7.0.0
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/actions/install-rust
Expand All @@ -639,7 +650,7 @@ jobs:
rustup target add ${{ matrix.target }}
if: matrix.target != ''

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ runner.tool_cache }}/qemu
key: qemu-${{ matrix.target }}-${{ env.QEMU_BUILD_VERSION }}-patched
Expand Down
9 changes: 0 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,9 @@ io-lifetimes = { version = "0.7.0", default-features = false, features = ["close
serial_test = "0.6"
memoffset = "0.6.5"

[target.'cfg(not(target_os = "emscripten"))'.dev-dependencies]
criterion = "0.3"

[target.'cfg(windows)'.dev-dependencies]
ctor = "0.1.21"

# Add Criterion configuration, as described here:
# <https://bheisler.github.io/criterion.rs/book/getting_started.html#step-1---add-dependency-to-cargotoml>
[[bench]]
name = "mod"
harness = false

[package.metadata.docs.rs]
features = ["all-apis"]
rustdoc-args = ["--cfg", "doc_cfg"]
Expand Down
Loading
Loading