Skip to content

Commit a29cf15

Browse files
committed
Add CI via Github actions
1 parent f9fbd7d commit a29cf15

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Static analysis
2+
on: [push, pull_request]
3+
4+
jobs:
5+
Cpp:
6+
runs-on: ubuntu-18.04
7+
steps:
8+
- uses: actions/checkout@v2
9+
- name: Formatting
10+
uses: Flamefire/clang-format-lint-action@master
11+
with:
12+
source: src
13+
clangFormatVersion: 9
14+
15+
Python:
16+
runs-on: ubuntu-18.04
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.8
22+
- name: Install Python packages
23+
run: |
24+
pip install --upgrade pip
25+
pip install --upgrade flake8
26+
- name: Run flake8
27+
run: flake8 benchmark scorep test

.github/workflows/unit_tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Unit tests
2+
on: [push, pull_request]
3+
4+
env:
5+
SCOREP_TIMER: clock_gettime # tsc causes warnings
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-18.04
10+
strategy:
11+
matrix:
12+
python: [2.7, 3.5, 3.6, 3.7, 3.8]
13+
fail-fast: false
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/cache@v1
18+
with:
19+
path: ~/.cache/pip
20+
key: ${{ runner.os }}-pip
21+
- id: cache
22+
uses: actions/cache@v1
23+
with:
24+
path: ~/scorep
25+
key: scorep
26+
27+
- name: Install system dependencies
28+
run: sudo apt install gcc-7-plugin-dev libopenmpi-dev openmpi-bin
29+
- name: Install dependencies
30+
if: steps.cache.outputs.cache-hit != 'true'
31+
run: |
32+
mkdir /tmp/buildScorep && cd /tmp/buildScorep
33+
wget https://www.vi-hps.org/cms/upload/packages/scorep/scorep-6.0.tar.gz
34+
tar xf scorep-6.0.tar.gz
35+
cd scorep-6.0
36+
mkdir build && cd build
37+
../configure --enable-shared --prefix=$HOME/scorep
38+
make -j3 && make install
39+
40+
- name: Setup environment
41+
run: echo "::add-path::$HOME/scorep/bin"
42+
- name: set up Python
43+
uses: actions/setup-python@v2
44+
with:
45+
python-version: ${{matrix.python}}
46+
architecture: x64
47+
- name: Install Python packages
48+
run: |
49+
pip install --upgrade pip
50+
pip install numpy mpi4py
51+
52+
- name: Build python bindings
53+
run: pip install .
54+
- name: Run tests
55+
working-directory: test
56+
run: ./test.py

0 commit comments

Comments
 (0)