Skip to content

Commit 597568b

Browse files
authored
Merge pull request #52 from henryleberre/master
2 parents 83528f1 + 7467a18 commit 597568b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+2351
-2739
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
* @sbryngelson
44

55
# Henry Le Berre (henryleberre)
6+
docs/ @sbryngelson @henryleberre
67
toolchain/ @sbryngelson @henryleberre
78
tests/ @sbryngelson @henryleberre
89
mfc.sh @sbryngelson @henryleberre
910
mfc.bat @sbryngelson @henryleberre
10-
defaults.yaml @sbryngelson @henryleberre
1111
CMakeLists.txt @sbryngelson @henryleberre
1212
.gitlab-ci.yml @sbryngelson @henryleberre
13+
.vscode/ @sbryngelson @henryleberre
1314
.github/workflows/ @sbryngelson @henryleberre
15+

.github/workflows/ci.yml

Lines changed: 52 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,52 @@
1-
name: Continuous Integration
2-
3-
on:
4-
push:
5-
paths:
6-
- '**.f90'
7-
- '**.fpp'
8-
- 'mfc.sh'
9-
- '**.py'
10-
- '**.yaml'
11-
- '**.yml'
12-
- 'golden.txt'
13-
- 'Makefile'
14-
- 'makefile'
15-
- 'CMakeLists.txt'
16-
- Dockerfile
17-
18-
pull_request:
19-
20-
workflow_dispatch:
21-
22-
jobs:
23-
tests:
24-
name: CI Test Runner
25-
strategy:
26-
matrix:
27-
include:
28-
- os: ubuntu-latest
29-
unix: true
30-
31-
- os: macos-latest
32-
unix: true
33-
gcc: 11
34-
runs-on: ${{ matrix.os }}
35-
steps:
36-
- name: Clone MFC
37-
uses: actions/checkout@v3
38-
39-
- name: (macos-latest) Setup
40-
if: matrix.os == 'macos-latest'
41-
run: |
42-
echo "OMPI_FC=gfortran-${{ matrix.gcc }}" >> $GITHUB_ENV
43-
echo "OMPI_CXX=g++-${{ matrix.gcc }}" >> $GITHUB_ENV
44-
echo "OMPI_MPICC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
45-
echo "CC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
46-
echo "CXX=g++-${{ matrix.gcc }}" >> $GITHUB_ENV
47-
echo "FC=gfortran-${{ matrix.gcc }}" >> $GITHUB_ENV
48-
brew install wget make python make cmake coreutils gcc@${{ matrix.gcc }}
49-
HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-${{ matrix.gcc }} --verbose --build-from-source open-mpi
50-
51-
- name: (ubuntu-latest) Setup
52-
if: matrix.os == 'ubuntu-latest'
53-
run: |
54-
sudo apt update && sudo apt upgrade
55-
sudo apt install tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
56-
57-
- name: (${{ matrix.os }}) Test MFC
58-
run: |
59-
chmod +x ./mfc.sh
60-
./mfc.sh test -j $(nproc)
61-
62-
- name: Upload logs
63-
uses: actions/upload-artifact@v3
64-
if: always()
65-
with:
66-
name: ${{ matrix.os }}
67-
path: |
68-
build/**/*.log
69-
build/**/*.txt
70-
tests/**/*.dat
71-
tests/**/*.out
72-
tests/**/*.inp
73-
tests/**/*.txt
74-
tests/*.txt
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.f90'
7+
- '**.fpp'
8+
- '**.py'
9+
- '**.yml'
10+
- 'mfc.sh'
11+
- 'golden.txt'
12+
- 'CMakeLists.txt'
13+
14+
pull_request:
15+
16+
workflow_dispatch:
17+
18+
jobs:
19+
tests:
20+
name: Test Suite
21+
strategy:
22+
matrix:
23+
include:
24+
- os: ubuntu-latest
25+
- os: macos-latest
26+
gcc: 11
27+
runs-on: ${{ matrix.os }}
28+
steps:
29+
- name: Clone
30+
uses: actions/checkout@v3
31+
32+
- name: Setup
33+
if: matrix.os == 'macos-latest'
34+
run: |
35+
echo "OMPI_FC=gfortran-${{ matrix.gcc }}" >> $GITHUB_ENV
36+
echo "OMPI_CXX=g++-${{ matrix.gcc }}" >> $GITHUB_ENV
37+
echo "OMPI_MPICC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
38+
echo "CC=gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
39+
echo "CXX=g++-${{ matrix.gcc }}" >> $GITHUB_ENV
40+
echo "FC=gfortran-${{ matrix.gcc }}" >> $GITHUB_ENV
41+
brew install wget make python make cmake coreutils gcc@${{ matrix.gcc }}
42+
HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-${{ matrix.gcc }} --verbose --build-from-source open-mpi
43+
44+
- name: Setup
45+
if: matrix.os == 'ubuntu-latest'
46+
run: sudo apt install tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
47+
48+
- name: Build
49+
run: /bin/bash mfc.sh build -j $(nproc)
50+
51+
- name: Test Suite
52+
run: /bin/bash mfc.sh test -j $(nproc)

.github/workflows/doc.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
docs:
12+
name: Build & Publish
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
# We build doxygen from source because of
19+
# https://github.com/doxygen/doxygen/issues/9016
20+
- name: Build Doxygen
21+
run: |
22+
sudo apt install cmake ninja-build graphviz graphviz
23+
git clone https://github.com/doxygen/doxygen.git ../doxygen
24+
cmake -S ../doxygen -B ../doxygen/build -G Ninja
25+
sudo ninja -C ../doxygen/build install
26+
27+
- name: Build Documentation
28+
run: |
29+
pip3 install fypp
30+
cmake -S . -B build -G Ninja --install-prefix=$(pwd)/build/install -D MFC_DOCUMENTATION=ON
31+
ninja -C build install
32+
33+
- name: Publish Documentation
34+
run: |
35+
set +e
36+
git ls-remote "${{ secrets.DOC_PUSH_URL }}" -q
37+
if [ "$?" -ne "0" ]; then exit 0; fi
38+
set -e
39+
git config --global user.name 'MFC Action'
40+
git config --global user.email '<>'
41+
git clone "${{ secrets.DOC_PUSH_URL }}" ../www
42+
mv ../www/.github ..
43+
rm -rf ../www/*
44+
mv ../.github ../www/
45+
mv build/install/docs/mfc/* ../www/
46+
git -C ../www add -A
47+
git -C ../www commit -m "Docs @ ${GITHUB_SHA::7}" || true
48+
git -C ../www push
49+
50+
# DOC_PUSH_URL should be of the format:
51+
# --> https://<username>:<token>@github.com/<username>/<repository>

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
tags
22
src/*/tags
33

4+
*.swo
5+
*.swp
6+
7+
*:Zone.Identifier
8+
49
.vscode/
510
.nfs*
611
defaults.yaml

.gitlab-ci.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ before_script:
6363
script:
6464
- cd "$CI_MFC_DIR/$JOB_MODE" && echo "[CI] Building in $(pwd):"
6565
- . ./mfc.sh load -c a -m $(if [ "$(echo "$JOB_MODE" | grep -i 'cpu' | wc -c)" -gt 0 ]; then echo "c"; else echo "g"; fi)
66-
- ./mfc.sh build -j 8 -m "$JOB_MODE"
66+
- ./mfc.sh build -j 8 $FLAGS
6767
tags:
6868
- nobatch
6969

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

7979

8080
clone-cpu:
8181
variables:
82-
JOB_MODE: "release-cpu"
82+
JOB_MODE: "cpu"
8383
extends: .clone
8484

8585
build-cpu:
8686
variables:
87-
JOB_MODE: "release-cpu"
87+
FLAGS: ""
88+
JOB_MODE: "cpu"
8889
extends: .build
8990
needs:
9091
- clone-cpu
9192

9293
test-cpu:
9394
variables:
94-
JOB_MODE: "release-cpu"
95+
JOB_MODE: "cpu"
9596
extends: .test
9697
needs:
9798
- build-cpu
9899

99100
clone-gpu:
100101
variables:
101-
JOB_MODE: "release-gpu"
102+
JOB_MODE: "gpu"
102103
extends: .clone
103104

104105
build-gpu:
105106
variables:
106-
JOB_MODE: "release-gpu"
107+
FLAGS: "--gpu"
108+
JOB_MODE: "gpu"
107109
extends: .build
108110
needs:
109111
- clone-gpu
110112

111113
test-gpu:
112114
variables:
113-
JOB_MODE: "release-gpu"
115+
JOB_MODE: "gpu"
114116
extends: .test
115117
needs:
116118
- build-gpu

.vscode/tasks.json

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)