Update: #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |