Skip to content

ci: add cross compilation instructions #7

ci: add cross compilation instructions

ci: add cross compilation instructions #7

Workflow file for this run

name: CI
on:
push:
# Run on the main branch
branches:
- main
- release/*
# Also on PRs, just be careful not to publish anything
pull_request:
# Allow to be called from other workflows (like "release")
workflow_call:
# But don't trigger on tags, as they are covered by the "release.yaml" workflow
jobs:
fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7
- name: Check formatting
run: |
cargo fmt --check
test:
strategy:
matrix:
rust:
- "1.76" # MSRV
os:
- ubuntu-latest
include:
- os: ubuntu-latest
install: |
sudo apt install -y libssl-dev
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-check-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}
- name: Disable rustup auto update
run: |
rustup set auto-self-update disable
- name: Install Rust ${{ matrix.rust }}
run: |
rustup install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Install dependencies
run: ${{ matrix.install }}
- name: Check
run: cargo check --workspace ${{ matrix.args }}
- name: Test
run: cargo test --workspace ${{ matrix.args }} -- --nocapture