Skip to content

Commit ca3125d

Browse files
Setup CI (#12)
1 parent e1b9b1a commit ca3125d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
example:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- run: |
11+
sudo apt-get update
12+
sudo apt-get install -y build-essential
13+
- run: make example
14+
- run: ./example --requests 123 --concurrency 456 --url http://google.biz
15+
- run: ./example --version
16+
- run: ./example --help
17+
18+
test:
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
matrix:
22+
os: [ubuntu-latest, macos-latest]
23+
cc: [gcc, clang]
24+
exclude:
25+
# macOS doesn't have gcc by default, it's aliased to clang
26+
- os: macos-latest
27+
cc: gcc
28+
steps:
29+
- uses: actions/checkout@v4
30+
- if: matrix.os == 'ubuntu-latest'
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y build-essential
34+
- if: matrix.os == 'macos-latest'
35+
# Xcode command line tools should already be available
36+
run: |
37+
xcode-select --install 2>/dev/null || true
38+
- env:
39+
CC: ${{ matrix.cc }}
40+
run: make check

0 commit comments

Comments
 (0)