From b4788d51ee3434895811263bdaa3a599e81d2ccc Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 08:20:49 -0600 Subject: [PATCH 01/23] DO NOT MERGE try out cross-platform-actions in CI This PR replaces cirrus-CI with github workflows' cross-platform-actions. The latter works via nested virtualization; it starts a new VM within Github Actions native VM. This PR tries out every architecture supported by cross-platform-actions, even those that Nix hasn't previously run CI on. We may not want to keep those. This PR also removes unaffected CI targets from the configuration, for speed's sake. Don't merge that part! Fixes #2768 --- .cirrus.yml | 66 ----- .github/workflows/ci.yml | 573 +++++++++++---------------------------- 2 files changed, 155 insertions(+), 484 deletions(-) delete mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index f354998230..0000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,66 +0,0 @@ -cargo_cache: - folder: $CARGO_HOME/registry - fingerprint_script: cat Cargo.lock || echo "" - -env: - # Build by default; don't just check - BUILD: build - CLIPPYFLAGS: -D warnings -A unknown-lints - RUSTFLAGS: -D warnings - RUSTDOCFLAGS: -D warnings - TOOL: cargo - MSRV: 1.69.0 - ZFLAGS: - -# Tests that don't require executing the build binaries -build: &BUILD - build_script: - - . $HOME/.cargo/env || true - - $TOOL -Vv - - rustc -Vv - - $TOOL $BUILD $ZFLAGS --target $TARGET --all-targets --all-features - - $TOOL doc $ZFLAGS --no-deps --target $TARGET --all-features - - $TOOL clippy $ZFLAGS --target $TARGET --all-targets --all-features -- $CLIPPYFLAGS - - if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi - - if [ -z "$NOHACK" ]; then curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin; fi - - if [ -z "$NOHACK" ]; then $TOOL hack $ZFLAGS check --target $TARGET --each-feature; fi - -# Tests that do require executing the binaries -test: &TEST - << : *BUILD - test_script: - - . $HOME/.cargo/env || true - - $TOOL test --target $TARGET - -# Test FreeBSD in a full VM. Test the i686 target too, in the -# same VM. The binary will be built in 32-bit mode, but will execute on a -# 64-bit kernel and in a 64-bit environment. Our tests don't execute any of -# the system's binaries, so the environment shouldn't matter. -task: - env: - TARGET: x86_64-unknown-freebsd - matrix: - - name: FreeBSD 14 amd64 & i686 - freebsd_instance: - image: freebsd-14-4-release-amd64-ufs - cpu: 1 - # Enable tests that would fail on FreeBSD 12 - RUSTFLAGS: --cfg fbsd14 -D warnings - RUSTDOCFLAGS: --cfg fbsd14 - setup_script: - - kldload mqueuefs - - fetch https://sh.rustup.rs -o rustup.sh - - sh rustup.sh -y --profile=minimal --default-toolchain stable - - . $HOME/.cargo/env - - rustup target add i686-unknown-freebsd - - rustup component add clippy - << : *TEST - i386_test_script: - - . $HOME/.cargo/env - - cargo build --target i686-unknown-freebsd --all-features - - cargo doc --no-deps --target i686-unknown-freebsd --all-features - - cargo test --target i686-unknown-freebsd - i386_feature_script: - - . $HOME/.cargo/env - - if [ -z "$NOHACK" ]; then cargo hack check --each-feature --target i686-unknown-freebsd; fi - before_cache_script: rm -rf $CARGO_HOME/registry/index diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1c9259ee2..6c7210d3e1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,441 +17,178 @@ env: RUSTFLAGS: -Dwarnings jobs: - macos: - runs-on: macos-26-intel - env: - TARGET: x86_64-apple-darwin - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: clippy - - - name: build - uses: ./.github/actions/build - with: - TARGET: '${{ env.TARGET }}' - - - name: test - uses: ./.github/actions/test - with: - TARGET: '${{ env.TARGET }}' - - - name: before_cache_script - run: sudo rm -rf $CARGO_HOME/registry/index - - macos-aarch64: - runs-on: macos-latest - env: - TARGET: aarch64-apple-darwin - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: clippy - - - name: build - uses: ./.github/actions/build - with: - TARGET: "${{ env.TARGET }}" - - - name: test - uses: ./.github/actions/test - with: - TARGET: "${{ env.TARGET }}" - - - name: before_cache_script - run: sudo rm -rf $CARGO_HOME/registry/index - - # Use cross for QEMU-based testing - # cross needs to execute Docker, GitHub Action already has it installed - cross: - runs-on: ubuntu-24.04 - needs: [rustfmt, minver, macos, x86_64_linux_native_builds] - strategy: - fail-fast: false - matrix: - target: [ - arm-unknown-linux-gnueabi, - armv7-unknown-linux-gnueabihf, - i686-unknown-linux-gnu, - i686-unknown-linux-musl, - - # Disable MIPS CIs, see https://github.com/nix-rust/nix/issues/2593 - # for detailed info. - # - # mips-unknown-linux-gnu, - # mips64-unknown-linux-gnuabi64, - # mips64el-unknown-linux-gnuabi64, - # mipsel-unknown-linux-gnu, - - powerpc64le-unknown-linux-gnu, - loongarch64-unknown-linux-gnu, - ] - - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: clippy - - # cross relies on docker or podman, GitHub Acton already has it installed. - - name: Set up cross - uses: taiki-e/install-action@v2 - with: - tool: cross@0.2.5 - - - name: build - uses: ./.github/actions/build - with: - TARGET: '${{ matrix.target }}' - TOOL: cross - RUSTFLAGS: --cfg qemu -D warnings - - - name: test - uses: ./.github/actions/test - with: - TARGET: '${{ matrix.target }}' - SUDO: "" - TOOL: cross - RUSTFLAGS: --cfg qemu -D warnings - RUSTDOCFLAGS: --cfg qemu - - - name: before_cache_script - run: rm -rf $CARGO_HOME/registry/index - - - - # Tasks for x86_64 Linux native builds - x86_64_linux_native_builds: + freebsd: runs-on: ubuntu-latest strategy: - fail-fast: false matrix: - target: [ - x86_64-unknown-linux-gnu, - x86_64-unknown-linux-musl, - ] - + os: + - name: freebsd + architecture: x86-64 + version: '14.4' + + - name: freebsd + architecture: arm64 + version: '15.0' steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: clippy - - - name: install targets - run: rustup target add ${{ matrix.target }} - - - name: build - uses: ./.github/actions/build - with: - TARGET: '${{ matrix.TARGET }}' - - - name: test - uses: ./.github/actions/test - with: - TARGET: '${{ matrix.TARGET }}' - - - name: before_cache_script - run: sudo rm -rf $CARGO_HOME/registry/index; - - # Tasks for aarch64 Linux native builds - aarch64_linux_native_builds: - runs-on: ubuntu-24.04-arm + - uses: actions/checkout@v6 + - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} + uses: cross-platform-actions/action@v1.0.0 + env: + TARGET=x86_64-unknown-freebsd + with: + operating_system: ${{ matrix.os.name }} + architecture: ${{ matrix.os.architecture }} + version: ${{ matrix.os.version }} + shell: bash + run: | + uname -a + kldload mqueuefs + fetch https://sh.rustup.rs -o rustup.sh + sh rustup.sh -y --profile=minimal --default-toolchain stable + . $HOME/.cargo/env + rustc -Vv + rustup target add i686-unknown-freebsd + rustup component add clippy + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin + cargo hack check --each-feature + cargo test --all-features + cargo build --target i686-unknown-freebsd --all-features + cargo doc --no-deps --target i686-unknown-freebsd --all-features + cargo test --target i686-unknown-freebsd + rm -rf $CARGO_HOME/registry/index + + netbsd: + runs-on: ubuntu-latest strategy: - fail-fast: false matrix: - target: [ - aarch64-unknown-linux-gnu, - aarch64-unknown-linux-musl, - ] - + os: + - name: netbsd + architecture: x86-64 + version: '10.1' steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: clippy - - - name: install targets - run: rustup target add ${{ matrix.target }} - - - name: build - uses: ./.github/actions/build - with: - TARGET: '${{ matrix.TARGET }}' - - - name: test - uses: ./.github/actions/test - with: - TARGET: '${{ matrix.TARGET }}' - - - name: before_cache_script - run: sudo rm -rf $CARGO_HOME/registry/index; - - - # Tasks for cross-compiling, but no testing - cross_compiling: + - uses: actions/checkout@v6 + - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} + uses: cross-platform-actions/action@v1.0.0 + env: + TARGET=x86_64-unknown-netbsd + with: + operating_system: ${{ matrix.os.name }} + architecture: ${{ matrix.os.architecture }} + version: ${{ matrix.os.version }} + shell: bash + run: | + uname -a + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + . $HOME/.cargo/env + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin + cargo hack check --each-feature + cargo test --all-features + rm -rf $CARGO_HOME/registry/index + + openbsd: runs-on: ubuntu-latest - needs: [rustfmt, minver, macos, x86_64_linux_native_builds] - env: - BUILD: check strategy: - fail-fast: false matrix: - include: - # Cross claims to support Android, but when it tries to run Nix's tests it - # reports undefined symbol references. - - target: aarch64-linux-android - - target: arm-linux-androideabi - - target: armv7-linux-androideabi - - target: i686-linux-android - - target: x86_64-linux-android - - target: arm-unknown-linux-musleabi - - target: x86_64-unknown-fuchsia - - target: x86_64-unknown-illumos - # Cross claims to support running tests on iOS, but it actually doesn't. - # https://github.com/rust-embedded/cross/issues/535 - - target: aarch64-apple-ios - # cargo hack tries to invoke the iphonesimulator SDK for iOS - NOHACK: true - # Cross claims to support Linux powerpc64, but it really doesn't. - # https://github.com/rust-embedded/cross/issues/441 - - target: powerpc64-unknown-linux-gnu - - target: s390x-unknown-linux-gnu - - target: x86_64-unknown-linux-gnux32 - - target: x86_64-unknown-netbsd - - target: aarch64-unknown-linux-ohos - - target: armv7-unknown-linux-ohos - - target: x86_64-unknown-linux-ohos - + os: + - name: openbsd + architecture: x86-64 + version: '7.8' steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: clippy - - - name: install targets - run: rustup target add ${{ matrix.target }} - - - name: build - uses: ./.github/actions/build - with: - TARGET: '${{ matrix.target }}' - BUILD: '${{ env.BUILD }}' - NOHACK: '${{ matrix.NOHACK }}' - - - name: before_cache_script - run: rm -rf $CARGO_HOME/registry/index - - # Check that Nix will build on the MSRV, on a variety of operating systems. - # But don't check the tests. Those are not required to build on MSRV. - msrv: + - uses: actions/checkout@v6 + - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} + uses: cross-platform-actions/action@v1.0.0 + env: + TARGET=x86_64-unknown-openbsd + with: + operating_system: ${{ matrix.os.name }} + architecture: ${{ matrix.os.architecture }} + version: ${{ matrix.os.version }} + shell: bash + run: | + uname -a + pkg_add rust + . $HOME/.cargo/env + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin + cargo hack check --each-feature + cargo test --all-features + rm -rf $CARGO_HOME/registry/index + + haiku: runs-on: ubuntu-latest - needs: [rustfmt, minver, macos, x86_64_linux_native_builds] - env: - BUILD: check - NOCLIPPY: true - NODOC: true - NOHACK: true - TARGETS: "" strategy: - fail-fast: false matrix: - include: - - target: aarch64-linux-android - - target: x86_64-unknown-linux-gnu - - target: x86_64-unknown-linux-musl - - target: aarch64-apple-darwin - - target: x86_64-unknown-freebsd - - target: x86_64-unknown-netbsd + os: + - name: haiku + architecture: x86-64 + version: 'r1beta5' steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: $MSRV - - - name: install targets - run: rustup target add ${{ matrix.target }} - - - name: build - uses: ./.github/actions/build - with: - TARGET: '${{ matrix.target }}' - TARGETS: '${{ env.TARGETS }}' - BUILD: '${{ env.BUILD }}' - NOCLIPPY: '${{ env.NOCLIPPY }}' - NODOC: '${{ env.NODOC }}' - NOHACK: '${{ env.NOHACK }}' - - - name: before_cache_script - run: rm -rf $CARGO_HOME/registry/index - - - redox: - runs-on: ubuntu-latest - needs: [rustfmt, minver, macos, x86_64_linux_native_builds] - env: - TARGET: x86_64-unknown-redox - CLIPPYFLAGS: -D warnings - BUILD: check - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - # Redox's MSRV policy is unclear. Until they define it, use nightly. - uses: dtolnay/rust-toolchain@nightly - with: - components: clippy - - - name: install targets - run: rustup target add ${{ env.TARGET }} - - - name: build - uses: ./.github/actions/build - with: - TARGET: '${{ env.TARGET }}' - BUILD: '${{ env.BUILD }}' - CLIPPYFLAGS: '${{ env.CLIPPYFLAGS }}' - - - name: before_cache_script - run: rm -rf $CARGO_HOME/registry/index - - - - # Rust Tier 3 targets can't use Rustup - tier3: + - uses: actions/checkout@v6 + - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} + uses: cross-platform-actions/action@v1.0.0 + env: + TARGET=x86_64-unknown-haiku + with: + operating_system: ${{ matrix.os.name }} + architecture: ${{ matrix.os.architecture }} + version: ${{ matrix.os.version }} + shell: bash + run: | + uname -a + pkgman refresh && pkgman install -y rust_bin + . $HOME/.cargo/env + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin + cargo hack check --each-feature + cargo test --all-features + rm -rf $CARGO_HOME/registry/index + + omnios: runs-on: ubuntu-latest - env: - BUILD: check - ZFLAGS: -Zbuild-std - CLIPPYFLAGS: -D warnings strategy: - fail-fast: false matrix: - include: - - target: x86_64-unknown-dragonfly - - target: x86_64-unknown-openbsd - - target: x86_64-unknown-haiku - # Temporarily disable armv7-unknown-linux-uclibceabihf - # https://github.com/rust-lang/rust/issues/154679 - # - target: armv7-unknown-linux-uclibceabihf - # Disable Hurd due to - # 1. https://github.com/rust-lang/libc/issues/4421 - # 2. https://github.com/nix-rust/nix/pull/2635#issuecomment-2842062528 - # - # We can bring it back when 1 gets fixed and it is applied to the std lib - # - target: i686-unknown-hurd-gnu + os: + - name: omnios + architecture: x86-64 + version: 'r151056' steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@nightly - with: - components: clippy - - - name: install src - run: rustup component add rust-src - - - name: build - uses: ./.github/actions/build - with: - TARGET: '${{ matrix.target }}' - BUILD: '${{ env.BUILD }}' - ZFLAGS: '${{ env.ZFLAGS }}' - CLIPPYFLAGS: '${{ env.CLIPPYFLAGS }}' - - - name: before_cache_script - run: rm -rf $CARGO_HOME/registry/index - - solaris: - name: solaris (x86_64-pc-solaris) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: build and test - uses: vmactions/solaris-vm@v1 - with: - release: "11.4-gcc" - usesh: true - mem: 4096 - copyback: false - prepare: | - source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install) - echo "~~~~ rustc --version ~~~~" - rustc --version - echo "~~~~ Solaris-version ~~~~" - uname -a + - uses: actions/checkout@v6 + - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} + uses: cross-platform-actions/action@v1.0.0 + env: + TARGET=x86_64-unknown-illumos + with: + operating_system: ${{ matrix.os.name }} + architecture: ${{ matrix.os.architecture }} + version: ${{ matrix.os.version }} + shell: bash run: | - export PATH=$HOME/.rust_solaris/bin:$PATH - cargo build --target x86_64-pc-solaris --all-targets --all-features && sudo env PATH=$PATH cargo test - - # Test that we can build with the lowest version of all dependencies. - # "cargo test" doesn't work because some of our dev-dependencies, like - # rand, can't build with their own minimal dependencies. - minver: - runs-on: ubuntu-latest - env: - TARGET: x86_64-unknown-linux-gnu - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: setup Rust - uses: dtolnay/rust-toolchain@nightly - - - name: setup - run: cargo update -Zdirect-minimal-versions - - - name: check - run: cargo check - - - name: before_cache_script - run: rm -rf $CARGO_HOME/registry/index - - # Tasks that checks if the code is formatted right using `cargo fmt` tool - rustfmt: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt - - - name: Check format - run: cargo fmt --all -- --check **/*.rs - - - name: before_cache_script - run: rm -rf $CARGO_HOME/registry/index - + uname -a + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + . $HOME/.cargo/env + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin + cargo hack check --each-feature + cargo test --all-features + rm -rf $CARGO_HOME/registry/index From be11cdfd54ed9b399b0100225e3709497f5218ce Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 08:37:39 -0600 Subject: [PATCH 02/23] simplify by removing most OSes I think there's a syntax here, because github isn't even recognizing the jobs --- .github/workflows/ci.yml | 166 +-------------------------------------- 1 file changed, 4 insertions(+), 162 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c7210d3e1..077c227efb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,37 +9,17 @@ on: merge_group: types: [checks_requested] -permissions: - contents: read - -env: - MSRV: 1.69.0 - RUSTFLAGS: -Dwarnings - jobs: - freebsd: + test: runs-on: ubuntu-latest - strategy: - matrix: - os: - - name: freebsd - architecture: x86-64 - version: '14.4' - - - name: freebsd - architecture: arm64 - version: '15.0' steps: - uses: actions/checkout@v6 + - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} uses: cross-platform-actions/action@v1.0.0 - env: - TARGET=x86_64-unknown-freebsd with: - operating_system: ${{ matrix.os.name }} - architecture: ${{ matrix.os.architecture }} - version: ${{ matrix.os.version }} - shell: bash + operating_system: freebsd + version: 15.0 run: | uname -a kldload mqueuefs @@ -52,143 +32,5 @@ jobs: cargo build --all-targets --all-features cargo doc --no-deps --all-features cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH - curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin - cargo hack check --each-feature - cargo test --all-features - cargo build --target i686-unknown-freebsd --all-features - cargo doc --no-deps --target i686-unknown-freebsd --all-features - cargo test --target i686-unknown-freebsd - rm -rf $CARGO_HOME/registry/index - - netbsd: - runs-on: ubuntu-latest - strategy: - matrix: - os: - - name: netbsd - architecture: x86-64 - version: '10.1' - steps: - - uses: actions/checkout@v6 - - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} - uses: cross-platform-actions/action@v1.0.0 - env: - TARGET=x86_64-unknown-netbsd - with: - operating_system: ${{ matrix.os.name }} - architecture: ${{ matrix.os.architecture }} - version: ${{ matrix.os.version }} - shell: bash - run: | - uname -a - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - . $HOME/.cargo/env - rustc -Vv - cargo build --all-targets --all-features - cargo doc --no-deps --all-features - cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH - curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin - cargo hack check --each-feature - cargo test --all-features - rm -rf $CARGO_HOME/registry/index - - openbsd: - runs-on: ubuntu-latest - strategy: - matrix: - os: - - name: openbsd - architecture: x86-64 - version: '7.8' - steps: - - uses: actions/checkout@v6 - - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} - uses: cross-platform-actions/action@v1.0.0 - env: - TARGET=x86_64-unknown-openbsd - with: - operating_system: ${{ matrix.os.name }} - architecture: ${{ matrix.os.architecture }} - version: ${{ matrix.os.version }} - shell: bash - run: | - uname -a - pkg_add rust - . $HOME/.cargo/env - rustc -Vv - cargo build --all-targets --all-features - cargo doc --no-deps --all-features - cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH - curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin - cargo hack check --each-feature - cargo test --all-features - rm -rf $CARGO_HOME/registry/index - - haiku: - runs-on: ubuntu-latest - strategy: - matrix: - os: - - name: haiku - architecture: x86-64 - version: 'r1beta5' - steps: - - uses: actions/checkout@v6 - - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} - uses: cross-platform-actions/action@v1.0.0 - env: - TARGET=x86_64-unknown-haiku - with: - operating_system: ${{ matrix.os.name }} - architecture: ${{ matrix.os.architecture }} - version: ${{ matrix.os.version }} - shell: bash - run: | - uname -a - pkgman refresh && pkgman install -y rust_bin - . $HOME/.cargo/env - rustc -Vv - cargo build --all-targets --all-features - cargo doc --no-deps --all-features - cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH - curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin - cargo hack check --each-feature - cargo test --all-features - rm -rf $CARGO_HOME/registry/index - - omnios: - runs-on: ubuntu-latest - strategy: - matrix: - os: - - name: omnios - architecture: x86-64 - version: 'r151056' - steps: - - uses: actions/checkout@v6 - - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} - uses: cross-platform-actions/action@v1.0.0 - env: - TARGET=x86_64-unknown-illumos - with: - operating_system: ${{ matrix.os.name }} - architecture: ${{ matrix.os.architecture }} - version: ${{ matrix.os.version }} - shell: bash - run: | - uname -a - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - . $HOME/.cargo/env - rustc -Vv - cargo build --all-targets --all-features - cargo doc --no-deps --all-features - cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH - curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin - cargo hack check --each-feature cargo test --all-features rm -rf $CARGO_HOME/registry/index From 0cf0cbeaa9a03fcf224c873a8a3df2f5486aa183 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 08:40:19 -0600 Subject: [PATCH 03/23] Version numbers must be strings. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 077c227efb..d838524908 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: uses: cross-platform-actions/action@v1.0.0 with: operating_system: freebsd - version: 15.0 + version: '15.0' run: | uname -a kldload mqueuefs From 33f1cc86bd4d92fe79716c38b3f9de98d56be525 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 08:42:26 -0600 Subject: [PATCH 04/23] must use sudo? --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d838524908..954a53814b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,9 @@ jobs: version: '15.0' run: | uname -a - kldload mqueuefs + whoami + which sudo + sudo kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable . $HOME/.cargo/env From a2a3d95931755de87dce5d912111187747a7a57a Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 08:52:37 -0600 Subject: [PATCH 05/23] Add a matrix. And use "sudo" to execute tests --- .github/workflows/ci.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 954a53814b..bc51a11d47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,14 +12,23 @@ on: jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + os: + - name: freebsd + architecture: x86-64 + version: '15.0' + - name: freebsd + architecture: x86-64 + version: '14.3' steps: - uses: actions/checkout@v6 - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} uses: cross-platform-actions/action@v1.0.0 with: - operating_system: freebsd - version: '15.0' + operating_system: ${{ matrix.os.name }} + version: ${{ matrix.os.version }} run: | uname -a whoami @@ -34,5 +43,5 @@ jobs: cargo build --all-targets --all-features cargo doc --no-deps --all-features cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - cargo test --all-features + sudo -E cargo test --all-features rm -rf $CARGO_HOME/registry/index From 86e951e679f6d049724f5859f97a08d0c618aecd Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 09:24:51 -0600 Subject: [PATCH 06/23] sudo -E doesn't work. Try --preserve-env ? --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc51a11d47..accbb1bf05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,5 +43,5 @@ jobs: cargo build --all-targets --all-features cargo doc --no-deps --all-features cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - sudo -E cargo test --all-features + sudo --preserve-env=PATH cargo test --all-features rm -rf $CARGO_HOME/registry/index From 35a591eaeda298879b39e6a6e3d41f847dbec90a Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 09:35:32 -0600 Subject: [PATCH 07/23] More attempts to debug sudo --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index accbb1bf05..a057b357ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,8 @@ jobs: uname -a whoami which sudo + sudo --version + egrep -v '^#' /usr/local/etc/sudo.conf sudo kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable @@ -43,5 +45,7 @@ jobs: cargo build --all-targets --all-features cargo doc --no-deps --all-features cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - sudo --preserve-env=PATH cargo test --all-features + echo PATH is $PATH + sudo -E sudo -E sh -c 'echo $PATH' + sudo -E cargo test --all-features rm -rf $CARGO_HOME/registry/index From 044b2f841533599e09807101a5cdf6128495ce26 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 09:55:40 -0600 Subject: [PATCH 08/23] Check sudoers --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a057b357ac..9ea8f60b34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: whoami which sudo sudo --version - egrep -v '^#' /usr/local/etc/sudo.conf + sudo egrep -v '#' /usr/local/etc/sudoers sudo kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable @@ -47,5 +47,5 @@ jobs: cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints echo PATH is $PATH sudo -E sudo -E sh -c 'echo $PATH' - sudo -E cargo test --all-features + sudo env "PATH=$PATH" cargo test --all-features rm -rf $CARGO_HOME/registry/index From 6f4b3a54298a4104053ce2b4d0111005135ceeda Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 10:10:41 -0600 Subject: [PATCH 09/23] Try executing tests with su instead of sudo --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ea8f60b34..c591c338fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,5 +47,6 @@ jobs: cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints echo PATH is $PATH sudo -E sudo -E sh -c 'echo $PATH' - sudo env "PATH=$PATH" cargo test --all-features + su -m root -c 'echo $PATH' + su -m root -c "cargo test --all-features" rm -rf $CARGO_HOME/registry/index From 84bba917c2fbea7494c1c63676054b0b7a72d932 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 10:31:02 -0600 Subject: [PATCH 10/23] Use sudo, but fix sudoers to make it work --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c591c338fd..b64b1e1048 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: whoami which sudo sudo --version + sudo sed -i '' '/Defaults secure_path/d' /usr/local/etc/sudoers sudo egrep -v '#' /usr/local/etc/sudoers sudo kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh @@ -47,6 +48,7 @@ jobs: cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints echo PATH is $PATH sudo -E sudo -E sh -c 'echo $PATH' - su -m root -c 'echo $PATH' - su -m root -c "cargo test --all-features" + # su -m root -c 'echo $PATH' + # su -m root -c "cargo test --all-features" + sudo -E cargo test --all-features rm -rf $CARGO_HOME/registry/index From 537018da272e15faac597c8a36dcdb27faf1f628 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 10:37:43 -0600 Subject: [PATCH 11/23] Change step names --- .github/workflows/ci.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b64b1e1048..0dd13b9fed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: types: [checks_requested] jobs: - test: + freebsd: runs-on: ubuntu-latest strategy: matrix: @@ -24,16 +24,15 @@ jobs: steps: - uses: actions/checkout@v6 - - name: ${{ matrix.os.name }}-${{ matrix.os.version}}/${{ matrix.os.architecture }} - uses: cross-platform-actions/action@v1.0.0 + - uses: cross-platform-actions/action@v1.0.0 with: operating_system: ${{ matrix.os.name }} version: ${{ matrix.os.version }} run: | uname -a whoami - which sudo - sudo --version + # Must remove sudo's secure_path setting, because it interferes + # with running the tests using sudo sudo sed -i '' '/Defaults secure_path/d' /usr/local/etc/sudoers sudo egrep -v '#' /usr/local/etc/sudoers sudo kldload mqueuefs @@ -46,9 +45,5 @@ jobs: cargo build --all-targets --all-features cargo doc --no-deps --all-features cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - echo PATH is $PATH - sudo -E sudo -E sh -c 'echo $PATH' - # su -m root -c 'echo $PATH' - # su -m root -c "cargo test --all-features" sudo -E cargo test --all-features rm -rf $CARGO_HOME/registry/index From 11952a2e23f1ece39e4b59b62787ef375133d211 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 11:44:04 -0600 Subject: [PATCH 12/23] fixup --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dd13b9fed..350c9008bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,11 +30,9 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a - whoami # Must remove sudo's secure_path setting, because it interferes # with running the tests using sudo sudo sed -i '' '/Defaults secure_path/d' /usr/local/etc/sudoers - sudo egrep -v '#' /usr/local/etc/sudoers sudo kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable From 8d5684e182145a353667535d538bfd62e7ecaebe Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 11:45:19 -0600 Subject: [PATCH 13/23] Add a NetBSD job. And add cargo-hack to both --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 350c9008bb..095034a46e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,5 +43,37 @@ jobs: cargo build --all-targets --all-features cargo doc --no-deps --all-features cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin + cargo hack check --each-feature sudo -E cargo test --all-features rm -rf $CARGO_HOME/registry/index + + netbsd: + runs-on: ubuntu-latest + strategy: + matrix: + os: + - name: netbsd + architecture: x86-64 + version: '10.1' + steps: + - uses: actions/checkout@v6 + + - uses: cross-platform-actions/action@v1.0.0 + with: + operating_system: ${{ matrix.os.name }} + version: ${{ matrix.os.version }} + run: | + uname -a + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | s + . $HOME/.cargo/env + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin + cargo hack check --each-feature + cargo test --all-features + rm -rf $CARGO_HOME/registry/index From 0790ef0b304ecbad64c0e064379dd707f5761224 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 11:52:22 -0600 Subject: [PATCH 14/23] fix the cargo-hack URL Also, cargo-hack binaries are not available on netbsd --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 095034a46e..a621dde521 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: cargo doc --no-deps --all-features cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH - curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-freebsd.tar.gz | tar xzf - -C ~/.cargo/bin cargo hack check --each-feature sudo -E cargo test --all-features rm -rf $CARGO_HOME/registry/index @@ -72,8 +72,5 @@ jobs: cargo build --all-targets --all-features cargo doc --no-deps --all-features cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH - curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin - cargo hack check --each-feature cargo test --all-features rm -rf $CARGO_HOME/registry/index From d98c948747860c1d0ee1c080b48c2187184037d9 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 11:55:50 -0600 Subject: [PATCH 15/23] fix typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a621dde521..bc0cce27b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | s + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh . $HOME/.cargo/env rustc -Vv cargo build --all-targets --all-features From b0e8fecc52b84d745ae200ca89d75b215c272f2a Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 12:03:45 -0600 Subject: [PATCH 16/23] Correct rustup syntax --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc0cce27b9..2715a31c75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . $HOME/.cargo/env rustc -Vv cargo build --all-targets --all-features From 5fd9be3fa36487a392a2b0823554c9feb8472f49 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 12:12:36 -0600 Subject: [PATCH 17/23] Add more targets --- .github/workflows/ci.yml | 82 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2715a31c75..957982e90b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,9 @@ jobs: - name: freebsd architecture: x86-64 version: '15.0' + - name: freebsd + architecture: arm64 + version: '15.0' - name: freebsd architecture: x86-64 version: '14.3' @@ -26,6 +29,7 @@ jobs: - uses: cross-platform-actions/action@v1.0.0 with: + architecture: ${{ matrix.os.architecture }} operating_system: ${{ matrix.os.name }} version: ${{ matrix.os.version }} run: | @@ -74,3 +78,81 @@ jobs: cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints cargo test --all-features rm -rf $CARGO_HOME/registry/index + + openbsd: + runs-on: ubuntu-latest + strategy: + matrix: + os: + - name: openbsd + architecture: x86-64 + version: '7.8' + steps: + - uses: actions/checkout@v6 + + - uses: cross-platform-actions/action@v1.0.0 + with: + operating_system: ${{ matrix.os.name }} + version: ${{ matrix.os.version }} + run: | + uname -a + sudo pkg_add rust + . $HOME/.cargo/env + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + cargo test --all-features + rm -rf $CARGO_HOME/registry/index + + haiku: + runs-on: ubuntu-latest + strategy: + matrix: + os: + - name: haiku + architecture: x86-64 + version: 'r1beta5' + steps: + - uses: actions/checkout@v6 + + - uses: cross-platform-actions/action@v1.0.0 + with: + operating_system: ${{ matrix.os.name }} + version: ${{ matrix.os.version }} + run: | + uname -a + sudo pkgman install rust + . $HOME/.cargo/env + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + cargo test --all-features + rm -rf $CARGO_HOME/registry/index + + omnios: + runs-on: ubuntu-latest + strategy: + matrix: + os: + - name: omnios + architecture: x86-64 + version: 'r15106' + steps: + - uses: actions/checkout@v6 + + - uses: cross-platform-actions/action@v1.0.0 + with: + operating_system: ${{ matrix.os.name }} + version: ${{ matrix.os.version }} + run: | + uname -a + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . $HOME/.cargo/env + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + cargo test --all-features + rm -rf $CARGO_HOME/registry/index From 45e7dcb2061ffe409fe81b98d2657b2ee7c3c5aa Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 14:09:36 -0600 Subject: [PATCH 18/23] fixes: * FreeBSD/aarch64 needs its own target, since it isn't in rustup * Add FreeBSD-i686 back to the mix * OpenBSD needs the shell explicitly specified * Try "pkgman update" on haiku * Fix omnios version number --- .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 957982e90b..5340dae58d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: types: [checks_requested] jobs: - freebsd: + freebsd_x86_64: runs-on: ubuntu-latest strategy: matrix: @@ -18,9 +18,6 @@ jobs: - name: freebsd architecture: x86-64 version: '15.0' - - name: freebsd - architecture: arm64 - version: '15.0' - name: freebsd architecture: x86-64 version: '14.3' @@ -51,6 +48,40 @@ jobs: curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-freebsd.tar.gz | tar xzf - -C ~/.cargo/bin cargo hack check --each-feature sudo -E cargo test --all-features + cargo build --target i686-unknown-freebsd --all-features --all-targets + cargo doc --no-deps --target i686-unknown-freebsd --all-features + sudo -E cargo test --target i686-unknown-freebsd + rm -rf $CARGO_HOME/registry/index + + freebsd_aarch64: + runs-on: ubuntu-latest + strategy: + matrix: + os: + - name: freebsd + architecture: arm64 + version: '15.0' + steps: + - uses: actions/checkout@v6 + + - uses: cross-platform-actions/action@v1.0.0 + with: + architecture: ${{ matrix.os.architecture }} + operating_system: ${{ matrix.os.name }} + version: ${{ matrix.os.version }} + run: | + uname -a + # Must remove sudo's secure_path setting, because it interferes + # with running the tests using sudo + sudo sed -i '' '/Defaults secure_path/d' /usr/local/etc/sudoers + sudo kldload mqueuefs + sudo pkg install -y rust + rustc -Vv + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + sudo -E cargo test --all-features rm -rf $CARGO_HOME/registry/index netbsd: @@ -94,6 +125,7 @@ jobs: with: operating_system: ${{ matrix.os.name }} version: ${{ matrix.os.version }} + shell: bash run: | uname -a sudo pkg_add rust @@ -122,6 +154,7 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a + sudo pkgman update sudo pkgman install rust . $HOME/.cargo/env rustc -Vv @@ -138,7 +171,7 @@ jobs: os: - name: omnios architecture: x86-64 - version: 'r15106' + version: 'r151056' steps: - uses: actions/checkout@v6 From 10b82841e71563bc464f696f1821e66d51cc1b82 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 14:22:15 -0600 Subject: [PATCH 19/23] more fixes * check if 32 bit libs are installed on freebsd * don't try to source $HOME/.cargo/env if rustup wasn't used * Try "-y" with pkgman * Install gcc on omnios --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5340dae58d..04e76c94cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,7 @@ jobs: . $HOME/.cargo/env rustc -Vv rustup target add i686-unknown-freebsd + ls /usr/lib32 rustup component add clippy cargo build --all-targets --all-features cargo doc --no-deps --all-features @@ -128,8 +129,7 @@ jobs: shell: bash run: | uname -a - sudo pkg_add rust - . $HOME/.cargo/env + sudo pkg_add rust gcc rustc -Vv cargo build --all-targets --all-features cargo doc --no-deps --all-features @@ -154,9 +154,9 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a - sudo pkgman update - sudo pkgman install rust - . $HOME/.cargo/env + pkgman -h + sudo pkgman update -y + sudo pkgman install -y rust rustc -Vv cargo build --all-targets --all-features cargo doc --no-deps --all-features From b8a868db341e555ce4f4c933d2385303828e3e65 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 14:46:50 -0600 Subject: [PATCH 20/23] fixes: * Install 32-bit libs on FreeBSD 15. 14 is TODO * no need for gcc on openbsd * openbsd doesn't have clippy * better pkgman debuggging * install gcc on illumos * Also try using vmactions, for comparison --- .github/workflows/ci.yml | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04e76c94cb..a07088344d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,8 @@ jobs: rustc -Vv rustup target add i686-unknown-freebsd ls /usr/lib32 + # Install 32-bit compat libs, if using pkgbase. Else, we need a dist set + sudo pkg install -y FreeBSD-clibs-lib32 || true rustup component add clippy cargo build --all-targets --all-features cargo doc --no-deps --all-features @@ -129,11 +131,10 @@ jobs: shell: bash run: | uname -a - sudo pkg_add rust gcc + sudo pkg_add rust rustc -Vv cargo build --all-targets --all-features cargo doc --no-deps --all-features - cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints cargo test --all-features rm -rf $CARGO_HOME/registry/index @@ -154,7 +155,7 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a - pkgman -h + pkgman install -h sudo pkgman update -y sudo pkgman install -y rust rustc -Vv @@ -181,6 +182,7 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a + pkg install gcc curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . $HOME/.cargo/env rustc -Vv @@ -189,3 +191,33 @@ jobs: cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints cargo test --all-features rm -rf $CARGO_HOME/registry/index + + freebsd-vmactions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: vmactions-freebsd + uses: vmactions/freebsd-vm@v1 + with: + release: "14.3" + usesh: true + prepare: | + pkg install -y curl + run: | + curl https://sh.rustup.rs -sSf --output rustup.sh + sh rustup.sh -y --profile minimal --default-toolchain ${{ env.rust_stable }} + . $HOME/.cargo/env + rustc -vV + rustup target add i686-unknown-freebsd + rustup component add clippy + cargo build --all-targets --all-features + cargo doc --no-deps --all-features + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH + curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-freebsd.tar.gz | tar xzf - -C ~/.cargo/bin + cargo hack check --each-feature + sudo -E cargo test --all-features + cargo build --target i686-unknown-freebsd --all-features --all-targets + cargo doc --no-deps --target i686-unknown-freebsd --all-features + sudo -E cargo test --target i686-unknown-freebsd + rm -rf $CARGO_HOME/registry/index From bfc740427da3ac0ee350e733e8cf06349ae6231c Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 15:42:47 -0600 Subject: [PATCH 21/23] fixes * Don't try to test on i686 on FreeBSD. This VM doesn't have 32-bit libs intsalled, and it's not a pkgbase installation * Correct haiku's pkg name * need sudo on omnios to install gcco * fix rustup syntax with vmactions --- .github/workflows/ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a07088344d..1e3d0490b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,6 @@ jobs: . $HOME/.cargo/env rustc -Vv rustup target add i686-unknown-freebsd - ls /usr/lib32 - # Install 32-bit compat libs, if using pkgbase. Else, we need a dist set - sudo pkg install -y FreeBSD-clibs-lib32 || true rustup component add clippy cargo build --all-targets --all-features cargo doc --no-deps --all-features @@ -53,7 +50,8 @@ jobs: sudo -E cargo test --all-features cargo build --target i686-unknown-freebsd --all-features --all-targets cargo doc --no-deps --target i686-unknown-freebsd --all-features - sudo -E cargo test --target i686-unknown-freebsd + # Can't test on i686, because this VM doesn't have 32-bit libs installed + # sudo -E cargo test --target i686-unknown-freebsd rm -rf $CARGO_HOME/registry/index freebsd_aarch64: @@ -157,7 +155,7 @@ jobs: uname -a pkgman install -h sudo pkgman update -y - sudo pkgman install -y rust + sudo pkgman install -y rust_bin rustc -Vv cargo build --all-targets --all-features cargo doc --no-deps --all-features @@ -182,7 +180,7 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a - pkg install gcc + sudo pkg install gcc curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . $HOME/.cargo/env rustc -Vv @@ -205,7 +203,7 @@ jobs: pkg install -y curl run: | curl https://sh.rustup.rs -sSf --output rustup.sh - sh rustup.sh -y --profile minimal --default-toolchain ${{ env.rust_stable }} + sh rustup.sh -y --profile minimal . $HOME/.cargo/env rustc -vV rustup target add i686-unknown-freebsd From 3ae29c22ddc944b40b732107fcbc6573e555344b Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 15:55:14 -0600 Subject: [PATCH 22/23] fixes * Use cargo check, not cargo build, for freebsd i686 * fix gcc pkg name on omnios * don't use sudo on vmcactions --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e3d0490b6..ac9e76c97c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-freebsd.tar.gz | tar xzf - -C ~/.cargo/bin cargo hack check --each-feature sudo -E cargo test --all-features - cargo build --target i686-unknown-freebsd --all-features --all-targets + cargo check --target i686-unknown-freebsd --all-features --all-targets cargo doc --no-deps --target i686-unknown-freebsd --all-features # Can't test on i686, because this VM doesn't have 32-bit libs installed # sudo -E cargo test --target i686-unknown-freebsd @@ -180,7 +180,7 @@ jobs: version: ${{ matrix.os.version }} run: | uname -a - sudo pkg install gcc + sudo pkg install developer/build-essential curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . $HOME/.cargo/env rustc -Vv @@ -200,6 +200,8 @@ jobs: release: "14.3" usesh: true prepare: | + whoami + ls /usr/lib32 pkg install -y curl run: | curl https://sh.rustup.rs -sSf --output rustup.sh @@ -214,8 +216,8 @@ jobs: mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-freebsd.tar.gz | tar xzf - -C ~/.cargo/bin cargo hack check --each-feature - sudo -E cargo test --all-features + cargo test --all-features cargo build --target i686-unknown-freebsd --all-features --all-targets cargo doc --no-deps --target i686-unknown-freebsd --all-features - sudo -E cargo test --target i686-unknown-freebsd + cargo test --target i686-unknown-freebsd rm -rf $CARGO_HOME/registry/index From b432a5e806f203810bb6be6fd0e982d029381fc4 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 16:37:31 -0600 Subject: [PATCH 23/23] kldload mqueuefs on vmactions --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac9e76c97c..e5bc12c5e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -200,9 +200,8 @@ jobs: release: "14.3" usesh: true prepare: | - whoami - ls /usr/lib32 pkg install -y curl + kldload mqueuefs run: | curl https://sh.rustup.rs -sSf --output rustup.sh sh rustup.sh -y --profile minimal