Add some features to reduce size (#16) #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
workflow_call: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
name: Build and test with features '${{ matrix.features }}' (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04 ] | |
features: [ "all", "" ] | |
env: | |
RUST_BACKTRACE: full | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: clippy | |
rustflags: "" | |
- name: Install protoc | |
uses: ./.github/actions/install-protoc | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Setup just | |
uses: extractions/setup-just@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests | |
run: just --set features "${{ matrix.features }}" verify | |
build-smoke-test: | |
name: Build only (${{ matrix.os }} / ${{ matrix.target }}) | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-22.04 ] | |
target: [ x86_64-unknown-linux-musl, wasm32-unknown-unknown ] | |
env: | |
RUST_BACKTRACE: full | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
target: ${{ matrix.target }} | |
rustflags: "" | |
- name: Install musl | |
if: ${{ endsWith( matrix.target, '-musl' ) }} | |
run: sudo apt install musl-tools | |
- name: Install protoc | |
uses: ./.github/actions/install-protoc | |
- name: Setup just | |
uses: extractions/setup-just@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests | |
run: just build --target ${{ matrix.target }} |