-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from jacobwilliams/develop
adding CI
- Loading branch information
Showing
8 changed files
with
145 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: CI | ||
on: [push] | ||
jobs: | ||
|
||
Build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
gcc_v: [10] # Version of GFortran we want to use. | ||
python-version: [3.9] | ||
env: | ||
FC: gfortran-${{ matrix.gcc_v }} | ||
GCC_V: ${{ matrix.gcc_v }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc. | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup Graphviz | ||
uses: ts-graphviz/setup-graphviz@v1 | ||
|
||
- name: Setup Fortran Package Manager | ||
uses: fortran-lang/setup-fpm@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install Python dependencies | ||
if: contains( matrix.os, 'ubuntu') | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install matplotlib ford | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Install GFortran Linux | ||
if: contains( matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt-get install lcov | ||
sudo update-alternatives \ | ||
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \ | ||
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \ | ||
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc_v }} | ||
# - name: Compile | ||
# run: fpm build --profile release --flag -fopenmp | ||
|
||
- name: Run tests | ||
run: fpm test --profile debug --flag -coverage --flag -fopenmp | ||
|
||
- name: Create coverage report | ||
run: | | ||
mkdir -p ${{ env.COV_DIR }} | ||
lcov --capture --initial --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.base | ||
lcov --capture --base-directory . --directory build/gfortran_*/ --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: build/coverage | ||
|
||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: build/coverage/coverage.info | ||
|
||
- name: Build documentation | ||
run: ford ./fgif.md | ||
|
||
- name: Deploy Documentation | ||
if: github.ref == 'refs/heads/master' | ||
uses: JamesIves/github-pages-deploy-action@4.1.0 | ||
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: doc # The folder the action should deploy. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
|
||
.DS_Store | ||
|
||
/*.gif |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
comment: | ||
layout: header, changes, diff, sunburst | ||
coverage: | ||
ignore: | ||
- test | ||
- doc | ||
status: | ||
patch: | ||
default: | ||
target: 70% | ||
project: | ||
default: | ||
target: 60% |
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
File renamed without changes.
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