name: build
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
merge_group:
env:
CARGO_TERM_COLOR: always
jobs:
lint:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.0
- uses: Swatinem/rust-cache@7e35be21c2b94d972b1143087fabc27d7dc881ef - uses: baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 with:
crate: typos-cli
locked: true
- uses: baptiste0928/cargo-install@f204293d9709061b7bc1756fec3ec4e2cd57dec0 with:
crate: cargo-semver-checks
locked: true
- name: lint
run: eng/lint.sh
test:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.0
- uses: Swatinem/rust-cache@7e35be21c2b94d972b1143087fabc27d7dc881ef - name: test
run: cargo test --all-features --locked
x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.0
- uses: Swatinem/rust-cache@7e35be21c2b94d972b1143087fabc27d7dc881ef - name: build
run: eng/ci.sh
- name: Run tests
run: sudo target/x86_64-unknown-linux-musl/release/avml acquire --compress output.lime
- name: upload artifacts
uses: actions/upload-artifact@v7.0.1
with:
name: linux-x86-64-artifacts
path: |
target/*/release/avml
target/*/release/avml-minimal
arm64:
permissions:
contents: read
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/checkout@v7.0.0
- uses: Swatinem/rust-cache@7e35be21c2b94d972b1143087fabc27d7dc881ef - name: build
run: eng/ci.sh
- name: Run tests
run: sudo target/aarch64-unknown-linux-musl/release/avml acquire --compress output.lime
- name: upload artifacts
uses: actions/upload-artifact@v7.0.1
with:
name: linux-aarch64-artifacts
path: |
target/*/release/avml
target/*/release/avml-minimal
armv6b:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.0
- uses: Swatinem/rust-cache@baf1a810e98b6a3001d0d7234864ed75a17c42fb - name: Cache armv6b build chain
uses: actions/cache@v4
with:
path: |
~/.cache/avml/armeb-linux-musleabi-cross
~/.cache/avml/musl-cross-make-227df8b99103f9c59f6570babf892978e293082f
key: armv6b-build-chain-${{ runner.os }}-${{ hashFiles('eng/build-armv6b.sh') }}
- name: build
run: |
eng/build-armv6b.sh
- name: upload artifacts
uses: actions/upload-artifact@v7.0.1
with:
name: linux-armv6b-artifacts
path: |
target/armeb-unknown-linux-musleabi/release/avml
target/armeb-unknown-linux-musleabi/release/avml-minimal
windows:
permissions:
contents: read
runs-on: windows-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v7.0.0
- uses: Swatinem/rust-cache@7e35be21c2b94d972b1143087fabc27d7dc881ef - name: build avml
run: cargo build --release --bin avml --locked
- name: Run tests
run: cargo test
- name: upload artifacts
uses: actions/upload-artifact@v7.0.1
with:
name: windows-artifacts
path: |
target/release/avml.exe
target/release/avml.pdb