-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (69 loc) · 2.22 KB
/
build.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
name: CI
on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
env:
BUILD_DIR: _build
PIP_PACKAGES: >-
gcovr
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
toolchain: [{compiler: gcc, version: 11}]
include:
- os: ubuntu-latest
toolchain: {compiler: intel, version: '2023.1'}
- os: ubuntu-latest
toolchain: {compiler: intel-classic, version: '2021.9'}
# - os: macos-latest
# toolchain: {compiler: intel-classic, version: '2021.9'}
defaults:
run:
shell: ${{ matrix.shell || 'bash' }}
env:
FC: gfortran
PYTHON_V: 3.8
steps:
- uses: fortran-lang/setup-fortran@v1
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}
- run: ${{ env.FC }} --version
- name: Checkout code
uses: actions/checkout@v3
- uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and compile (GNU)
run: fpm build
- name: Test and compile (GNU)
run: fpm @test
- name: Run CodeCov
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.toolchain.compiler, 'gcc') }}
run: |
gcov ./build/gfortran_*/sMCRT/src*.gcda -r ./src/ -b
- name: Codecov
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.toolchain.compiler, 'gcc') }}
uses: codecov/codecov-action@v3.1.1
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: build docs
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.toolchain.compiler, 'gcc') }}
run: |
pip install ford
pip install markdown-checklist
ford docs.md
- uses: JamesIves/github-pages-deploy-action@3.7.1
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.toolchain.compiler, 'gcc') }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs
CLEAN: true
CLEAN_EXCLUDE: |
CNAME