Minor tweaks #378
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push] | |
jobs: | |
ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: CI runtime info | |
run: uname -a && cat /etc/os-release | |
- name: Add necessary packages | |
run: sudo apt-get update && sudo apt-get install -y libacl1-dev | |
- name: Update Rust to latest | |
run: ~/.cargo/bin/rustup update | |
- name: Create filesystems | |
# f2fs and exfat modules are in linux-modules-extra-azure | |
# and cannot be installed reliably: | |
# https://github.com/actions/runner-images/issues/7587 | |
run: tests/scripts/make-filesystems.sh ext2 ext4 xfs btrfs ntfs fat zfs | |
- name: Run tests on ext2 | |
run: /fs/ext2/src/tests/scripts/test-linux.sh | |
if: always() | |
- name: Run tests on ext4 | |
run: /fs/ext4/src/tests/scripts/test-linux.sh | |
if: always() | |
- name: Run tests on XFS | |
run: /fs/xfs/src/tests/scripts/test-linux.sh | |
if: always() | |
- name: Run tests on btrfs | |
run: /fs/btrfs/src/tests/scripts/test-linux.sh | |
if: always() | |
- name: Run tests on ntfs | |
run: /fs/ntfs/src/tests/scripts/test-linux.sh | |
if: always() | |
- name: Run tests on fat | |
run: /fs/fat/src/tests/scripts/test-linux.sh | |
if: always() | |
- name: Run tests on ZFS | |
run: /fs/zfs/src/tests/scripts/test-linux.sh | |
if: always() | |
expensive: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add necessary packages | |
run: sudo apt-get update && sudo apt-get install -y libacl1-dev | |
- name: Update Rust to latest | |
run: ~/.cargo/bin/rustup update | |
- name: Run expensive tests | |
run: ./tests/scripts/test-linux.sh test_run_expensive | |
macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash /dev/stdin -y | |
- name: Update Rust (installer may lag behind) | |
run: ~/.cargo/bin/rustup update | |
- name: Run all tests | |
run: ~/.cargo/bin/cargo test --workspace --features=test_no_reflink,test_no_sockets,test_run_expensive | |
freebsd: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: vmactions/freebsd-vm@v1 | |
with: | |
usesh: true | |
prepare: | | |
pkg install -y curl | |
pw user add -n testing -m | |
run: | | |
su testing -c ' | |
curl -sSf https://sh.rustup.rs | sh /dev/stdin -y \ | |
&& ~/.cargo/bin/cargo test --workspace --features=test_no_reflink,test_no_sockets \ | |
&& ~/.cargo/bin/cargo clean | |
' | |
nightly: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add necessary packages | |
run: sudo apt-get update && sudo apt-get install -y libacl1-dev | |
- name: Install Rust nightly | |
run: ~/.cargo/bin/rustup toolchain install nightly | |
- name: Compile and test with nightly | |
run: ~/.cargo/bin/cargo +nightly test --workspace --features=test_no_reflink | |
msrv-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Rust to latest | |
run: ~/.cargo/bin/rustup update | |
- name: Install MSRV checker | |
run: ~/.cargo/bin/cargo install cargo-msrv | |
- name: Check MSRV | |
run: ~/.cargo/bin/cargo msrv verify |