ci: set up github workflow for multi-OS Rust builds and releases #22
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] | |
paths: | |
- "src" | |
- ".github/workflows" | |
- "Makefile" | |
- "Cargo.toml" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: make build | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/registry | |
./target | |
key: test-cargo-registry | |
- name: Run tests | |
run: make test | |
coverage: | |
runs-on: ubuntu-latest | |
container: | |
image: xd009642/tarpaulin:develop-nightly | |
options: --security-opt seccomp=unconfined | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate code coverage | |
run: make coverage-lcov | |
- name: Upload to coveralls.io | |
uses: coverallsapp/github-action@v2 |