Skip to content

Commit

Permalink
Add CI_doc and CI_test
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Dec 13, 2023
1 parent 9833e28 commit 2b9a8e8
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/CI_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: doc
on: [push]
jobs:

Build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.12]

steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

- name: Install FORD
if: contains( matrix.os, 'ubuntu')
run: |
python -m pip install --upgrade pip
pip install ford
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build FORD Documentation
run: ford ./ford.yml

- name: Deploy Documentation
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
branch: gh-pages
folder: doc
46 changes: 46 additions & 0 deletions .github/workflows/CI_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: test
on: [push]
jobs:

Build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
toolchain:
- {compiler: gcc}
- {compiler: intel-classic}
exclude:
- os: windows-latest
toolchain: {compiler: intel-classic}

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup Fortran Package Manager (fpm)
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Fortran Compiler
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

- name: Run Tests (Debug)
run: fpm test --profile debug --compiler ${{ env.FC}}
env:
FC: ${{ steps.setup-fortran.outputs.fc }}

- name: Run Tests (Release)
run: fpm test --profile release --compiler ${{ env.FC}}
env:
FC: ${{ steps.setup-fortran.outputs.fc }}

0 comments on commit 2b9a8e8

Please sign in to comment.