From c13854d9f32e303fce1c041e5e56264b6837749d Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 13 Apr 2026 17:51:18 -0600 Subject: [PATCH 01/32] DO NOT MERGE try vmactions instead of Cirrus Experimentally replace cirrus-ci with vmactions Also, add a Netbsd build, just to see how well github workflows allows sharing steps. Fixes #2768 --- .cirrus.yml | 66 ----- .github/workflows/ci.yml | 543 ++++++++------------------------------- 2 files changed, 108 insertions(+), 501 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..e8f901c9e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,449 +9,122 @@ on: merge_group: types: [checks_requested] -permissions: - contents: read - -env: - MSRV: 1.69.0 - 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: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - target: [ - x86_64-unknown-linux-gnu, - x86_64-unknown-linux-musl, - ] - - 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 - strategy: - fail-fast: false - matrix: - target: [ - aarch64-unknown-linux-gnu, - aarch64-unknown-linux-musl, - ] - - 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: - 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 - - 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: - 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 - 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: + freebsd: 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 - 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 + - os: freebsd + version: "14.3" + - os: freebsd + version: "15.0" steps: - - uses: actions/checkout@v4 - - name: build and test - uses: vmactions/solaris-vm@v1 + - uses: actions/checkout@v6 + - name: Start VM + uses: vmactions/freebsd-vm@v1 with: - release: "11.4-gcc" + release: ${{ matrix.version }} 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 - 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: + - name: Install dependencies + shell: freebsd {0} + run: | + pkg install -y curl + 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 component add clippy + - name: Build + shell: freebsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo build --all-targets --all-features + - name: Test + shell: freebsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo test --all-targets --all-features + - name: Clippy + shell: freebsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + - name: Doc + shell: freebsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo doc --no-deps --all-features + - name: Hack + shell: freebsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + 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 + - name: i686 Build + shell: freebsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + rustup target add i686-unknown-freebsd + cargo build --target i686-unknown-freebsd --all-features --all-targets + - name: i686 Test + shell: freebsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo test --all-targets --all-features --target i686-unknown-freebsd + - name: i686 Doc + shell: freebsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo doc --no-deps --all-features --target i686-unknown-freebsd + + + netbsd: runs-on: ubuntu-latest + name: NetBSD steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable + - uses: actions/checkout@v6 + - name: Start VM + uses: vmactions/netbsd-vm@v1 with: - components: rustfmt - - - name: Check format - run: cargo fmt --all -- --check **/*.rs - - - name: before_cache_script - run: rm -rf $CARGO_HOME/registry/index - + release: "10.1" + usesh: true + - name: Install dependencies + shell: netbsd {0} + run: | + pkg_add curl + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + - name: Build + shell: netbsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo build --all-targets --all-features + - name: Test + shell: netbsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo test --all-targets --all-features + - name: Clippy + shell: netbsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + - name: Doc + shell: netbsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo doc --no-deps --all-features From 5c1701c748aab110504e95340e2f7f20333df865 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 08:58:22 -0600 Subject: [PATCH 02/32] Add openbsd, haiku, and freebsd/aarch64 --- .github/workflows/ci.yml | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8f901c9e2..90f9fe1311 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,20 @@ jobs: include: - os: freebsd version: "14.3" + aarch: x86_64 - os: freebsd version: "15.0" + aarch: x86_64 + - os: freebsd + version: "15.0" + arch: aarch64 steps: - uses: actions/checkout@v6 - name: Start VM uses: vmactions/freebsd-vm@v1 with: release: ${{ matrix.version }} + arch: ${{ matrix.arch }} usesh: true - name: Install dependencies shell: freebsd {0} @@ -128,3 +134,73 @@ jobs: . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features + + openbsd: + runs-on: ubuntu-latest + name: OpenBSD + steps: + - uses: actions/checkout@v6 + - name: Start VM + uses: vmactions/openbsd-vm@v1 + with: + release: "7.8" + usesh: true + - name: Install dependencies + shell: openbsd {0} + run: | + pkg_add rust + rustc -Vv + - name: Build + shell: openbsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo build --all-targets --all-features + - name: Test + shell: openbsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo test --all-targets --all-features + - name: Doc + shell: openbsd {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo doc --no-deps --all-features + + haiku: + runs-on: ubuntu-latest + name: Haiku + steps: + - uses: actions/checkout@v6 + - name: Start VM + uses: vmactions/haiku-vm@v1 + with: + release: "r1beta5" + usesh: true + - name: Install dependencies + shell: haiku {0} + run: | + pkgman update + pkgman install -y rust_bin + rustc -Vv + - name: Build + shell: haiku {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo build --all-targets --all-features + - name: Test + shell: haiku {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo test --all-targets --all-features + - name: Doc + shell: haiku {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo doc --no-deps --all-features + From 58569e7fd4b4c135e7b34a0feb98626400b566df Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 09:29:35 -0600 Subject: [PATCH 03/32] Fixes: * omit steps from freebsd/aarch64 that can't work * fix installing rust on freebsd/aarch64 * fix openbsd by not sourceing .cargo/env * add omnios * don't 'pkg update' on haiku --- .github/workflows/ci.yml | 65 +++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90f9fe1311..8cb8615eaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,7 @@ jobs: arch: ${{ matrix.arch }} usesh: true - name: Install dependencies + if: ${{ matrix.arch == 'x86_64' }} shell: freebsd {0} run: | pkg install -y curl @@ -42,31 +43,39 @@ jobs: . $HOME/.cargo/env rustc -vV rustup component add clippy + - name: Install dependencies + if: ${{ matrix.arch == 'aarch64' }} + shell: freebsd {0} + run: | + pkg install -y rust + kldload mqueuefs + rustc -vV - name: Build shell: freebsd {0} run: | - . $HOME/.cargo/env + . $HOME/.cargo/env || true cd $GITHUB_WORKSPACE cargo build --all-targets --all-features - name: Test shell: freebsd {0} run: | - . $HOME/.cargo/env + . $HOME/.cargo/env || true cd $GITHUB_WORKSPACE cargo test --all-targets --all-features - name: Clippy shell: freebsd {0} run: | - . $HOME/.cargo/env + . $HOME/.cargo/env || true cd $GITHUB_WORKSPACE cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - name: Doc shell: freebsd {0} run: | - . $HOME/.cargo/env + . $HOME/.cargo/env || true cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features - name: Hack + if: ${{ matrix.arch == 'x86_64' }} shell: freebsd {0} run: | . $HOME/.cargo/env @@ -75,6 +84,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 - name: i686 Build + if: ${{ matrix.arch == 'x86_64' }} shell: freebsd {0} run: | . $HOME/.cargo/env @@ -82,12 +92,14 @@ jobs: rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test + if: ${{ matrix.arch == 'x86_64' }} shell: freebsd {0} run: | . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc + if: ${{ matrix.arch == 'x86_64' }} shell: freebsd {0} run: | . $HOME/.cargo/env @@ -153,19 +165,16 @@ jobs: - name: Build shell: openbsd {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo build --all-targets --all-features - name: Test shell: openbsd {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo test --all-targets --all-features - name: Doc shell: openbsd {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features @@ -182,23 +191,59 @@ jobs: - name: Install dependencies shell: haiku {0} run: | - pkgman update pkgman install -y rust_bin rustc -Vv - name: Build shell: haiku {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo build --all-targets --all-features - name: Test shell: haiku {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo test --all-targets --all-features - name: Doc shell: haiku {0} + run: | + cd $GITHUB_WORKSPACE + cargo doc --no-deps --all-features + + omnios: + runs-on: ubuntu-latest + name: OmniOS + steps: + - uses: actions/checkout@v6 + - name: Start VM + uses: vmactions/omnios-vm@v1 + with: + release: "r151056" + usesh: true + - name: Install dependencies + shell: omnios {0} + run: | + pkg install developer/build-essential + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + - name: Build + shell: omnios {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo build --all-targets --all-features + - name: Test + shell: omnios {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo test --all-targets --all-features + - name: Clippy + shell: omnios {0} + run: | + . $HOME/.cargo/env + cd $GITHUB_WORKSPACE + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + - name: Doc + shell: omnios {0} run: | . $HOME/.cargo/env cd $GITHUB_WORKSPACE From 59a8022e835c17118b4df8429ffb68f33507c199 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 09:42:18 -0600 Subject: [PATCH 04/32] Try to fix FreeBSD conditional steps --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cb8615eaf..bd8f1737df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: arch: ${{ matrix.arch }} usesh: true - name: Install dependencies - if: ${{ matrix.arch == 'x86_64' }} + if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | pkg install -y curl @@ -44,7 +44,7 @@ jobs: rustc -vV rustup component add clippy - name: Install dependencies - if: ${{ matrix.arch == 'aarch64' }} + if: ${{ matrix.arch }} == 'aarch64' shell: freebsd {0} run: | pkg install -y rust @@ -75,7 +75,7 @@ jobs: cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features - name: Hack - if: ${{ matrix.arch == 'x86_64' }} + if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env @@ -84,7 +84,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 - name: i686 Build - if: ${{ matrix.arch == 'x86_64' }} + if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env @@ -92,14 +92,14 @@ jobs: rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test - if: ${{ matrix.arch == 'x86_64' }} + if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc - if: ${{ matrix.arch == 'x86_64' }} + if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env From 7586410d74bc9c798c2a936e553b9bc6df9f97f6 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 10:20:49 -0600 Subject: [PATCH 05/32] FreeBSD aarch64 needs a separate job --- .github/workflows/ci.yml | 67 ++++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd8f1737df..95d439b405 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: @@ -21,19 +21,15 @@ jobs: - os: freebsd version: "15.0" aarch: x86_64 - - os: freebsd - version: "15.0" - arch: aarch64 steps: - uses: actions/checkout@v6 - name: Start VM uses: vmactions/freebsd-vm@v1 with: release: ${{ matrix.version }} - arch: ${{ matrix.arch }} + arch: 'x86_64' usesh: true - name: Install dependencies - if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | pkg install -y curl @@ -43,13 +39,6 @@ jobs: . $HOME/.cargo/env rustc -vV rustup component add clippy - - name: Install dependencies - if: ${{ matrix.arch }} == 'aarch64' - shell: freebsd {0} - run: | - pkg install -y rust - kldload mqueuefs - rustc -vV - name: Build shell: freebsd {0} run: | @@ -75,7 +64,6 @@ jobs: cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features - name: Hack - if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env @@ -84,7 +72,6 @@ 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 - name: i686 Build - if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env @@ -92,20 +79,66 @@ jobs: rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test - if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc - if: ${{ matrix.arch }} == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features --target i686-unknown-freebsd +# aarch64 needs a separate job. It can't be combined with the x86_64 job using +# a matrix. See https://github.com/vmactions/freebsd-vm/issues/139 +jobs: + freebsd aarch64: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - os: freebsd + version: "15.0" + steps: + - uses: actions/checkout@v6 + - name: Start VM + uses: vmactions/freebsd-vm@v1 + with: + release: ${{ matrix.version }} + arch: 'aarch64' + usesh: true + - name: Install dependencies + shell: freebsd {0} + run: | + pkg install -y rust + kldload mqueuefs + rustc -vV + - name: Build + shell: freebsd {0} + run: | + . $HOME/.cargo/env || true + cd $GITHUB_WORKSPACE + cargo build --all-targets --all-features + - name: Test + shell: freebsd {0} + run: | + . $HOME/.cargo/env || true + cd $GITHUB_WORKSPACE + cargo test --all-targets --all-features + - name: Clippy + shell: freebsd {0} + run: | + . $HOME/.cargo/env || true + cd $GITHUB_WORKSPACE + cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + - name: Doc + shell: freebsd {0} + run: | + . $HOME/.cargo/env || true + cd $GITHUB_WORKSPACE + cargo doc --no-deps --all-features netbsd: runs-on: ubuntu-latest From 50e895fd314bf11c7a9db3fe417be8c8039a7af1 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 10:25:57 -0600 Subject: [PATCH 06/32] spaces to underscores --- .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 95d439b405..2aa49b5577 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: types: [checks_requested] jobs: - freebsd x86_64: + freebsd_x86_64: runs-on: ubuntu-latest strategy: matrix: @@ -94,7 +94,7 @@ jobs: # aarch64 needs a separate job. It can't be combined with the x86_64 job using # a matrix. See https://github.com/vmactions/freebsd-vm/issues/139 jobs: - freebsd aarch64: + freebsd_aarch64: runs-on: ubuntu-latest strategy: matrix: @@ -140,6 +140,8 @@ jobs: cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features + # Each operating system needs a separate job. They can't share job + # configurations due to https://github.com/vmactions/netbsd-vm/issues/7 netbsd: runs-on: ubuntu-latest name: NetBSD From e529cd2408733fb5d10ed472931fdbd1047b8001 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 10:28:05 -0600 Subject: [PATCH 07/32] Don't duplicate "jobs:" --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2aa49b5577..48e72efdfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,9 +91,8 @@ jobs: cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features --target i686-unknown-freebsd -# aarch64 needs a separate job. It can't be combined with the x86_64 job using -# a matrix. See https://github.com/vmactions/freebsd-vm/issues/139 -jobs: + # aarch64 needs a separate job. It can't be combined with the x86_64 job using + # a matrix. See https://github.com/vmactions/freebsd-vm/issues/139 freebsd_aarch64: runs-on: ubuntu-latest strategy: From d1058954c5fa7b0bde1c0d7cc16e0bd64ae29194 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 10:48:10 -0600 Subject: [PATCH 08/32] don't source .cargo/env on freebsd/aarch64 --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48e72efdfe..c0f641ca07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,25 +117,21 @@ jobs: - name: Build shell: freebsd {0} run: | - . $HOME/.cargo/env || true cd $GITHUB_WORKSPACE cargo build --all-targets --all-features - name: Test shell: freebsd {0} run: | - . $HOME/.cargo/env || true cd $GITHUB_WORKSPACE cargo test --all-targets --all-features - name: Clippy shell: freebsd {0} run: | - . $HOME/.cargo/env || true cd $GITHUB_WORKSPACE cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - name: Doc shell: freebsd {0} run: | - . $HOME/.cargo/env || true cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features From 11d21cc0daf6f53e38cd25f889ba7d0d759d822b Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 14:50:04 -0600 Subject: [PATCH 09/32] Try a different technique to merge freebsd jobs --- .github/workflows/ci.yml | 81 +++++++++++++++------------------------- 1 file changed, 30 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0f641ca07..c85cf97283 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,19 +17,31 @@ jobs: include: - os: freebsd version: "14.3" - aarch: x86_64 + arch: x86_64 - os: freebsd version: "15.0" - aarch: x86_64 + arch: x86_64 + - os: freebsd + version: "15.0" + arch: aarch64 steps: - uses: actions/checkout@v6 - name: Start VM + if: matrix.arch == 'x86_64' + uses: vmactions/freebsd-vm@v1 + with: + release: ${{ matrix.version }} + arch: ${{ matrix.arch }} + usesh: true + - name: Start VM + if: matrix.arch == 'aarch64' uses: vmactions/freebsd-vm@v1 with: release: ${{ matrix.version }} - arch: 'x86_64' + arch: ${{ matrix.arch }} usesh: true - name: Install dependencies + if: matrix.arch == 'x86_64' shell: freebsd {0} run: | pkg install -y curl @@ -39,31 +51,39 @@ jobs: . $HOME/.cargo/env rustc -vV rustup component add clippy + - name: Install dependencies + if: matrix.arch == 'aarch64' + shell: freebsd {0} + run: | + pkg install -y rust + kldload mqueuefs + rustc -vV - name: Build shell: freebsd {0} run: | - . $HOME/.cargo/env || true + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cd $GITHUB_WORKSPACE cargo build --all-targets --all-features - name: Test shell: freebsd {0} run: | - . $HOME/.cargo/env || true + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cd $GITHUB_WORKSPACE cargo test --all-targets --all-features - name: Clippy shell: freebsd {0} run: | - . $HOME/.cargo/env || true + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cd $GITHUB_WORKSPACE cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - name: Doc shell: freebsd {0} run: | - . $HOME/.cargo/env || true + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features - name: Hack + if: matrix.arch == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env @@ -72,6 +92,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 - name: i686 Build + if: matrix.arch == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env @@ -79,62 +100,20 @@ jobs: rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test + if: matrix.arch == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc + if: matrix.arch == 'x86_64' shell: freebsd {0} run: | . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features --target i686-unknown-freebsd - # aarch64 needs a separate job. It can't be combined with the x86_64 job using - # a matrix. See https://github.com/vmactions/freebsd-vm/issues/139 - freebsd_aarch64: - runs-on: ubuntu-latest - strategy: - matrix: - include: - - os: freebsd - version: "15.0" - steps: - - uses: actions/checkout@v6 - - name: Start VM - uses: vmactions/freebsd-vm@v1 - with: - release: ${{ matrix.version }} - arch: 'aarch64' - usesh: true - - name: Install dependencies - shell: freebsd {0} - run: | - pkg install -y rust - kldload mqueuefs - rustc -vV - - name: Build - shell: freebsd {0} - run: | - cd $GITHUB_WORKSPACE - cargo build --all-targets --all-features - - name: Test - shell: freebsd {0} - run: | - cd $GITHUB_WORKSPACE - cargo test --all-targets --all-features - - name: Clippy - shell: freebsd {0} - run: | - cd $GITHUB_WORKSPACE - cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - - name: Doc - shell: freebsd {0} - run: | - cd $GITHUB_WORKSPACE - cargo doc --no-deps --all-features - # Each operating system needs a separate job. They can't share job # configurations due to https://github.com/vmactions/netbsd-vm/issues/7 netbsd: From 876762113fe19c39e6f1350765a2d1578d8e5020 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 15:25:12 -0600 Subject: [PATCH 10/32] Disable building on FreeBSD/aarch becuase it's too slow Without nested virtualization, this job takes 26 minutes --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c85cf97283..adb4e4772f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,10 @@ jobs: - os: freebsd version: "15.0" arch: x86_64 - - os: freebsd - version: "15.0" - arch: aarch64 + # Disable FreeBSD/aarch64 because it's too slow + #- os: freebsd + #version: "15.0" + #arch: aarch64 steps: - uses: actions/checkout@v6 - name: Start VM From 9ab2ae18027a8695bb1e54b3ce7bb123df6ac9e5 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 15:25:58 -0600 Subject: [PATCH 11/32] Attempt to use the "build" action for NetBSD --- .github/actions/build/action.yml | 17 +++++---- .github/actions/test/action.yml | 9 +++-- .github/workflows/ci.yml | 60 +++++++++++++++++++------------- 3 files changed, 54 insertions(+), 32 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index c44b8e10f7..a4b42c121d 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -21,6 +21,11 @@ inputs: required: false default: -D warnings + SHELL: + description: 'Command shell to use' + required: false + default: bash + TARGETS: description: 'Build all targets or only default?' required: false @@ -54,29 +59,29 @@ runs: using: "composite" steps: - name: set up Rust env - shell: bash + shell: ${{ inputs.SHELL }} run: | echo "RUSTFLAGS=${{ inputs.RUSTFLAGS }}" >> $GITHUB_ENV echo "RUSTDOCFLAGS=${{ inputs.RUSTDOCFLAGS }}" >> $GITHUB_ENV - name: debug info - shell: bash + shell: ${{ inputs.SHELL }} run: | ${{ inputs.TOOL }} -Vv rustc -Vv - name: build - shell: bash + shell: ${{ inputs.SHELL }} run: ${{ inputs.TOOL }} ${{ inputs.BUILD }} ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} ${{ inputs.TARGETS }} --all-features - name: doc if: inputs.NODOC == 'false' - shell: bash + shell: ${{ inputs.SHELL }} run: ${{ inputs.TOOL }} doc ${{ inputs.ZFLAGS }} --no-deps --target ${{ inputs.TARGET }} --all-features - name: clippy if: inputs.NOCLIPPY == 'false' - shell: bash + shell: ${{ inputs.SHELL }} run: ${{ inputs.TOOL}} clippy ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} --all-targets --all-features -- ${{ inputs.CLIPPYFLAGS }} - name: Set up cargo-hack @@ -84,6 +89,6 @@ runs: uses: taiki-e/install-action@cargo-hack - name: run cargo hack - shell: bash + shell: ${{ inputs.SHELL }} if: inputs.NOHACK == 'false' run: ${{ inputs.TOOL }} hack ${{ inputs.ZFLAGS }} check --target ${{ inputs.TARGET }} --each-feature diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index df6a18bed5..a7403eed8f 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -5,6 +5,11 @@ inputs: TARGET: required: true + SHELL: + description: 'Command shell to use' + required: false + default: bash + SUDO: description: 'Set it to an empty string to run the tests as the current user, leave it with the default value to test with "sudo"' required: false @@ -27,7 +32,7 @@ runs: using: "composite" steps: - name: set up Rust env - shell: bash + shell: ${{ inputs.SHELL }} run: | echo "RUSTFLAGS=${{ inputs.RUSTFLAGS }}" >> $GITHUB_ENV echo "RUSTDOCFLAGS=${{ inputs.RUSTDOCFLAGS }}" >> $GITHUB_ENV @@ -35,5 +40,5 @@ runs: echo "RUST_BACKTRACE=1" >> $GITHUB_ENV - name: test - shell: bash + shell: ${{ inputs.SHELL }} run: ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adb4e4772f..205d91621f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,30 +132,42 @@ jobs: run: | pkg_add curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - - name: Build - shell: netbsd {0} - run: | - . $HOME/.cargo/env - cd $GITHUB_WORKSPACE - cargo build --all-targets --all-features - - name: Test - shell: netbsd {0} - run: | - . $HOME/.cargo/env - cd $GITHUB_WORKSPACE - cargo test --all-targets --all-features - - name: Clippy - shell: netbsd {0} - run: | - . $HOME/.cargo/env - cd $GITHUB_WORKSPACE - cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - - name: Doc - shell: netbsd {0} - run: | - . $HOME/.cargo/env - cd $GITHUB_WORKSPACE - cargo doc --no-deps --all-features + - name: build + uses: ./.github/actions/build + with: + SHELL: "netbsd {0}" + TARGET: x86_64-unknown-netbsd + NOHACK: true + - name: test + uses: ./.github/actions/test + with: + SHELL: "netbsd {0}" + TARGET: x86_64-unknown-netbsd + NOHACK: true + SUDO: "" + #shell: netbsd {0} + #run: | + #. $HOME/.cargo/env + #cd $GITHUB_WORKSPACE + #cargo build --all-targets --all-features + #- name: Test + #shell: netbsd {0} + #run: | + #. $HOME/.cargo/env + #cd $GITHUB_WORKSPACE + #cargo test --all-targets --all-features + #- name: Clippy + #shell: netbsd {0} + #run: | + #. $HOME/.cargo/env + #cd $GITHUB_WORKSPACE + #cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + #- name: Doc + #shell: netbsd {0} + #run: | + #. $HOME/.cargo/env + #cd $GITHUB_WORKSPACE + #cargo doc --no-deps --all-features openbsd: runs-on: ubuntu-latest From f26f266052e95e06dd578c9147e83dd9e6bd8518 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 15:26:19 -0600 Subject: [PATCH 12/32] Temporarily disable some builds while we work on NetBSD --- .github/workflows/ci.yml | 198 +++++++++++++++++++-------------------- 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 205d91621f..5102f79c7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,105 +169,105 @@ jobs: #cd $GITHUB_WORKSPACE #cargo doc --no-deps --all-features - openbsd: - runs-on: ubuntu-latest - name: OpenBSD - steps: - - uses: actions/checkout@v6 - - name: Start VM - uses: vmactions/openbsd-vm@v1 - with: - release: "7.8" - usesh: true - - name: Install dependencies - shell: openbsd {0} - run: | - pkg_add rust - rustc -Vv - - name: Build - shell: openbsd {0} - run: | - cd $GITHUB_WORKSPACE - cargo build --all-targets --all-features - - name: Test - shell: openbsd {0} - run: | - cd $GITHUB_WORKSPACE - cargo test --all-targets --all-features - - name: Doc - shell: openbsd {0} - run: | - cd $GITHUB_WORKSPACE - cargo doc --no-deps --all-features + #openbsd: + #runs-on: ubuntu-latest + #name: OpenBSD + #steps: + #- uses: actions/checkout@v6 + #- name: Start VM + #uses: vmactions/openbsd-vm@v1 + #with: + #release: "7.8" + #usesh: true + #- name: Install dependencies + #shell: openbsd {0} + #run: | + #pkg_add rust + #rustc -Vv + #- name: Build + #shell: openbsd {0} + #run: | + #cd $GITHUB_WORKSPACE + #cargo build --all-targets --all-features + #- name: Test + #shell: openbsd {0} + #run: | + #cd $GITHUB_WORKSPACE + #cargo test --all-targets --all-features + #- name: Doc + #shell: openbsd {0} + #run: | + #cd $GITHUB_WORKSPACE + #cargo doc --no-deps --all-features - haiku: - runs-on: ubuntu-latest - name: Haiku - steps: - - uses: actions/checkout@v6 - - name: Start VM - uses: vmactions/haiku-vm@v1 - with: - release: "r1beta5" - usesh: true - - name: Install dependencies - shell: haiku {0} - run: | - pkgman install -y rust_bin - rustc -Vv - - name: Build - shell: haiku {0} - run: | - cd $GITHUB_WORKSPACE - cargo build --all-targets --all-features - - name: Test - shell: haiku {0} - run: | - cd $GITHUB_WORKSPACE - cargo test --all-targets --all-features - - name: Doc - shell: haiku {0} - run: | - cd $GITHUB_WORKSPACE - cargo doc --no-deps --all-features + #haiku: + #runs-on: ubuntu-latest + #name: Haiku + #steps: + #- uses: actions/checkout@v6 + #- name: Start VM + #uses: vmactions/haiku-vm@v1 + #with: + #release: "r1beta5" + #usesh: true + #- name: Install dependencies + #shell: haiku {0} + #run: | + #pkgman install -y rust_bin + #rustc -Vv + #- name: Build + #shell: haiku {0} + #run: | + #cd $GITHUB_WORKSPACE + #cargo build --all-targets --all-features + #- name: Test + #shell: haiku {0} + #run: | + #cd $GITHUB_WORKSPACE + #cargo test --all-targets --all-features + #- name: Doc + #shell: haiku {0} + #run: | + #cd $GITHUB_WORKSPACE + #cargo doc --no-deps --all-features - omnios: - runs-on: ubuntu-latest - name: OmniOS - steps: - - uses: actions/checkout@v6 - - name: Start VM - uses: vmactions/omnios-vm@v1 - with: - release: "r151056" - usesh: true - - name: Install dependencies - shell: omnios {0} - run: | - pkg install developer/build-essential - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - - name: Build - shell: omnios {0} - run: | - . $HOME/.cargo/env - cd $GITHUB_WORKSPACE - cargo build --all-targets --all-features - - name: Test - shell: omnios {0} - run: | - . $HOME/.cargo/env - cd $GITHUB_WORKSPACE - cargo test --all-targets --all-features - - name: Clippy - shell: omnios {0} - run: | - . $HOME/.cargo/env - cd $GITHUB_WORKSPACE - cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - - name: Doc - shell: omnios {0} - run: | - . $HOME/.cargo/env - cd $GITHUB_WORKSPACE - cargo doc --no-deps --all-features + #omnios: + #runs-on: ubuntu-latest + #name: OmniOS + #steps: + #- uses: actions/checkout@v6 + #- name: Start VM + #uses: vmactions/omnios-vm@v1 + #with: + #release: "r151056" + #usesh: true + #- name: Install dependencies + #shell: omnios {0} + #run: | + #pkg install developer/build-essential + #curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + #- name: Build + #shell: omnios {0} + #run: | + #. $HOME/.cargo/env + #cd $GITHUB_WORKSPACE + #cargo build --all-targets --all-features + #- name: Test + #shell: omnios {0} + #run: | + #. $HOME/.cargo/env + #cd $GITHUB_WORKSPACE + #cargo test --all-targets --all-features + #- name: Clippy + #shell: omnios {0} + #run: | + #. $HOME/.cargo/env + #cd $GITHUB_WORKSPACE + #cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints + #- name: Doc + #shell: omnios {0} + #run: | + #. $HOME/.cargo/env + #cd $GITHUB_WORKSPACE + #cargo doc --no-deps --all-features From 983363fbd3a207a69002cd95fad68285087cb23c Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 15:31:55 -0600 Subject: [PATCH 13/32] More attempts to use the build action --- .github/actions/build/action.yml | 13 ++++++++++--- .github/actions/test/action.yml | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index a4b42c121d..2e2d236c0d 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -67,22 +67,29 @@ runs: - name: debug info shell: ${{ inputs.SHELL }} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi ${{ inputs.TOOL }} -Vv rustc -Vv - name: build shell: ${{ inputs.SHELL }} - run: ${{ inputs.TOOL }} ${{ inputs.BUILD }} ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} ${{ inputs.TARGETS }} --all-features + run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + ${{ inputs.TOOL }} ${{ inputs.BUILD }} ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} ${{ inputs.TARGETS }} --all-features - name: doc if: inputs.NODOC == 'false' shell: ${{ inputs.SHELL }} - run: ${{ inputs.TOOL }} doc ${{ inputs.ZFLAGS }} --no-deps --target ${{ inputs.TARGET }} --all-features + run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + ${{ inputs.TOOL }} doc ${{ inputs.ZFLAGS }} --no-deps --target ${{ inputs.TARGET }} --all-features - name: clippy if: inputs.NOCLIPPY == 'false' shell: ${{ inputs.SHELL }} - run: ${{ inputs.TOOL}} clippy ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} --all-targets --all-features -- ${{ inputs.CLIPPYFLAGS }} + run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + ${{ inputs.TOOL}} clippy ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} --all-targets --all-features -- ${{ inputs.CLIPPYFLAGS }} - name: Set up cargo-hack if: inputs.NOHACK == 'false' diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index a7403eed8f..543ae507fd 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -34,6 +34,7 @@ runs: - name: set up Rust env shell: ${{ inputs.SHELL }} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi echo "RUSTFLAGS=${{ inputs.RUSTFLAGS }}" >> $GITHUB_ENV echo "RUSTDOCFLAGS=${{ inputs.RUSTDOCFLAGS }}" >> $GITHUB_ENV # Enable backtrace to make debugging easier @@ -41,4 +42,6 @@ runs: - name: test shell: ${{ inputs.SHELL }} - run: ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }} + run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }} From c2870876fa932c76e703b1e0ccabf2cabd10b02e Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 15:43:35 -0600 Subject: [PATCH 14/32] Add .cargo/env to .profile --- .github/actions/build/action.yml | 4 ---- .github/actions/test/action.yml | 2 -- .github/workflows/ci.yml | 14 ++------------ 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 2e2d236c0d..81e99b8f7b 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -67,28 +67,24 @@ runs: - name: debug info shell: ${{ inputs.SHELL }} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi ${{ inputs.TOOL }} -Vv rustc -Vv - name: build shell: ${{ inputs.SHELL }} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi ${{ inputs.TOOL }} ${{ inputs.BUILD }} ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} ${{ inputs.TARGETS }} --all-features - name: doc if: inputs.NODOC == 'false' shell: ${{ inputs.SHELL }} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi ${{ inputs.TOOL }} doc ${{ inputs.ZFLAGS }} --no-deps --target ${{ inputs.TARGET }} --all-features - name: clippy if: inputs.NOCLIPPY == 'false' shell: ${{ inputs.SHELL }} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi ${{ inputs.TOOL}} clippy ${{ inputs.ZFLAGS }} --target ${{ inputs.TARGET }} --all-targets --all-features -- ${{ inputs.CLIPPYFLAGS }} - name: Set up cargo-hack diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 543ae507fd..d6883fcbcc 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -34,7 +34,6 @@ runs: - name: set up Rust env shell: ${{ inputs.SHELL }} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi echo "RUSTFLAGS=${{ inputs.RUSTFLAGS }}" >> $GITHUB_ENV echo "RUSTDOCFLAGS=${{ inputs.RUSTDOCFLAGS }}" >> $GITHUB_ENV # Enable backtrace to make debugging easier @@ -43,5 +42,4 @@ runs: - name: test shell: ${{ inputs.SHELL }} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi ${{ inputs.SUDO }} $(which ${{ inputs.TOOL }}) test --target ${{ inputs.TARGET }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5102f79c7d..ac4fc00680 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,7 @@ jobs: kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable + echo '. $HOME/.cargo/env' >> $HOME/.profile . $HOME/.cargo/env rustc -vV rustup component add clippy @@ -62,32 +63,27 @@ jobs: - name: Build shell: freebsd {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cd $GITHUB_WORKSPACE cargo build --all-targets --all-features - name: Test shell: freebsd {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cd $GITHUB_WORKSPACE cargo test --all-targets --all-features - name: Clippy shell: freebsd {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cd $GITHUB_WORKSPACE cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - name: Doc shell: freebsd {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features - name: Hack if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE 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 @@ -96,7 +92,6 @@ jobs: if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets @@ -104,14 +99,12 @@ jobs: if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - . $HOME/.cargo/env cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features --target i686-unknown-freebsd @@ -132,6 +125,7 @@ jobs: run: | pkg_add curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo '. $HOME/.cargo/env' >> $HOME/.profile - name: build uses: ./.github/actions/build with: @@ -147,25 +141,21 @@ jobs: SUDO: "" #shell: netbsd {0} #run: | - #. $HOME/.cargo/env #cd $GITHUB_WORKSPACE #cargo build --all-targets --all-features #- name: Test #shell: netbsd {0} #run: | - #. $HOME/.cargo/env #cd $GITHUB_WORKSPACE #cargo test --all-targets --all-features #- name: Clippy #shell: netbsd {0} #run: | - #. $HOME/.cargo/env #cd $GITHUB_WORKSPACE #cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints #- name: Doc #shell: netbsd {0} #run: | - #. $HOME/.cargo/env #cd $GITHUB_WORKSPACE #cargo doc --no-deps --all-features From 567db306a2b08f693bce0d7cce4b26f14eeeb4a0 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 15:48:47 -0600 Subject: [PATCH 15/32] fixup --- .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 ac4fc00680..b96413a144 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable - echo '. $HOME/.cargo/env' >> $HOME/.profile + echo '. $HOME/.cargo/env' >> $HOME/.shrc . $HOME/.cargo/env rustc -vV rustup component add clippy @@ -64,6 +64,8 @@ jobs: shell: freebsd {0} run: | cd $GITHUB_WORKSPACE + cat $HOME/.shrc + echo $PATH cargo build --all-targets --all-features - name: Test shell: freebsd {0} From faeff2181a338e0124ef9397f7eba3c22913c24c Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 14 Apr 2026 16:02:58 -0600 Subject: [PATCH 16/32] another attempt to set ENV --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b96413a144..8e0cc7e89a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,8 @@ on: jobs: freebsd_x86_64: runs-on: ubuntu-latest + env: + ENV: $HOME/.shrc strategy: matrix: include: @@ -34,6 +36,7 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true + envs: 'ENV' - name: Start VM if: matrix.arch == 'aarch64' uses: vmactions/freebsd-vm@v1 @@ -41,6 +44,7 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true + envs: 'ENV' - name: Install dependencies if: matrix.arch == 'x86_64' shell: freebsd {0} @@ -49,7 +53,7 @@ jobs: kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable - echo '. $HOME/.cargo/env' >> $HOME/.shrc + echo '. $HOME/.cargo/env' >> $ENV . $HOME/.cargo/env rustc -vV rustup component add clippy @@ -64,7 +68,6 @@ jobs: shell: freebsd {0} run: | cd $GITHUB_WORKSPACE - cat $HOME/.shrc echo $PATH cargo build --all-targets --all-features - name: Test From e3751bd6385067c3c129872e06a9b4c8bb7e72e2 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 09:27:54 -0600 Subject: [PATCH 17/32] No need to 'cd $GITHUB_WORKSPACE' with vmactions 1.4.5 --- .github/workflows/ci.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e0cc7e89a..f2cb3e3b10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,29 +67,24 @@ jobs: - name: Build shell: freebsd {0} run: | - cd $GITHUB_WORKSPACE echo $PATH cargo build --all-targets --all-features - name: Test shell: freebsd {0} run: | - cd $GITHUB_WORKSPACE cargo test --all-targets --all-features - name: Clippy shell: freebsd {0} run: | - cd $GITHUB_WORKSPACE cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - name: Doc shell: freebsd {0} run: | - cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features - name: Hack if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - cd $GITHUB_WORKSPACE 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 @@ -97,20 +92,17 @@ jobs: if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - cd $GITHUB_WORKSPACE rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - cd $GITHUB_WORKSPACE cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - cd $GITHUB_WORKSPACE cargo doc --no-deps --all-features --target i686-unknown-freebsd # Each operating system needs a separate job. They can't share job @@ -146,22 +138,18 @@ jobs: SUDO: "" #shell: netbsd {0} #run: | - #cd $GITHUB_WORKSPACE #cargo build --all-targets --all-features #- name: Test #shell: netbsd {0} #run: | - #cd $GITHUB_WORKSPACE #cargo test --all-targets --all-features #- name: Clippy #shell: netbsd {0} #run: | - #cd $GITHUB_WORKSPACE #cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints #- name: Doc #shell: netbsd {0} #run: | - #cd $GITHUB_WORKSPACE #cargo doc --no-deps --all-features #openbsd: @@ -182,17 +170,14 @@ jobs: #- name: Build #shell: openbsd {0} #run: | - #cd $GITHUB_WORKSPACE #cargo build --all-targets --all-features #- name: Test #shell: openbsd {0} #run: | - #cd $GITHUB_WORKSPACE #cargo test --all-targets --all-features #- name: Doc #shell: openbsd {0} #run: | - #cd $GITHUB_WORKSPACE #cargo doc --no-deps --all-features #haiku: @@ -213,17 +198,14 @@ jobs: #- name: Build #shell: haiku {0} #run: | - #cd $GITHUB_WORKSPACE #cargo build --all-targets --all-features #- name: Test #shell: haiku {0} #run: | - #cd $GITHUB_WORKSPACE #cargo test --all-targets --all-features #- name: Doc #shell: haiku {0} #run: | - #cd $GITHUB_WORKSPACE #cargo doc --no-deps --all-features #omnios: @@ -245,24 +227,20 @@ jobs: #shell: omnios {0} #run: | #. $HOME/.cargo/env - #cd $GITHUB_WORKSPACE #cargo build --all-targets --all-features #- name: Test #shell: omnios {0} #run: | #. $HOME/.cargo/env - #cd $GITHUB_WORKSPACE #cargo test --all-targets --all-features #- name: Clippy #shell: omnios {0} #run: | #. $HOME/.cargo/env - #cd $GITHUB_WORKSPACE #cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints #- name: Doc #shell: omnios {0} #run: | #. $HOME/.cargo/env - #cd $GITHUB_WORKSPACE #cargo doc --no-deps --all-features From 62f16ce8dfa48f57d89da104e8a8ebbac0be5d6d Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 09:39:24 -0600 Subject: [PATCH 18/32] Try using GITHUB_PATH --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2cb3e3b10..12003af427 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,6 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true - envs: 'ENV' - name: Start VM if: matrix.arch == 'aarch64' uses: vmactions/freebsd-vm@v1 @@ -44,7 +43,6 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true - envs: 'ENV' - name: Install dependencies if: matrix.arch == 'x86_64' shell: freebsd {0} @@ -53,8 +51,8 @@ jobs: kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable - echo '. $HOME/.cargo/env' >> $ENV . $HOME/.cargo/env + echo "$CARGO_HOME/bin" >> $GITHUB_PATH rustc -vV rustup component add clippy - name: Install dependencies @@ -67,7 +65,10 @@ jobs: - name: Build shell: freebsd {0} run: | - echo $PATH + echo PWD is $PWD + echo GITHUB_WORKSPACE is $GITHUB_WORKSPACE + echo GITHUB_PATH is $GITHUB_PATH + echo PATH is $PATH cargo build --all-targets --all-features - name: Test shell: freebsd {0} From f59fb43692eddc7a77d8a59664dd52247828cfa8 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 09:49:45 -0600 Subject: [PATCH 19/32] temporarily disable netbsd build --- .github/workflows/ci.yml | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12003af427..ef9e86a5c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,35 +108,35 @@ jobs: # Each operating system needs a separate job. They can't share job # configurations due to https://github.com/vmactions/netbsd-vm/issues/7 - netbsd: - runs-on: ubuntu-latest - name: NetBSD - steps: - - uses: actions/checkout@v6 - - name: Start VM - uses: vmactions/netbsd-vm@v1 - with: - release: "10.1" - usesh: true - - name: Install dependencies - shell: netbsd {0} - run: | - pkg_add curl - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - echo '. $HOME/.cargo/env' >> $HOME/.profile - - name: build - uses: ./.github/actions/build - with: - SHELL: "netbsd {0}" - TARGET: x86_64-unknown-netbsd - NOHACK: true - - name: test - uses: ./.github/actions/test - with: - SHELL: "netbsd {0}" - TARGET: x86_64-unknown-netbsd - NOHACK: true - SUDO: "" + #netbsd: + #runs-on: ubuntu-latest + #name: NetBSD + #steps: + #- uses: actions/checkout@v6 + #- name: Start VM + #uses: vmactions/netbsd-vm@v1 + #with: + #release: "10.1" + #usesh: true + #- name: Install dependencies + #shell: netbsd {0} + #run: | + #pkg_add curl + #curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + #echo '. $HOME/.cargo/env' >> $HOME/.profile + #- name: build + #uses: ./.github/actions/build + #with: + #SHELL: "netbsd {0}" + #TARGET: x86_64-unknown-netbsd + #NOHACK: true + #- name: test + #uses: ./.github/actions/test + #with: + #SHELL: "netbsd {0}" + #TARGET: x86_64-unknown-netbsd + #NOHACK: true + #SUDO: "" #shell: netbsd {0} #run: | #cargo build --all-targets --all-features From f9c90228e6eae62088fbd96efb2087ea87652d09 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 09:58:04 -0600 Subject: [PATCH 20/32] Stop trying to persist PATH between steps, for now --- .github/workflows/ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef9e86a5c1..8e00a2c761 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,6 @@ on: jobs: freebsd_x86_64: runs-on: ubuntu-latest - env: - ENV: $HOME/.shrc strategy: matrix: include: @@ -52,7 +50,6 @@ jobs: fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable . $HOME/.cargo/env - echo "$CARGO_HOME/bin" >> $GITHUB_PATH rustc -vV rustup component add clippy - name: Install dependencies @@ -67,25 +64,33 @@ jobs: run: | echo PWD is $PWD echo GITHUB_WORKSPACE is $GITHUB_WORKSPACE + echo GITHUB_ENV is $GITHUB_ENV echo GITHUB_PATH is $GITHUB_PATH + echo GITHUB_PATH contains `cat $GITHUB_PATH` echo PATH is $PATH + ls + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo build --all-targets --all-features - name: Test shell: freebsd {0} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo test --all-targets --all-features - name: Clippy shell: freebsd {0} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - name: Doc shell: freebsd {0} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo doc --no-deps --all-features - name: Hack if: matrix.arch == 'x86_64' shell: freebsd {0} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi 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 @@ -93,17 +98,20 @@ jobs: if: matrix.arch == 'x86_64' shell: freebsd {0} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test if: matrix.arch == 'x86_64' shell: freebsd {0} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc if: matrix.arch == 'x86_64' shell: freebsd {0} run: | + if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo doc --no-deps --all-features --target i686-unknown-freebsd # Each operating system needs a separate job. They can't share job From e660d8db3b8b05a726528a73012900906ca3ce29 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 10:19:33 -0600 Subject: [PATCH 21/32] Try sync=nfs it might be faster, and might preserve stuff like GITHUB_PATH --- .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 8e00a2c761..6cd4584c7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true + sync: nfs - name: Start VM if: matrix.arch == 'aarch64' uses: vmactions/freebsd-vm@v1 @@ -41,6 +42,7 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true + sync: nfs - name: Install dependencies if: matrix.arch == 'x86_64' shell: freebsd {0} @@ -68,7 +70,6 @@ jobs: echo GITHUB_PATH is $GITHUB_PATH echo GITHUB_PATH contains `cat $GITHUB_PATH` echo PATH is $PATH - ls if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo build --all-targets --all-features - name: Test From ef962cd0d3b4be4b607d52a2bec53a29f4a672d9 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 10:33:38 -0600 Subject: [PATCH 22/32] Use local locking instead of locking over NFS --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6cd4584c7c..e5fa5cdd65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,7 @@ jobs: if: matrix.arch == 'x86_64' shell: freebsd {0} run: | + sysctl vfs.nfsd.enable_locallocks=1 pkg install -y curl kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh From c6989a261bc55a9a8d6d5d82d5ca20bad0894d27 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 10:37:00 -0600 Subject: [PATCH 23/32] Revert "Use local locking instead of locking over NFS" This reverts commit ef962cd0d3b4be4b607d52a2bec53a29f4a672d9. --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5fa5cdd65..6cd4584c7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,6 @@ jobs: if: matrix.arch == 'x86_64' shell: freebsd {0} run: | - sysctl vfs.nfsd.enable_locallocks=1 pkg install -y curl kldload mqueuefs fetch https://sh.rustup.rs -o rustup.sh From 1647a44eacd5c11744f39e4cefb98ba2bdec24e9 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 10:37:10 -0600 Subject: [PATCH 24/32] Revert "Try sync=nfs" This reverts commit e660d8db3b8b05a726528a73012900906ca3ce29. --- .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 6cd4584c7c..8e00a2c761 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,6 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true - sync: nfs - name: Start VM if: matrix.arch == 'aarch64' uses: vmactions/freebsd-vm@v1 @@ -42,7 +41,6 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true - sync: nfs - name: Install dependencies if: matrix.arch == 'x86_64' shell: freebsd {0} @@ -70,6 +68,7 @@ jobs: echo GITHUB_PATH is $GITHUB_PATH echo GITHUB_PATH contains `cat $GITHUB_PATH` echo PATH is $PATH + ls if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo build --all-targets --all-features - name: Test From 4b7c5b113b8f2de3c0d28bea135744c221fb154a Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 10:38:24 -0600 Subject: [PATCH 25/32] Try vmactions' new custom-shell-name feature --- .github/workflows/ci.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e00a2c761..d529181c95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true + custom-shell-name: vmsh - name: Start VM if: matrix.arch == 'aarch64' uses: vmactions/freebsd-vm@v1 @@ -41,9 +42,10 @@ jobs: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true + custom-shell-name: vmsh - name: Install dependencies if: matrix.arch == 'x86_64' - shell: freebsd {0} + shell: vmsh {0} run: | pkg install -y curl kldload mqueuefs @@ -54,13 +56,13 @@ jobs: rustup component add clippy - name: Install dependencies if: matrix.arch == 'aarch64' - shell: freebsd {0} + shell: vmsh {0} run: | pkg install -y rust kldload mqueuefs rustc -vV - name: Build - shell: freebsd {0} + shell: vmsh {0} run: | echo PWD is $PWD echo GITHUB_WORKSPACE is $GITHUB_WORKSPACE @@ -72,23 +74,23 @@ jobs: if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo build --all-targets --all-features - name: Test - shell: freebsd {0} + shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo test --all-targets --all-features - name: Clippy - shell: freebsd {0} + shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - name: Doc - shell: freebsd {0} + shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo doc --no-deps --all-features - name: Hack if: matrix.arch == 'x86_64' - shell: freebsd {0} + shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH @@ -96,20 +98,20 @@ jobs: cargo hack check --each-feature - name: i686 Build if: matrix.arch == 'x86_64' - shell: freebsd {0} + shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test if: matrix.arch == 'x86_64' - shell: freebsd {0} + shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc if: matrix.arch == 'x86_64' - shell: freebsd {0} + shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo doc --no-deps --all-features --target i686-unknown-freebsd From 3bf16ac93b5c53117048796cc03201fd40812d89 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 11:01:13 -0600 Subject: [PATCH 26/32] Try combining FreeBSD and NetBSD jobs --- .github/workflows/ci.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d529181c95..4534a6ec37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,9 +18,15 @@ jobs: - os: freebsd version: "14.3" arch: x86_64 + action: vmactions/freebsd-vm@v1 - os: freebsd version: "15.0" arch: x86_64 + action: vmactions/freebsd-vm@v1 + - os: netbsd + version: "10.1" + arch: x86_64 + action: vmactions/netbsd-vm@v1 # Disable FreeBSD/aarch64 because it's too slow #- os: freebsd #version: "15.0" @@ -28,8 +34,7 @@ jobs: steps: - uses: actions/checkout@v6 - name: Start VM - if: matrix.arch == 'x86_64' - uses: vmactions/freebsd-vm@v1 + uses: ${{ matrix.action }} with: release: ${{ matrix.version }} arch: ${{ matrix.arch }} @@ -37,14 +42,14 @@ jobs: custom-shell-name: vmsh - name: Start VM if: matrix.arch == 'aarch64' - uses: vmactions/freebsd-vm@v1 + uses: ${{ matrix.action }} with: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true custom-shell-name: vmsh - name: Install dependencies - if: matrix.arch == 'x86_64' + if: matrix.arch == 'x86_64' && matrix.os = 'freebsd' shell: vmsh {0} run: | pkg install -y curl @@ -55,12 +60,19 @@ jobs: rustc -vV rustup component add clippy - name: Install dependencies - if: matrix.arch == 'aarch64' + if: matrix.arch == 'aarch64' && matrix.os = 'freebsd' shell: vmsh {0} run: | pkg install -y rust kldload mqueuefs rustc -vV + - name: Install dependencies + if: matrix.os = 'netbsd' + shell: vmsh {0} + run: | + pkg_add curl + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo '. $HOME/.cargo/env' >> $HOME/.profile - name: Build shell: vmsh {0} run: | @@ -97,20 +109,20 @@ 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 - name: i686 Build - if: matrix.arch == 'x86_64' + if: matrix.arch == 'aarch64' && matrix.os = 'freebsd' shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test - if: matrix.arch == 'x86_64' + if: matrix.arch == 'aarch64' && matrix.os = 'freebsd' shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc - if: matrix.arch == 'x86_64' + if: matrix.arch == 'aarch64' && matrix.os = 'freebsd' shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi From 42cfbf57ecd3cb4fbec68126838c706166a93142 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 11:02:52 -0600 Subject: [PATCH 27/32] change matrix.action syntax --- .github/workflows/ci.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4534a6ec37..958c0ce2b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,15 +34,7 @@ jobs: steps: - uses: actions/checkout@v6 - name: Start VM - uses: ${{ matrix.action }} - with: - release: ${{ matrix.version }} - arch: ${{ matrix.arch }} - usesh: true - custom-shell-name: vmsh - - name: Start VM - if: matrix.arch == 'aarch64' - uses: ${{ matrix.action }} + uses: matrix.action with: release: ${{ matrix.version }} arch: ${{ matrix.arch }} From 57f0ef6b41121fd3a977eddbca0c4610bc0aea73 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 11:04:50 -0600 Subject: [PATCH 28/32] fix matrix.action syntax --- .github/workflows/ci.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 958c0ce2b4..23536fdca3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,15 +18,12 @@ jobs: - os: freebsd version: "14.3" arch: x86_64 - action: vmactions/freebsd-vm@v1 - os: freebsd version: "15.0" arch: x86_64 - action: vmactions/freebsd-vm@v1 - os: netbsd version: "10.1" arch: x86_64 - action: vmactions/netbsd-vm@v1 # Disable FreeBSD/aarch64 because it's too slow #- os: freebsd #version: "15.0" @@ -34,14 +31,23 @@ jobs: steps: - uses: actions/checkout@v6 - name: Start VM - uses: matrix.action + if: matrix.os == 'freebsd' + uses: vmactions/freebsd-vm@v1 + with: + release: ${{ matrix.version }} + arch: ${{ matrix.arch }} + usesh: true + custom-shell-name: vmsh + - name: Start VM + if: matrix.os == 'netbsd' + uses: vmactions/netbsd-vm@v1 with: release: ${{ matrix.version }} arch: ${{ matrix.arch }} usesh: true custom-shell-name: vmsh - name: Install dependencies - if: matrix.arch == 'x86_64' && matrix.os = 'freebsd' + if: matrix.arch == 'x86_64' && matrix.os == 'freebsd' shell: vmsh {0} run: | pkg install -y curl @@ -52,14 +58,14 @@ jobs: rustc -vV rustup component add clippy - name: Install dependencies - if: matrix.arch == 'aarch64' && matrix.os = 'freebsd' + if: matrix.arch == 'aarch64' && matrix.os == 'freebsd' shell: vmsh {0} run: | pkg install -y rust kldload mqueuefs rustc -vV - name: Install dependencies - if: matrix.os = 'netbsd' + if: matrix.os == 'netbsd' shell: vmsh {0} run: | pkg_add curl @@ -101,20 +107,20 @@ 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 - name: i686 Build - if: matrix.arch == 'aarch64' && matrix.os = 'freebsd' + if: matrix.arch == 'aarch64' && matrix.os == 'freebsd' shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test - if: matrix.arch == 'aarch64' && matrix.os = 'freebsd' + if: matrix.arch == 'aarch64' && matrix.os == 'freebsd' shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc - if: matrix.arch == 'aarch64' && matrix.os = 'freebsd' + if: matrix.arch == 'aarch64' && matrix.os == 'freebsd' shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi From 5d6807149fe2f2dc07224875b90ec654331b275c Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 11:10:09 -0600 Subject: [PATCH 29/32] SEt fail-fast false, and fix the job name --- .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 23536fdca3..2462a46f6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,10 @@ on: types: [checks_requested] jobs: - freebsd_x86_64: + vmactions: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: include: - os: freebsd From 4b7a68f3ac7bba8a5eebaca1b6465304274b2048 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 15 Apr 2026 11:30:41 -0600 Subject: [PATCH 30/32] Combine all of the vmactions jobs --- .github/workflows/ci.yml | 230 +++++++++++++-------------------------- 1 file changed, 78 insertions(+), 152 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2462a46f6f..a0d62b52c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,18 +19,46 @@ jobs: - os: freebsd version: "14.3" arch: x86_64 + - os: freebsd version: "15.0" arch: x86_64 - - os: netbsd - version: "10.1" - arch: x86_64 + # Disable FreeBSD/aarch64 because it's too slow #- os: freebsd #version: "15.0" #arch: aarch64 + + # Disable Haiku because vmactions/haiku-vm doesn't yet support + # custom-shell-name. Also, Nix doesn't have a Haiku maintainer who + # can fix the tests for us. + #- os: haiku + #version: "r1beta5" + #arch: x86_64 + + # Disable NetBSD because vmactions/netbsd-vm doesn't yet support + # custom-shell-name. Also, Nix doesn't have a NetBSD maintainer who + # can fix the tests for us. + #- os: netbsd + #version: "10.1" + #arch: x86_64 + + # Disable OmniOS because vmactions/omnios-vm doesn't yet support + # custom-shell-name. Also, Nix doesn't have a OmniOS maintainer who + # can fix the tests for us. + #- os: omnios + #version: "r151056" + #arch: x86_64 + + # Disable OpenBSD because vmactions/openbsd-vm doesn't yet support + # custom-shell-name. Also, Nix doesn't have a OpenBSD maintainer who + # can fix the tests for us. + #- os: openbsd + #version: "7.8" + #arch: x86_64 steps: - uses: actions/checkout@v6 + - name: Start VM if: matrix.os == 'freebsd' uses: vmactions/freebsd-vm@v1 @@ -39,6 +67,14 @@ jobs: arch: ${{ matrix.arch }} usesh: true custom-shell-name: vmsh + - name: Start VM + if: matrix.os == 'haiku' + uses: vmactions/haiku-vm@v1 + with: + release: ${{ matrix.version }} + arch: ${{ matrix.arch }} + usesh: true + custom-shell-name: vmsh - name: Start VM if: matrix.os == 'netbsd' uses: vmactions/netbsd-vm@v1 @@ -47,6 +83,23 @@ jobs: arch: ${{ matrix.arch }} usesh: true custom-shell-name: vmsh + - name: Start VM + if: matrix.os == 'omnios' + uses: vmactions/omnios-vm@v1 + with: + release: ${{ matrix.version }} + arch: ${{ matrix.arch }} + usesh: true + custom-shell-name: vmsh + - name: Start VM + if: matrix.os == 'openbsd' + uses: vmactions/openbsd-vm@v1 + with: + release: ${{ matrix.version }} + arch: ${{ matrix.arch }} + usesh: true + custom-shell-name: vmsh + - name: Install dependencies if: matrix.arch == 'x86_64' && matrix.os == 'freebsd' shell: vmsh {0} @@ -65,23 +118,34 @@ jobs: pkg install -y rust kldload mqueuefs rustc -vV + - name: Install dependencies + if: matrix.os == 'haiku' + shell: vmsh {0} + run: | + pkgman install -y rust_bin + rustc -vV - name: Install dependencies if: matrix.os == 'netbsd' shell: vmsh {0} run: | pkg_add curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - echo '. $HOME/.cargo/env' >> $HOME/.profile + - name: Install dependencies + if: matrix.os == 'omnios' + shell: vmsh {0} + run: | + pkg install developer/build-essential + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + - name: Install dependencies + if: matrix.os == 'openbsd' + shell: vmsh {0} + run: | + pkg_add rust + rustc -vV + - name: Build shell: vmsh {0} run: | - echo PWD is $PWD - echo GITHUB_WORKSPACE is $GITHUB_WORKSPACE - echo GITHUB_ENV is $GITHUB_ENV - echo GITHUB_PATH is $GITHUB_PATH - echo GITHUB_PATH contains `cat $GITHUB_PATH` - echo PATH is $PATH - ls if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo build --all-targets --all-features - name: Test @@ -99,14 +163,16 @@ jobs: run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo doc --no-deps --all-features + - name: Hack - if: matrix.arch == 'x86_64' + if: matrix.arch == 'x86_64' && matrix.os == 'freebsd' shell: vmsh {0} run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi 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 + - name: i686 Build if: matrix.arch == 'aarch64' && matrix.os == 'freebsd' shell: vmsh {0} @@ -126,143 +192,3 @@ jobs: run: | if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo doc --no-deps --all-features --target i686-unknown-freebsd - - # Each operating system needs a separate job. They can't share job - # configurations due to https://github.com/vmactions/netbsd-vm/issues/7 - #netbsd: - #runs-on: ubuntu-latest - #name: NetBSD - #steps: - #- uses: actions/checkout@v6 - #- name: Start VM - #uses: vmactions/netbsd-vm@v1 - #with: - #release: "10.1" - #usesh: true - #- name: Install dependencies - #shell: netbsd {0} - #run: | - #pkg_add curl - #curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - #echo '. $HOME/.cargo/env' >> $HOME/.profile - #- name: build - #uses: ./.github/actions/build - #with: - #SHELL: "netbsd {0}" - #TARGET: x86_64-unknown-netbsd - #NOHACK: true - #- name: test - #uses: ./.github/actions/test - #with: - #SHELL: "netbsd {0}" - #TARGET: x86_64-unknown-netbsd - #NOHACK: true - #SUDO: "" - #shell: netbsd {0} - #run: | - #cargo build --all-targets --all-features - #- name: Test - #shell: netbsd {0} - #run: | - #cargo test --all-targets --all-features - #- name: Clippy - #shell: netbsd {0} - #run: | - #cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - #- name: Doc - #shell: netbsd {0} - #run: | - #cargo doc --no-deps --all-features - - #openbsd: - #runs-on: ubuntu-latest - #name: OpenBSD - #steps: - #- uses: actions/checkout@v6 - #- name: Start VM - #uses: vmactions/openbsd-vm@v1 - #with: - #release: "7.8" - #usesh: true - #- name: Install dependencies - #shell: openbsd {0} - #run: | - #pkg_add rust - #rustc -Vv - #- name: Build - #shell: openbsd {0} - #run: | - #cargo build --all-targets --all-features - #- name: Test - #shell: openbsd {0} - #run: | - #cargo test --all-targets --all-features - #- name: Doc - #shell: openbsd {0} - #run: | - #cargo doc --no-deps --all-features - - #haiku: - #runs-on: ubuntu-latest - #name: Haiku - #steps: - #- uses: actions/checkout@v6 - #- name: Start VM - #uses: vmactions/haiku-vm@v1 - #with: - #release: "r1beta5" - #usesh: true - #- name: Install dependencies - #shell: haiku {0} - #run: | - #pkgman install -y rust_bin - #rustc -Vv - #- name: Build - #shell: haiku {0} - #run: | - #cargo build --all-targets --all-features - #- name: Test - #shell: haiku {0} - #run: | - #cargo test --all-targets --all-features - #- name: Doc - #shell: haiku {0} - #run: | - #cargo doc --no-deps --all-features - - #omnios: - #runs-on: ubuntu-latest - #name: OmniOS - #steps: - #- uses: actions/checkout@v6 - #- name: Start VM - #uses: vmactions/omnios-vm@v1 - #with: - #release: "r151056" - #usesh: true - #- name: Install dependencies - #shell: omnios {0} - #run: | - #pkg install developer/build-essential - #curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - #- name: Build - #shell: omnios {0} - #run: | - #. $HOME/.cargo/env - #cargo build --all-targets --all-features - #- name: Test - #shell: omnios {0} - #run: | - #. $HOME/.cargo/env - #cargo test --all-targets --all-features - #- name: Clippy - #shell: omnios {0} - #run: | - #. $HOME/.cargo/env - #cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - #- name: Doc - #shell: omnios {0} - #run: | - #. $HOME/.cargo/env - #cargo doc --no-deps --all-features - From 5d2e14be7df586565d7983cea767cf835a9fc1ca Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 16 Apr 2026 07:23:47 -0600 Subject: [PATCH 31/32] Renable NetBSD, OmniOS, etc. And reduce count of FreeBSD builds. --- .github/workflows/ci.yml | 44 ++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0d62b52c4..94c41fa4eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,7 @@ jobs: matrix: include: - os: freebsd - version: "14.3" - arch: x86_64 - - - os: freebsd - version: "15.0" + version: "14.4" arch: x86_64 # Disable FreeBSD/aarch64 because it's too slow @@ -29,33 +25,29 @@ jobs: #version: "15.0" #arch: aarch64 - # Disable Haiku because vmactions/haiku-vm doesn't yet support - # custom-shell-name. Also, Nix doesn't have a Haiku maintainer who - # can fix the tests for us. - #- os: haiku - #version: "r1beta5" - #arch: x86_64 + # Disable Haiku because Nix doesn't have a Haiku maintainer who can + # fix the tests for us. + - os: haiku + version: "r1beta5" + arch: x86_64 - # Disable NetBSD because vmactions/netbsd-vm doesn't yet support - # custom-shell-name. Also, Nix doesn't have a NetBSD maintainer who + # Disable NetBSD because Nix doesn't have a NetBSD maintainer who # can fix the tests for us. - #- os: netbsd - #version: "10.1" - #arch: x86_64 + - os: netbsd + version: "10.1" + arch: x86_64 - # Disable OmniOS because vmactions/omnios-vm doesn't yet support - # custom-shell-name. Also, Nix doesn't have a OmniOS maintainer who + # Disable OmniOS because Nix doesn't have a OmniOS maintainer who # can fix the tests for us. - #- os: omnios - #version: "r151056" - #arch: x86_64 + - os: omnios + version: "r151056" + arch: x86_64 - # Disable OpenBSD because vmactions/openbsd-vm doesn't yet support - # custom-shell-name. Also, Nix doesn't have a OpenBSD maintainer who + # Disable OpenBSD because Nix doesn't have a OpenBSD maintainer who # can fix the tests for us. - #- os: openbsd - #version: "7.8" - #arch: x86_64 + - os: openbsd + version: "7.8" + arch: x86_64 steps: - uses: actions/checkout@v6 From 4beb1ab0ba66845fd451c3d90fa7a3b4f3ae0d13 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 16 Apr 2026 08:45:38 -0600 Subject: [PATCH 32/32] Attempt to add ~/.cargo/bin to the PATH --- .github/workflows/ci.yml | 47 +++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94c41fa4eb..61066c0c7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,27 +27,27 @@ jobs: # Disable Haiku because Nix doesn't have a Haiku maintainer who can # fix the tests for us. - - os: haiku - version: "r1beta5" - arch: x86_64 + #- os: haiku + #version: "r1beta5" + #arch: x86_64 # Disable NetBSD because Nix doesn't have a NetBSD maintainer who # can fix the tests for us. - - os: netbsd - version: "10.1" - arch: x86_64 + #- os: netbsd + #version: "10.1" + #arch: x86_64 # Disable OmniOS because Nix doesn't have a OmniOS maintainer who # can fix the tests for us. - - os: omnios - version: "r151056" - arch: x86_64 + #- os: omnios + #version: "r151056" + #arch: x86_64 # Disable OpenBSD because Nix doesn't have a OpenBSD maintainer who # can fix the tests for us. - - os: openbsd - version: "7.8" - arch: x86_64 + #- os: openbsd + #version: "7.8" + #arch: x86_64 steps: - uses: actions/checkout@v6 @@ -98,8 +98,12 @@ jobs: run: | pkg install -y curl kldload mqueuefs + echo "PermitUserEnvironment yes" >> /etc/ssh/sshd_config + service sshd reload fetch https://sh.rustup.rs -o rustup.sh sh rustup.sh -y --profile=minimal --default-toolchain stable + mkdir -p $HOME/.ssh + echo "PATH=$HOME/.cargo/bin:$PATH" > $HOME/.ssh/environment . $HOME/.cargo/env rustc -vV rustup component add clippy @@ -138,29 +142,32 @@ jobs: - name: Build shell: vmsh {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + cat $HOME/.ssh/environment + echo PATH is $PATH + rustc -vV + #if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo build --all-targets --all-features - name: Test shell: vmsh {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + #if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo test --all-targets --all-features - name: Clippy shell: vmsh {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + #if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints - name: Doc shell: vmsh {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + #if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo doc --no-deps --all-features - name: Hack if: matrix.arch == 'x86_64' && matrix.os == 'freebsd' shell: vmsh {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + #if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi 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 @@ -169,18 +176,18 @@ jobs: if: matrix.arch == 'aarch64' && matrix.os == 'freebsd' shell: vmsh {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + #if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi rustup target add i686-unknown-freebsd cargo build --target i686-unknown-freebsd --all-features --all-targets - name: i686 Test if: matrix.arch == 'aarch64' && matrix.os == 'freebsd' shell: vmsh {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + #if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo test --all-targets --all-features --target i686-unknown-freebsd - name: i686 Doc if: matrix.arch == 'aarch64' && matrix.os == 'freebsd' shell: vmsh {0} run: | - if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi + #if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi cargo doc --no-deps --all-features --target i686-unknown-freebsd