Skip to content

Commit bbf5bc2

Browse files
ci: for tests and deploying documentation
1 parent 4895dc6 commit bbf5bc2

2 files changed

Lines changed: 79 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
name: CI
4+
5+
on: [push, pull_request]
6+
7+
8+
jobs:
9+
Build:
10+
runs-on: [ubuntu-latest]
11+
12+
env:
13+
FC: gfortran
14+
GCC_V: 11
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- uses: fortran-lang/setup-fpm@v3
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
- name: Install Dependencies Ubuntu
25+
if: contains(matrix.os, 'ubuntu')
26+
run: |
27+
sudo apt-get update
28+
sudo apt install -y gfortran-${GCC_V} build-essential
29+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \
30+
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \
31+
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V}
32+
33+
- name: Build and Test
34+
run: |
35+
fpm test

.github/workflows/deploy-docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Deploy Documentation
2+
3+
on: [push, pull_request]
4+
5+
6+
jobs:
7+
Build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
14+
- name: Install Dependencies Ubuntu
15+
run: |
16+
sudo apt-get update
17+
sudo apt install -y python-dev python build-essential graphviz
18+
sudo pip install ford
19+
20+
- name: Build Developer Documenation
21+
run: |
22+
ford doc-generator.md
23+
24+
- name: Upload Documentation
25+
uses: actions/upload-artifact@v2
26+
with:
27+
name: documentation
28+
path: doc/html
29+
if-no-files-found: error
30+
31+
- name: Broken Link Check
32+
if: ${{ github.ref == 'refs/heads/main'}}
33+
uses: technote-space/broken-link-checker-action@v1
34+
with:
35+
TARGET: file://${{ github.workspace }}/doc/html/index.html
36+
RECURSIVE: true
37+
ASSIGNEES: ${{ github.actor }}
38+
39+
- name: Deploy API Documentation
40+
uses: JamesIves/github-pages-deploy-action@4.1.0
41+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
42+
with:
43+
branch: gh-pages
44+
folder: doc/html

0 commit comments

Comments
 (0)