Skip to content

fix(zb_io, zb_core): link formulas on linux if homebrew marks it keg-only #328

fix(zb_io, zb_core): link formulas on linux if homebrew marks it keg-only

fix(zb_io, zb_core): link formulas on linux if homebrew marks it keg-only #328

Workflow file for this run

name: test
on:
push:
branches: [ main ]
paths:
- '**/*.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/test.yml'
pull_request:
paths:
- '**/*.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/test.yml'
jobs:
test:
name: ${{ matrix.name }} / rust ${{ matrix.rust }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
name: macos-arm64
rust: stable
- os: macos-latest
name: macos-arm64
rust: "1.90"
- os: ubuntu-latest
name: linux
rust: stable
steps:
- uses: actions/checkout@v4
- name: install rust ${{ matrix.rust }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: cache rust dependencies
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.os }}-${{ matrix.rust }}
- name: setup pkg-config path
run: |
if [ "$(uname)" = "Darwin" ] && [ -d "/opt/homebrew/lib/pkgconfig" ]; then
echo "PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig:${PKG_CONFIG_PATH:-}" >> $GITHUB_ENV
elif [ "$(uname)" = "Linux" ] && [ -d "/usr/lib/x86_64-linux-gnu/pkgconfig" ]; then
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH:-}" >> $GITHUB_ENV
fi
- name: build (debug)
run: cargo build --workspace --all-targets
- name: build (release)
run: cargo build --workspace --release
- name: run unit tests
run: cargo test --workspace
- name: run integration tests
run: cargo test --package zb_cli --test integration -- --ignored