Skip to content

♻️ Expand test for list subcommand #12890

♻️ Expand test for list subcommand

♻️ Expand test for list subcommand #12890

Workflow file for this run

name: test
permissions:
contents: read
on:
workflow_dispatch:
pull_request:
push:
jobs:
tier1:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm # TODO: use ubuntu-24.04-arm if https://github.com/rust-lang/rust/issues/135867 resolved
- windows-latest
- windows-11-arm
- macos-latest
# - freebsd-latest # self-hosted
rust:
- stable
- beta
- nightly
timeout-minutes: 60
runs-on: ${{ matrix.os }}
steps:
- name: git autocrlf false
if: startsWith(matrix.os, 'windows')
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: install dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y libacl1-dev
- name: Install Rustup
if: ${{ matrix.os == 'windows-11-arm' }}
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://win.rustup.rs/aarch64" -OutFile "$env:TEMP\rustup-init.exe"
& "$env:TEMP\rustup-init.exe" --default-toolchain none --profile=minimal -y
"$env:USERPROFILE\.cargo\bin" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
"CARGO_HOME=$env:USERPROFILE\.cargo" | Out-File -Append -Encoding ascii $env:GITHUB_ENV
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- id: install_rust
uses: ./.github/actions/setup-rust
with:
channel: ${{ matrix.rust }}
- name: Install cargo-hack from crates.io
uses: baptiste0928/cargo-install@b687c656bda5733207e629b50a22bf68974a0305 # v3.3.2
with:
crate: cargo-hack
cache-key: ${{ matrix.os }}
- name: Restore rust build cache
id: restore-rust-build-cache
uses: ChanTsune/cache@local-fs-backend
with:
path: |
target/*
!target/tmp
key: "${{ matrix.os }}-${{ steps.install_rust.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}"
restore-keys: "${{ matrix.os }}-${{ steps.install_rust.outputs.version }}"
- name: run test
run: |
cargo hack test --locked --release --feature-powerset --exclude-features wasm
env:
RUST_BACKTRACE: 1
tier3_cross:
strategy:
fail-fast: false
matrix:
include:
- container: redoxos/redoxer
target: x86_64-unknown-redox
runs-on: ubuntu-latest
timeout-minutes: 60
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: run test
if: startsWith(matrix.target, 'x86_64-unknown-redox')
run: |
export PATH=$PATH:/root/.redoxer/${{ matrix.target }}/toolchain/bin
rustup default nightly
rustup target add ${{ matrix.target }}
cargo build -p portable-network-archive --locked --target ${{ matrix.target }}
env:
RUST_BACKTRACE: 1
AR_x86_64_unknown_redox: "x86_64-unknown-redox-ar"
CC_x86_64_unknown_redox: "x86_64-unknown-redox-gcc"
CARGO_TARGET_X86_64_UNKNOWN_REDOX_LINKER: "x86_64-unknown-redox-gcc"
CARGO_TARGET_X86_64_UNKNOWN_REDOX_RUNNER: "redoxer exec --folder ."
tier3:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
rust:
- stable
target:
- x86_64-pc-solaris
- x86_64-unknown-fuchsia
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- id: install_rust
uses: ./.github/actions/setup-rust
with:
channel: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: run test
run: |
cargo check --locked --target ${{ matrix.target }}
env:
RUST_BACKTRACE: 1
msrv:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
crate:
- libpna
- pna
- portable-network-archive
include:
- crate: libpna
rust: '1.85'
- crate: pna
rust: '1.85'
- crate: portable-network-archive
rust: '1.85'
runs-on: ${{ matrix.os }}
steps:
- name: git autocrlf false
if: startsWith(matrix.os, 'windows')
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: install dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y libacl1-dev
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- id: install_rust
uses: ./.github/actions/setup-rust
with:
channel: ${{ matrix.rust }}
- name: Install cargo-hack from crates.io
uses: baptiste0928/cargo-install@b687c656bda5733207e629b50a22bf68974a0305 # v3.3.2
with:
crate: cargo-hack
cache-key: ${{ matrix.os }}
- name: Restore rust build cache
id: restore-rust-build-cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
with:
path: |
target/*
!target/tmp
key: "${{ matrix.os }}-${{ steps.install_rust.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}"
restore-keys: "${{ matrix.os }}-${{ steps.install_rust.outputs.version }}"
- name: run test
run: |
cargo hack test --locked --release --feature-powerset --exclude-features wasm -p ${{ matrix.crate }}
env:
RUST_BACKTRACE: 1