Skip to content

Merge pull request #127 from ryanfowler/dependabot/cargo/clap-4.4.13 #264

Merge pull request #127 from ryanfowler/dependabot/cargo/clap-4.4.13

Merge pull request #127 from ryanfowler/dependabot/cargo/clap-4.4.13 #264

Workflow file for this run

name: ci
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
env:
CROSS_VERSION: "0.2.5"
GO_VERSION: "1.21.4"
RUST_VERSION: "1.74.0"
jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Go format
run: gofmt -s -w . && git diff --exit-code
- name: Go tidy
run: go mod tidy && git diff --exit-code
- name: Go mod download
run: go mod download
- name: Go mod verify
run: go mod verify
- name: Go lint
uses: dominikh/staticcheck-action@v1.3.0
with:
version: "2023.1"
install-go: false
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- name: Rust cargo format
run: cargo fmt --all -- --check
- name: Rust cargo clippy
run: cargo clippy -- -D warnings
- name: Rust cargo test
run: cargo test
- name: Run metafmt
run: cargo run --locked -- --diff --hidden
build:
runs-on: ${{ matrix.os }}
env:
CARGO: cargo
strategy:
matrix:
build:
- freebsd-x86_64
- linux-arm64
- linux-x86_64
- macos-arm64
- macos-x86_64
include:
- build: freebsd-x86_64
os: ubuntu-22.04
target: x86_64-unknown-freebsd
- build: linux-arm64
os: ubuntu-22.04
target: aarch64-unknown-linux-gnu
- build: linux-x86_64
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- build: macos-arm64
os: macos-12
target: aarch64-apple-darwin
- build: macos-x86_64
os: macos-12
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v4
- name: Set up Go
if: ${{ matrix.os != 'ubuntu-22.04' }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
target: ${{ matrix.target }}
- name: Install cross
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
./ci/install-cross.sh
echo "CARGO=cross" >> $GITHUB_ENV
- name: Rust cargo build
run: ${{ env.CARGO }} build --locked --target ${{ matrix.target }}