Skip to content

build(deps): bump actions/upload-pages-artifact from 4.0.0 to 5.0.0 (… #429

build(deps): bump actions/upload-pages-artifact from 4.0.0 to 5.0.0 (…

build(deps): bump actions/upload-pages-artifact from 4.0.0 to 5.0.0 (… #429

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: linux-x86_64
os: ubuntu-latest
- name: linux-x86_64-v3
os: ubuntu-latest
target_cpu: x86-64-v3
- name: macos-aarch64
os: macos-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # ratchet:dtolnay/rust-toolchain@stable
- name: Install Linux build deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake zlib1g-dev libbz2-dev liblzma-dev \
libcurl4-openssl-dev libssl-dev libfontconfig1-dev pkg-config clang
- name: Install macOS build deps
if: runner.os == 'macOS'
run: brew install bzip2 xz
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # ratchet:Swatinem/rust-cache@v2.9.1
- name: Detect host triple
if: matrix.target_cpu
run: echo "HOST_TRIPLE=$(rustc -vV | awk '/^host:/ {print $2}')" >> "$GITHUB_ENV"
- name: Build
run: >
cargo build --release
${TARGET_CPU:+--target "$HOST_TRIPLE" --config "target.'$HOST_TRIPLE'.rustflags=['-C', 'target-cpu=$TARGET_CPU']"}
env:
TARGET_CPU: ${{ matrix.target_cpu || '' }}
- name: Test
run: >
cargo test --release
${TARGET_CPU:+--target "$HOST_TRIPLE" --config "target.'$HOST_TRIPLE'.rustflags=['-C', 'target-cpu=$TARGET_CPU']"}
env:
TARGET_CPU: ${{ matrix.target_cpu || '' }}
fmt:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # ratchet:dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # ratchet:dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install Linux build deps
run: |
sudo apt-get update
sudo apt-get install -y cmake zlib1g-dev libbz2-dev liblzma-dev \
libcurl4-openssl-dev libssl-dev libfontconfig1-dev pkg-config clang
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # ratchet:Swatinem/rust-cache@v2.9.1
- run: cargo clippy -- -D warnings
msrv:
name: MSRV check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
- name: Install Rust MSRV toolchain
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # ratchet:dtolnay/rust-toolchain@master
with:
toolchain: "1.87"
- name: Install Linux build deps
run: |
sudo apt-get update
sudo apt-get install -y cmake zlib1g-dev libbz2-dev liblzma-dev \
libcurl4-openssl-dev libssl-dev libfontconfig1-dev pkg-config clang
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # ratchet:Swatinem/rust-cache@v2.9.1
- name: Check MSRV compiles
run: cargo check
audit:
name: Security audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6.0.2
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Run cargo audit
run: cargo audit