-
Notifications
You must be signed in to change notification settings - Fork 22
54 lines (49 loc) · 1.34 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Matrix Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: 0 9 * * *
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-latest, windows-latest]
include:
- os: windows-latest
crlf: fix
- os: ubuntu-22.04
coverage: -Dtest-coverage=true
runs-on: ${{matrix.os}}
steps:
- name: Force Line Endings for Windows
if: ${{ matrix.crlf }}
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v3
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: master
- name: Download kcov
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo apt-get install -y kcov
# No comptime tests for now.
- name: Run Tests
run: |
zig version
zig build test -Dcomptime-tests=false ${{ matrix.coverage }}
- name: Upload Codecov
if: ${{ matrix.os == 'ubuntu-22.04' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}