-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (38 loc) · 1.44 KB
/
compilation_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: compilation-test
on:
push
jobs:
test-format:
runs-on: ubuntu-latest
env:
MPI_CORRECTNESS_BM_DIR: ${{ github.workspace }}
steps:
- uses: actions/checkout@v2
# prerequisites
- run : sudo apt-get update && sudo apt-get install -y openmpi-bin libopenmpi-dev clang-format
- name: Check code formatting
run: |
cd $MPI_CORRECTNESS_BM_DIR/micro-benches && \
export CPATH=$CPATH:./0-level/correct/include:./0-level/openmp && \
for i in $(find . -type f -name "*.c"); \
do echo Check code Format for $i ; \
clang-format -style=file --dry-run --Werror $i;\
if [[ $? -ne 0 ]]; then exit -1; fi;\
done
test-compilation:
runs-on: ubuntu-latest
env:
MPI_CORRECTNESS_BM_DIR: ${{ github.workspace }}
steps:
- uses: actions/checkout@v2
# prerequisites
- run : sudo apt-get update && sudo apt-get install -y openmpi-bin libopenmpi-dev
- name: Check compilation
run: |
cd $MPI_CORRECTNESS_BM_DIR/micro-benches && \
export CPATH=$CPATH:./0-level/correct/include:./0-level/openmp && \
for i in $(find . -type f -name "*.c"); \
do echo Compiling $i ; \
mpicc $i -Wall -pedantic -Wno-unused-variable -Wno-unused-but-set-variable -fopenmp -lm;\
if [[ $? -ne 0 ]]; then exit -1; fi;\
done