-
Notifications
You must be signed in to change notification settings - Fork 2
90 lines (70 loc) · 2.59 KB
/
PushWorkflow.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI EDIpack2 test workflow
on: push
defaults:
run:
shell: bash -l {0}
jobs:
test-EDIpack2:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12]
steps:
#********* SETUP PART **********
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@main
# QcmPlab setup
- uses: QcmPlab/TestSetup@master
with:
pack-type: open
#********* BUILD PART **********
# Build SciFortran
- name: Cloning SciFortran
run: git clone https://github.com/aamaricci/SciFortran.git scifor
- name: Install SciFortran
run: scifor/bin/ci_setup_scifor.sh
# Build EDIpack2
- name: Cloning EDIpack2
run: git clone https://github.com/aamaricci/EDIpack2.0.git EDIpack2
- name: Install EDIpack2
run: |
source ~/.scifor_config_user
export PKG_CONFIG_PATH=~/.pkgconfig.d
export GLOB_INC=$( pkg-config --cflags scifor )
export GLOB_LIB=$( pkg-config --libs scifor | sed "s/;/ /g" | sed 's/\\/ /g' )
EDIpack2/bin/ci_setup_edipack2.sh
#******** TESTING PART ********
# Testing
- name: Building tests
run: |
source ~/.scifor_config_user
source ~/.edipack2_config_user
export PKG_CONFIG_PATH=~/.pkgconfig.d
export GLOB_INC=$( pkg-config --cflags scifor edipack2)
export GLOB_LIB=$( pkg-config --libs scifor edipack2 | sed "s/;/ /g" | sed 's/\\/ /g' )
cd EDIpack2/test
export TERM=xterm
make all
- name: Testing...
run: |
cd EDIpack2/test
make test
# - name: Install LCOV
# if: contains( matrix.os, 'ubuntu')
# run: |
# sudo apt-get install lcov
# - name: Create coverage report
# if: contains( matrix.os, 'ubuntu')
# run: |
# mkdir -p ${{ env.COV_DIR }}
# lcov --capture --initial --base-directory . --directory test/ --output-file ${{ env.COV_DIR }}/coverage.base
# lcov --capture --base-directory . --directory test/ --output-file ${{ env.COV_DIR }}/coverage.capture
# lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info
# env:
# COV_DIR: test/coverage
# - name: Upload coverage report to CODECOV
# if: contains( matrix.os, 'ubuntu')
# uses: codecov/codecov-action@v3
# with:
# files: test/coverage/coverage.info