Merge pull request #61 from lambdalisue/dependabot/cargo/metrics-expo… #188
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
runner: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Update local toolchain | |
run: | | |
rustup update | |
- name: Toolchain info | |
run: | | |
rustc --version | |
cargo --version --verbose | |
- name: Test | |
run: | | |
cargo build --release --all-features | |
- name: Test (use-gauge-on-cpu-seconds-total) | |
run: | | |
cargo build --release --features use-gauge-on-cpu-seconds-total | |
build-dummy: | |
strategy: | |
matrix: | |
# Targets that this crate does NOT support | |
target: [x86_64-unknown-freebsd] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Update local toolchain | |
run: | | |
rustup update | |
rustup target add ${{ matrix.target }} | |
- name: Toolchain info | |
run: | | |
rustc --version | |
cargo --version --verbose | |
- name: Test | |
run: | | |
cargo build --release --features dummy --target ${{ matrix.target }} |