Skip to content

VM Tests

VM Tests #5363

Workflow file for this run

name: VM Tests
on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- "lib/**"
- "pna/**"
- "cli/**"
- "Cargo.toml"
- "Cargo.lock"
- "resources/test/**"
- ".cargo/config.toml"
- "rust-toolchain.toml"
- ".github/workflows/vm.yml"
pull_request:
branches: ["*"]
paths:
- "lib/**"
- "pna/**"
- "cli/**"
- "Cargo.toml"
- "Cargo.lock"
- "resources/test/**"
- ".cargo/config.toml"
- "rust-toolchain.toml"
- ".github/workflows/vm.yml"
permissions:
contents: read # checkout
env:
RUST_BACKTRACE: 1
jobs:
solaris-test:
runs-on: ubuntu-latest
timeout-minutes: 70
name: Test on Solaris
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Test in Solaris
id: test
uses: vmactions/solaris-vm@d30dd6c228c8661ade859e36ead7660b9a62efcc # v1.3.7
with:
envs: "RUST_BACKTRACE"
copyback: false
disable-cache: true
usesh: true
prepare: |
pkg install bash libtool gnu-m4 tree wget gcc autoconf //solaris/text/gawk pkg://solaris/text/gnu-diffutils pkg://solaris/text/gnu-grep pkg://solaris/text/gnu-sed cmake
source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
# mv /root/.rust_solaris/rustc-*/ /root/.rust_solaris/rustc/
run: |
set -e
export LC_ALL=C LANG=C
# export PATH=/root/.rust_solaris/rustc/bin:$PATH
uname -a
chown -R $(whoami):$(id -gn) ./
chmod -R a+rw ./
cargo install -f cargo-hack@0.6.33 --locked
cargo hack test --locked --release --feature-powerset --exclude-features wasm
NetBSD-test:
runs-on: ubuntu-latest
timeout-minutes: 60
name: Test on NetBSD
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Test in NetBSD
id: test
uses: vmactions/NetBSD-vm@99816dccf75edf233ed6cd00a159e3a5b85ea373 # v1.4.0
with:
envs: "RUST_BACKTRACE"
copyback: false
disable-cache: true
usesh: true
prepare: |
/usr/sbin/pkg_add -v curl cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
run: |
set -e
. "$HOME/.cargo/env"
export LC_ALL=C LANG=C
uname -a
export PATH=$PATH:/usr/sbin
chown -R $(whoami):$(id -gn) ./
chmod -R a+rw ./
cargo install -f cargo-hack --locked
cargo hack test --locked --release --feature-powerset --exclude-features wasm
FreeBSD-test:
runs-on: ubuntu-latest
timeout-minutes: 50
name: Test on FreeBSD
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Test in FreeBSD
id: test
uses: vmactions/freebsd-vm@b84ab5559b5a1bb4b8ee2737d2506a16e1737636 # v1.4.8
with:
envs: "RUST_BACKTRACE"
copyback: false
disable-cache: true
usesh: true
prepare: |
# vmactions/freebsd-vm 15.0 images enable FreeBSD-ports repos.
# Keep package resolution on the base FreeBSD repo; otherwise
# pkg can mix pkg-devel from ports with pkg from FreeBSD and fail.
mkdir -p /usr/local/etc/pkg/repos
cat > /usr/local/etc/pkg/repos/FreeBSD.conf <<'EOF'
FreeBSD: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "none",
enabled: yes
}
EOF
cat > /usr/local/etc/pkg/repos/FreeBSD-ports.conf <<'EOF'
FreeBSD-ports: {
enabled: no
}
EOF
cat > /usr/local/etc/pkg/repos/FreeBSD-ports-kmods.conf <<'EOF'
FreeBSD-ports-kmods: {
enabled: no
}
EOF
pkg install -y curl cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
run: |
set -e
. "$HOME/.cargo/env"
export LC_ALL=C LANG=C
uname -a
# vmactions/freebsd-vm root is ZFS+nfsv4acls; POSIX.1e ACL tests
# need a UFS+acls filesystem. Create a vnode-backed UFS image and
# point CARGO_TARGET_DIR there so integration test cwd
# (CARGO_TARGET_TMPDIR = $CARGO_TARGET_DIR/tmp) lives on UFS.
truncate -s 4g /tmp/ufs.img
mdconfig -a -t vnode -f /tmp/ufs.img -u 9
newfs /dev/md9
mkdir -p /mnt/ufs
mount -o acls /dev/md9 /mnt/ufs
export CARGO_TARGET_DIR=/mnt/ufs/target
mkdir -p "$CARGO_TARGET_DIR"
chown -R $(whoami):$(id -gn) ./
chmod -R a+rw ./
cargo install -f cargo-hack --locked
cargo hack test --locked --release --feature-powerset --exclude-features wasm
OpenBSD-test:
runs-on: ubuntu-latest
timeout-minutes: 80
name: Test on OpenBSD
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Test in OpenBSD
id: test
uses: vmactions/OpenBSD-vm@18edb32f4e48dae5865d7b8b3a9587bc01218a20 # v1.4.4
with:
envs: "RUST_BACKTRACE"
copyback: false
disable-cache: true
usesh: true
prepare: |
/usr/sbin/pkg_add -I -v gmake gettext-tools gtar libtool m4 cmake
/usr/sbin/pkg_add -I -v rust
run: |
set -e
export LC_ALL=C LANG=C
uname -a
chown -R $(whoami):$(id -gn) ./
chmod -R a+rw ./
cargo install -f cargo-hack --locked
ulimit -n 2048
cargo hack test --locked --release --feature-powerset --exclude-features wasm
# DragonflyBSD-test:
# runs-on: ubuntu-latest
# timeout-minutes: 60
# name: Test on DragonflyBSD
# steps:
# - uses: actions/checkout@v4
# - name: Test in DragonflyBSD
# id: test
# uses: vmactions/dragonflybsd-vm@v1.0.9
# with:
# envs: "RUST_BACKTRACE"
# copyback: false
# usesh: true
# prepare: |
# pkg install -y curl cmake libnghttp2
# pkg install -y rust
# run: |
# set -e
# export LC_ALL=C LANG=C
# uname -a
# chown -R $(whoami):$(id -gn) ./
# chmod -R a+rw ./
# cargo install -f cargo-hack --locked
# cargo hack test --locked --release --feature-powerset --exclude-features wasm
OmniOS-test:
runs-on: ubuntu-latest
timeout-minutes: 60
name: Test on OmniOS
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Test in OmniOS
id: test
uses: vmactions/omnios-vm@7f2be0b927aad1a78498c8aeeac4c4ce1fabd322 # v1.3.3
with:
envs: "RUST_BACKTRACE"
copyback: false
disable-cache: true
usesh: true
prepare: |
pkg install curl pkg:/developer/gcc13 cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
run: |
set -e
. "$HOME/.cargo/env"
export LC_ALL=C LANG=C
uname -a
chown -R $(whoami):$(id -gn) ./
chmod -R a+rw ./
cargo install -f cargo-hack --locked
cargo hack test --locked --release --feature-powerset --exclude-features wasm,zlib-ng