Skip to content

Commit db7805c

Browse files
committed
ci: add workflow for GitHub Actions
1 parent 0a50e54 commit db7805c

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: GitHub CI
2+
3+
on: push
4+
5+
jobs:
6+
build_gcc10:
7+
runs-on: ubuntu-20.04
8+
steps:
9+
# Checks-out the repository under $GITHUB_WORKSPACE.
10+
- uses: actions/checkout@v2
11+
with:
12+
submodules: 'recursive'
13+
- name: Install Debian packages
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install -y cmake g++-10 pkg-config
17+
- name: Build with GNU GCC 10
18+
run: |
19+
export CXX=g++-10
20+
export CC=gcc-10
21+
cd $GITHUB_WORKSPACE
22+
mkdir build
23+
cd build
24+
cmake ../
25+
make -j4
26+
- name: Run tests
27+
run: |
28+
cd "$GITHUB_WORKSPACE/build"
29+
ctest -V
30+
31+
build_clang10:
32+
runs-on: ubuntu-20.04
33+
steps:
34+
# Checks-out the repository under $GITHUB_WORKSPACE.
35+
- uses: actions/checkout@v2
36+
with:
37+
submodules: 'recursive'
38+
- name: Install Debian packages
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y cmake clang-10 pkg-config
42+
- name: Build with Clang 10
43+
run: |
44+
export CXX=clang++-10
45+
export CC=clang-10
46+
cd $GITHUB_WORKSPACE
47+
mkdir build
48+
cd build
49+
cmake ../
50+
make -j4
51+
- name: Run tests
52+
run: |
53+
cd "$GITHUB_WORKSPACE/build"
54+
ctest -V

0 commit comments

Comments
 (0)