-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9f1e1b
commit c2efcc3
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Nexlog CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
zig-version: ['0.13.0', 'master'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Zig | ||
uses: goto-bus-stop/setup-zig@v2 | ||
with: | ||
version: ${{ matrix.zig-version }} | ||
|
||
- name: Zig version | ||
run: zig version | ||
|
||
- name: Build | ||
run: zig build | ||
|
||
- name: Run tests | ||
run: zig build test | ||
|
||
- name: Run examples | ||
if: success() | ||
run: zig build examples | ||
|
||
- name: Cache zig dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/zig | ||
zig-cache | ||
key: ${{ runner.os }}-zig-${{ matrix.zig-version }}-${{ hashFiles('**/build.zig.zon') }} | ||
restore-keys: | | ||
${{ runner.os }}-zig-${{ matrix.zig-version }}- | ||
coverage: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Zig | ||
uses: goto-bus-stop/setup-zig@v2 | ||
with: | ||
version: '0.11.0' | ||
|
||
- name: Generate coverage | ||
run: | | ||
zig build test -Dcover | ||
# Add your actual coverage tool here | ||
echo "Coverage generation placeholder" | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
file: ./coverage.lcov | ||
fail_ci_if_error: true |