chore: update readme and run ci on windows and macos #30
Workflow file for this run
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 and test | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- .editorconfig | |
- .gitattributes | |
- .gitignore | |
- LICENSE | |
- README.md | |
- .github/** | |
- '!.github/workflows/build-and-test.yml' | |
- .vscode/** | |
- images/** | |
pull_request: | |
paths-ignore: | |
- .editorconfig | |
- .gitattributes | |
- .gitignore | |
- LICENSE | |
- README.md | |
- .github/** | |
- '!.github/workflows/build-and-test.yml' | |
- .vscode/** | |
- images/** | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
name: Build & test w/zig | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
version: ['master'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: ${{ matrix.version }} | |
- name: Lint | |
run: zig fmt --check . | |
- name: Build and test | |
run: zig build test | |
- name: Install kcov | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y kcov | |
- name: Generate coverage reports | |
if: matrix.os == 'ubuntu-latest' | |
run: kcov $PWD/coverage ./zig-cache/o/*/test | |
- name: Upload coverage reports to Codecov | |
if: matrix.os == 'ubuntu-latest' | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: ./coverage/ | |
verbose: true |