Skip to content

Commit f589896

Browse files
committed
Add CI
1 parent 4913804 commit f589896

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- os: ubuntu-latest
16+
- os: macos-latest
17+
- os: windows-latest
18+
compiler: clang
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Setup Clang (Windows)
23+
if: matrix.os == 'windows-latest'
24+
run: |
25+
choco install llvm -y
26+
echo "CC=clang" >> $env:GITHUB_ENV
27+
- name: Test (Unix)
28+
if: matrix.os != 'windows-latest'
29+
run: make test
30+
- name: Test (Windows)
31+
if: matrix.os == 'windows-latest'
32+
run: |
33+
clang -Wall -Wextra -Wno-override-init -std=c99 -ggdb -Wno-attributes -Wno-pragmas -I./test/ -D_CRT_SECURE_NO_WARNINGS ./test/test.c -o test/test.exe
34+
./test/test.exe

0 commit comments

Comments
 (0)