Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
* @sbryngelson

# Henry Le Berre (henryleberre)
docs/ @sbryngelson @henryleberre
toolchain/ @sbryngelson @henryleberre
tests/ @sbryngelson @henryleberre
mfc.sh @sbryngelson @henryleberre
mfc.bat @sbryngelson @henryleberre
defaults.yaml @sbryngelson @henryleberre
CMakeLists.txt @sbryngelson @henryleberre
.gitlab-ci.yml @sbryngelson @henryleberre
.vscode/ @sbryngelson @henryleberre
.github/workflows/ @sbryngelson @henryleberre

126 changes: 52 additions & 74 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,52 @@
name: Continuous Integration

on:
push:
paths:
- '**.f90'
- '**.fpp'
- 'mfc.sh'
- '**.py'
- '**.yaml'
- '**.yml'
- 'golden.txt'
- 'Makefile'
- 'makefile'
- 'CMakeLists.txt'
- Dockerfile

pull_request:

workflow_dispatch:

jobs:
tests:
name: CI Test Runner
strategy:
matrix:
include:
- os: ubuntu-latest
unix: true

- os: macos-latest
unix: true
gcc: 11
runs-on: ${{ matrix.os }}
steps:
- name: Clone MFC
uses: actions/checkout@v3

- name: (macos-latest) Setup
if: matrix.os == 'macos-latest'
run: |
echo "OMPI_FC=gfortran-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "OMPI_CXX=g++-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "OMPI_MPICC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "FC=gfortran-${{ matrix.gcc }}" >> $GITHUB_ENV
brew install wget make python make cmake coreutils gcc@${{ matrix.gcc }}
HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-${{ matrix.gcc }} --verbose --build-from-source open-mpi

- name: (ubuntu-latest) Setup
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update && sudo apt upgrade
sudo apt install tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev

- name: (${{ matrix.os }}) Test MFC
run: |
chmod +x ./mfc.sh
./mfc.sh test -j $(nproc)

- name: Upload logs
uses: actions/upload-artifact@v3
if: always()
with:
name: ${{ matrix.os }}
path: |
build/**/*.log
build/**/*.txt
tests/**/*.dat
tests/**/*.out
tests/**/*.inp
tests/**/*.txt
tests/*.txt
name: Continuous Integration

on:
push:
paths:
- '**.f90'
- '**.fpp'
- '**.py'
- '**.yml'
- 'mfc.sh'
- 'golden.txt'
- 'CMakeLists.txt'

pull_request:

workflow_dispatch:

jobs:
tests:
name: Test Suite
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
gcc: 11
runs-on: ${{ matrix.os }}
steps:
- name: Clone
uses: actions/checkout@v3

- name: Setup
if: matrix.os == 'macos-latest'
run: |
echo "OMPI_FC=gfortran-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "OMPI_CXX=g++-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "OMPI_MPICC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "FC=gfortran-${{ matrix.gcc }}" >> $GITHUB_ENV
brew install wget make python make cmake coreutils gcc@${{ matrix.gcc }}
HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-${{ matrix.gcc }} --verbose --build-from-source open-mpi

- name: Setup
if: matrix.os == 'ubuntu-latest'
run: sudo apt install tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev

- name: Build
run: /bin/bash mfc.sh build -j $(nproc)

- name: Test Suite
run: /bin/bash mfc.sh test -j $(nproc)
47 changes: 0 additions & 47 deletions .github/workflows/doc.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Documentation

on:
push:
branches:
- master

workflow_dispatch:

jobs:
docs:
name: Build & Publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# We build doxygen from source because of
# https://github.com/doxygen/doxygen/issues/9016
- name: Build Doxygen
run: |
sudo apt install cmake ninja-build graphviz graphviz
git clone https://github.com/doxygen/doxygen.git ../doxygen
cmake -S ../doxygen -B ../doxygen/build -G Ninja
sudo ninja -C ../doxygen/build install

- name: Build Documentation
run: |
pip3 install fypp
cmake -S . -B build -G Ninja --install-prefix=$(pwd)/build/install -D MFC_DOCUMENTATION=ON
ninja -C build install

- name: Publish Documentation
run: |
set +e
git ls-remote "${{ secrets.DOC_PUSH_URL }}" -q
if [ "$?" -ne "0" ]; then exit 0; fi
set -e
git config --global user.name 'MFC Action'
git config --global user.email '<>'
git clone "${{ secrets.DOC_PUSH_URL }}" ../www
mv ../www/.github ..
rm -rf ../www/*
mv ../.github ../www/
mv build/install/docs/mfc/* ../www/
git -C ../www add -A
git -C ../www commit -m "Docs @ ${GITHUB_SHA::7}" || true
git -C ../www push

# DOC_PUSH_URL should be of the format:
# --> https://<username>:<token>@github.com/<username>/<repository>
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
tags
src/*/tags

*.swo
*.swp

*:Zone.Identifier

.vscode/
.nfs*
defaults.yaml
Expand Down
18 changes: 10 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ before_script:
script:
- cd "$CI_MFC_DIR/$JOB_MODE" && echo "[CI] Building in $(pwd):"
- . ./mfc.sh load -c a -m $(if [ "$(echo "$JOB_MODE" | grep -i 'cpu' | wc -c)" -gt 0 ]; then echo "c"; else echo "g"; fi)
- ./mfc.sh build -j 8 -m "$JOB_MODE"
- ./mfc.sh build -j 8 $FLAGS
tags:
- nobatch

Expand All @@ -72,45 +72,47 @@ before_script:
script:
- cd "$CI_MFC_DIR/$JOB_MODE" && echo "[CI] Running in $(pwd):"
- . ./mfc.sh load -c a -m $(if [ "$(echo "$JOB_MODE" | grep -i 'cpu' | wc -c)" -gt 0 ]; then echo "c"; else echo "g"; fi)
- ./mfc.sh test -j 8 -m "$JOB_MODE"
- ./mfc.sh test -j 8
tags:
- batch


clone-cpu:
variables:
JOB_MODE: "release-cpu"
JOB_MODE: "cpu"
extends: .clone

build-cpu:
variables:
JOB_MODE: "release-cpu"
FLAGS: ""
JOB_MODE: "cpu"
extends: .build
needs:
- clone-cpu

test-cpu:
variables:
JOB_MODE: "release-cpu"
JOB_MODE: "cpu"
extends: .test
needs:
- build-cpu

clone-gpu:
variables:
JOB_MODE: "release-gpu"
JOB_MODE: "gpu"
extends: .clone

build-gpu:
variables:
JOB_MODE: "release-gpu"
FLAGS: "--gpu"
JOB_MODE: "gpu"
extends: .build
needs:
- clone-gpu

test-gpu:
variables:
JOB_MODE: "release-gpu"
JOB_MODE: "gpu"
extends: .test
needs:
- build-gpu
Expand Down
60 changes: 0 additions & 60 deletions .vscode/tasks.json

This file was deleted.

Loading