From 12f940f3a99dfef0fb431c067d2b151e73f2f8f6 Mon Sep 17 00:00:00 2001 From: jtnunley Date: Thu, 23 Mar 2023 00:06:08 -0700 Subject: [PATCH 1/4] Fix cross builds in the CI --- .github/workflows/ci.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 364e531..f75ffee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,30 +78,26 @@ jobs: - name: Install Rust run: rustup update stable - name: Install cross - uses: taiki-e/install-action@v2 - with: - # https://github.com/cross-rs/cross/issues/724 - tool: cross@0.2.1 + uses: taiki-e/install-action@cross + # We don't test BSDs, since we already test them in Cirrus/vmactions. - name: Android if: startsWith(matrix.os, 'ubuntu') run: cross test --target arm-linux-androideabi - - name: NetBSD - if: startsWith(matrix.os, 'ubuntu') - run: cross build --target x86_64-unknown-netbsd - - name: FreeBSD - if: startsWith(matrix.os, 'ubuntu') - run: cross build --target x86_64-unknown-freebsd - name: iOS if: startsWith(matrix.os, 'macos') - run: cross build --target aarch64-apple-ios + run: | + rustup target add aarch64-apple-ios + cross build --target aarch64-apple-ios - name: Linux x32 if: startsWith(matrix.os, 'ubuntu') - run: cross check --target x86_64-unknown-linux-gnux32 + run: | + rustup target add x86_64-unknown-linux-gnux32 + cross check --target x86_64-unknown-linux-gnux32 - name: Fuchsia if: startsWith(matrix.os, 'ubuntu') run: | - rustup target add x86_64-fuchsia - cargo build --target x86_64-fuchsia + rustup target add x86_64-unknown-fuchsia + cargo build --target x86_64-unknown-fuchsia - name: illumos if: startsWith(matrix.os, 'ubuntu') run: | From 7c070e2661df496b5103e0ef55535a1afde5958d Mon Sep 17 00:00:00 2001 From: jtnunley Date: Thu, 23 Mar 2023 00:31:20 -0700 Subject: [PATCH 2/4] Add Cirrus/vmactions targets --- .cirrus.yml | 27 ++++++++++++++++++++++ .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000..07c9763 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,27 @@ +only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master') +auto_cancellation: $CIRRUS_BRANCH != 'master' +env: + CARGO_INCREMENTAL: '0' + CARGO_NET_GIT_FETCH_WITH_CLI: 'true' + CARGO_NET_RETRY: '10' + CARGO_TERM_COLOR: always + RUST_BACKTRACE: '1' + RUSTDOCFLAGS: -D warnings + RUSTFLAGS: -D warnings + RUSTUP_MAX_RETRIES: '10' + +freebsd_task: + name: test ($TARGET) + freebsd_instance: + image_family: freebsd-12-4 + matrix: + - env: + TARGET: x86_64-unknown-freebsd + - env: + TARGET: i686-unknown-freebsd + setup_script: + - pkg install -y git + - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable --target $TARGET + test_script: + - . $HOME/.cargo/env + - cargo test --target $TARGET diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f75ffee..7543f8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,6 +104,55 @@ jobs: rustup target add x86_64-unknown-illumos cargo build --target x86_64-unknown-illumos + netbsd: + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Test NetBSD + id: test + uses: vmactions/netbsd-vm@v0 + with: + envs: CARGO_INCREMENTAL CARGO_NET_GIT_FETCH_WITH_CLI CARGO_NET_RETRY RUST_BACKTRACE RUSTFLAGS RUSTDOCFLAGS RUSTUP_MAX_RETRIES + usesh: true + prepare: | + pkg_add curl git + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable + run: | + . $HOME/.cargo/env + cargo test + + openbsd: + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Test OpenBSD + id: test + uses: vmactions/openbsd-vm@v0 + with: + envs: CARGO_INCREMENTAL CARGO_NET_GIT_FETCH_WITH_CLI CARGO_NET_RETRY RUST_BACKTRACE RUSTFLAGS RUSTDOCFLAGS RUSTUP_MAX_RETRIES + usesh: true + # OpenBSD is tier 3 target, so install rust from package manager instead of rustup + prepare: | + pkg_add git rust + run: | + cargo test + + dragonfly: + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Test Dragonfly BSD + id: test + uses: vmactions/dragonflybsd-vm@v0 + with: + envs: CARGO_INCREMENTAL CARGO_NET_GIT_FETCH_WITH_CLI CARGO_NET_RETRY RUST_BACKTRACE RUSTFLAGS RUSTDOCFLAGS RUSTUP_MAX_RETRIES + usesh: true + # Dragonfly BSD is tier 3 target, so install rust from package manager instead of rustup + prepare: | + pkg install -y git rust + run: | + cargo test + msrv: runs-on: ${{ matrix.os }} strategy: From e8253f9436570bbf260d0c8c5bf94cddbc5e74b5 Mon Sep 17 00:00:00 2001 From: jtnunley Date: Sat, 8 Apr 2023 12:50:36 -0700 Subject: [PATCH 3/4] Avoid netbsd for now --- .github/workflows/ci.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7543f8c..ad55e23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,23 +104,6 @@ jobs: rustup target add x86_64-unknown-illumos cargo build --target x86_64-unknown-illumos - netbsd: - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Test NetBSD - id: test - uses: vmactions/netbsd-vm@v0 - with: - envs: CARGO_INCREMENTAL CARGO_NET_GIT_FETCH_WITH_CLI CARGO_NET_RETRY RUST_BACKTRACE RUSTFLAGS RUSTDOCFLAGS RUSTUP_MAX_RETRIES - usesh: true - prepare: | - pkg_add curl git - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable - run: | - . $HOME/.cargo/env - cargo test - openbsd: runs-on: macos-12 steps: From 8b266a24c1e73ab6025e1eba2da0e1d140cffbe7 Mon Sep 17 00:00:00 2001 From: jtnunley Date: Sun, 9 Apr 2023 07:35:07 -0700 Subject: [PATCH 4/4] Blackhole patch --- .cirrus.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 07c9763..affe8e0 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -20,6 +20,8 @@ freebsd_task: - env: TARGET: i686-unknown-freebsd setup_script: + # https://github.com/cirruslabs/cirrus-ci-docs/issues/483 + - sudo sysctl net.inet.tcp.blackhole=0 - pkg install -y git - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable --target $TARGET test_script: