Skip to content

Commit 74631f8

Browse files
committed
Copied over the actions CI workflows that @jgm added in commonmark/cmark.
1 parent 85d8952 commit 74631f8

File tree

2 files changed

+125
-0
lines changed

2 files changed

+125
-0
lines changed

.github/workflows/ci.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: CI tests
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
7+
linter:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
13+
- uses: actions/checkout@v1
14+
- name: Install clang-tidy
15+
run: |
16+
sudo apt-get install -y clang-tidy-9
17+
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-9 100
18+
- name: lint with clang-tidy
19+
run: |
20+
make lint
21+
env:
22+
CC: clang
23+
CXX: clang++
24+
25+
linux:
26+
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
cmake_opts:
32+
- '-DCMARK_SHARED=ON'
33+
- ''
34+
compiler:
35+
- c: 'clang'
36+
cpp: 'clang++'
37+
- c: 'gcc'
38+
cpp: 'g++'
39+
env:
40+
CMAKE_OPTIONS: ${{ matrix.cmake_opts }}
41+
CC: ${{ matrix.compiler.c }}
42+
CXX: ${{ matrix.compiler.cpp }}
43+
44+
steps:
45+
- uses: actions/checkout@v1
46+
- name: Install valgrind
47+
run: |
48+
sudo apt install -y valgrind
49+
- name: Build and test
50+
run: |
51+
make
52+
make test
53+
make leakcheck
54+
55+
macos:
56+
57+
runs-on: macOS-latest
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
cmake_opts:
62+
- '-DCMARK_SHARED=ON'
63+
- ''
64+
compiler:
65+
- c: 'clang'
66+
cpp: 'clang++'
67+
- c: 'gcc'
68+
cpp: 'g++'
69+
env:
70+
CMAKE_OPTIONS: ${{ matrix.cmake_opts }}
71+
CC: ${{ matrix.compiler.c }}
72+
CXX: ${{ matrix.compiler.cpp }}
73+
74+
steps:
75+
- uses: actions/checkout@v1
76+
- name: Build and test
77+
env:
78+
CMAKE_OPTIONS: -DCMARK_SHARED=OFF
79+
run: |
80+
make
81+
make test
82+
83+
windows:
84+
85+
runs-on: windows-latest
86+
strategy:
87+
fail-fast: false
88+
matrix:
89+
cmake_opts:
90+
- '-DCMARK_SHARED=ON'
91+
- ''
92+
env:
93+
CMAKE_OPTIONS: ${{ matrix.cmake_opts }}
94+
95+
steps:
96+
- uses: actions/checkout@v1
97+
- uses: ilammy/msvc-dev-cmd@v1
98+
- name: Build and test
99+
run: |
100+
chcp 65001
101+
nmake.exe /nologo /f Makefile.nmake test
102+
shell: cmd

.github/workflows/fuzz.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CIFuzz
2+
on: [pull_request, workflow_dispatch]
3+
jobs:
4+
Fuzzing:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Build Fuzzers
8+
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
9+
with:
10+
oss-fuzz-project-name: 'cmark'
11+
dry-run: false
12+
- name: Run Fuzzers
13+
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
14+
with:
15+
oss-fuzz-project-name: 'cmark'
16+
fuzz-seconds: 600
17+
dry-run: false
18+
- name: Upload Crash
19+
uses: actions/upload-artifact@v1
20+
if: failure()
21+
with:
22+
name: artifacts
23+
path: ./out/artifacts

0 commit comments

Comments
 (0)