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
75 changes: 35 additions & 40 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,66 @@
name: Build documentation
name: Build and Deploy Documentation

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on: [push, pull_request]

jobs:
build_docs:
name: Build documentation
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
init-shell: >-
bash
init-shell: bash
cache-environment: true
post-cleanup: 'all'
- name: Get external tags

- name: Prepare Doxygen prerequisites
shell: bash -el {0}
run: |
cd apidocs
# Get external tags for C++ standard library linking
mkdir -p tags
cd tags
curl https://upload.cppreference.com/mwiki/images/f/f8/cppreference-doxygen-web.tag.xml -o cppreference-doxygen-web.tag.xml
- name: Get Theme
shell: bash -el {0}
run: |
cd apidocs
curl -L https://upload.cppreference.com/mwiki/images/f/f8/cppreference-doxygen-web.tag.xml -o tags/cppreference-doxygen-web.tag.xml
# Get the Doxygen theme
wget https://github.com/HaoZeke/doxyYoda/releases/download/0.0.2/doxyYoda_0.0.2.tar.gz
tar xf doxyYoda_0.0.2.tar.gz
- name: Generate Docs

- name: Generate Doxygen documentation
shell: bash -el {0}
run: |
doxygen apidocs/Doxygen-featom.cfg
- name: Archive artifact
shell: sh
if: runner.os == 'Linux'
run: |
tar \
--dereference --hard-dereference \
--exclude=.git \
--exclude=.github \
-cvf "$RUNNER_TEMP/artifact.tar" \
--directory=html .
- name: Upload artifacts
uses: actions/upload-artifact@v3
run: doxygen apidocs/Doxygen-featom.cfg

- name: Upload documentation artifact
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
path: html/
if-no-files-found: error
# Deploy job
deploy:
# Add a dependency to the build job
needs: build_docs
if: github.event_name == 'push' && github.repository == 'atomic-solvers/featom'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'atomic-solvers/featom'
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action
uses: actions/deploy-pages@v4
89 changes: 32 additions & 57 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and Test

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
Expand All @@ -11,82 +11,57 @@ on:
branches: [main]

jobs:
buildfpm:
build_and_test:
name: Build with ${{ matrix.build_system }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_system: [fpm, meson]

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

- name: Install system dependencies
run: |
set -ex
echo "Update information of package list.."
sudo apt-get update
echo "Install Fortran compiler .."
sudo apt-get install -y gfortran
echo "Install OpenMP headers .."
sudo apt-get install -y libomp-dev
echo "Install lapack .."
sudo apt-get install -y libopenblas-dev liblapack-dev
echo "install meson"
sudo apt-get install -y meson
sudo apt-get install -y \
gfortran \
libomp-dev \
libopenblas-dev \
liblapack-dev \
meson

- name: Install fpm
if: matrix.build_system == 'fpm'
uses: fortran-lang/setup-fpm@v5
with:
fpm-version: 'v0.9.0'

- name: Build featom
- name: Build and Test (Debug) with fpm
if: matrix.build_system == 'fpm'
run: |
set -ex
fpm build

- name: Test featom
run: |
set -ex
fpm test

- name: Test convergence
run: |
set -ex
fpm run gpd_coulomb_schroed_nelements

- name: Test Release Mode
- name: Build and Test (Release) with fpm
if: matrix.build_system == 'fpm'
run: |
set -ex
fpm test --profile=release
fpm run --profile=release gpd_coulomb_schroed_nelements

buildmeson:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install packages
run: |
set -ex
echo "Update information of package list.."
sudo apt-get update
echo "Install Fortran compiler .."
sudo apt-get install -y gfortran
echo "Install OpenMP headers .."
sudo apt-get install -y libomp-dev
echo "Install lapack .."
sudo apt-get install -y libopenblas-dev liblapack-dev
echo "install meson"
sudo apt-get install -y meson

- name: Build featom
- name: Configure and Build with meson
if: matrix.build_system == 'meson'
run: |
set -ex
meson setup bbdir -Dwith_tests=True -Dwith_app=True
meson setup builddir -Dwith_tests=True -Dwith_app=True
meson compile -C builddir

- name: Test featom
run: |
set -ex
meson test -C bbdir
- name: Test with meson
if: matrix.build_system == 'meson'
run: meson test -C builddir

- name: Test convergence [release]
run: |
set -ex
meson compile -C bbdir
./bbdir/app/gpd_coulomb_schroed_nelements
- name: Run convergence app with meson
if: matrix.build_system == 'meson'
run: ./builddir/app/gpd_coulomb_schroed_nelements
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ dependencies:
- pkg-config
- openblas
- meson
- intel::intel-openmp
- mkl-devel=2023.2=ha770c72_49502
- openmp
- ninja
- cmake
# Documentation
Expand Down
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ test_array = [#
['HarmonicDirac', 'testHarmonicDirac', 'test_harmonic_dirac.f90'],
['DftDiracFast', 'testDftDiracFast', 'test_dft_dirac_fast.f90'],
['DftSchroedFast', 'testDftSchroedFast', 'test_dft_schroed_fast.f90'],
['HFSchroedFast', 'testHFSchroedFast', 'test_hf_schroed.f90'],
]
foreach test : test_array
test(test.get(0),
Expand Down
Loading
Loading