diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000..affe8e0 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,29 @@ +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: + # 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: + - . $HOME/.cargo/env + - cargo test --target $TARGET diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 364e531..ad55e23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,36 +78,64 @@ 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: | rustup target add x86_64-unknown-illumos cargo build --target x86_64-unknown-illumos + 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: