Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

Update OmniOS workflows and Vagrantfile to replace library/lz4 with… #134

Update OmniOS workflows and Vagrantfile to replace library/lz4 with…

Update OmniOS workflows and Vagrantfile to replace library/lz4 with… #134

Workflow file for this run

name: Rust CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch: # Allow manual triggering
env:
CARGO_TERM_COLOR: always
# RUSTFLAGS: "-D warnings" # Treat warnings as errors
jobs:
# Check code formatting
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Check formatting
run: cargo run -p xtask -- fmt
# Run clippy for linting
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-clippy-
- name: Run clippy
run: cargo run -p xtask -- clippy
# Build the project
build:
name: Build (Linux)
needs: [format, clippy]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable]
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build
run: cargo run -p xtask -- build
- name: Build release
run: cargo run -p xtask -- build -r
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ips-binaries-${{ matrix.os }}
path: target/release/
retention-days: 1
# Build on Illumos (OmniOS)
build-illumos:
name: Build (Illumos)
needs: [format, clippy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build in OmniOS VM
uses: vmactions/omnios-vm@v1
with:
prepare: |
pkg set-publisher -g https://pkg.omnios.org/r151056/extra/ extra.omnios
pkg install -v ooce/developer/rust ooce/omnios-build-tools ooce/util/jq library/zlib compress/lz4
run: |
# Set environment variables for native libraries
export CFLAGS="-m64"
export LDFLAGS="-m64"
cargo run -p xtask -- build
cargo run -p xtask -- build -r
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ips-binaries-illumos
path: target/release/
retention-days: 1
# Run unit tests
test:
name: Test
needs: [build, build-illumos]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable]
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run tests
run: cargo run -p xtask -- test
# Run end-to-end tests
e2e-test:
name: End-to-End Tests
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build E2E test binaries
run: cargo run -p xtask -- build-e2e
- name: Run E2E tests
run: cargo run -p xtask -- run-e2e
# Build documentation
docs:
name: Documentation
needs: [test, e2e-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build documentation
run: cargo doc --no-deps
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: rust-docs
path: target/doc
retention-days: 7