Skip to content

Commit

Permalink
Merge pull request #6 from sourceryinstitute/add-ci
Browse files Browse the repository at this point in the history
Add ci
  • Loading branch information
ktras authored Jun 16, 2024
2 parents 631b925 + f4ec20c commit 530e585
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on: [push, pull_request]

jobs:
Build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12, ubuntu-24.04]

steps:
- name: Checkout code
uses: actions/checkout@v1

- uses: fortran-lang/setup-fpm@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Dependencies on Ubuntu
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y build-essential gfortran-14 g++-14
- name: Install Dependencies on macOS
if: contains(matrix.os, 'macos')
run: |
brew install gfortran
- name: Build and Run unit tests
run: |
fpm test --compiler gfortran-14
43 changes: 43 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Deploy Documentation

on: [push, pull_request]

jobs:
Build:
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Dependencies Ubuntu
run: |
sudo apt-get update
sudo apt install -y python3-dev python3 build-essential graphviz
sudo python3 -m pip install ford
- name: Build Developer Documenation
run: |
ford ford.md
- name: Upload Documentation
uses: actions/upload-artifact@v2
with:
name: documentation
path: doc/html
if-no-files-found: error

- name: Broken Link Check
if: ${{ github.ref == 'refs/heads/main'}}
uses: technote-space/broken-link-checker-action@v1
with:
TARGET: file://${{ github.workspace }}/doc/html/index.html
RECURSIVE: true
ASSIGNEES: ${{ github.actor }}

- name: Deploy API Documentation
uses: JamesIves/github-pages-deploy-action@4.1.0
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
branch: gh-pages
folder: doc/html

0 comments on commit 530e585

Please sign in to comment.