-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add actions setup for testing and docs (#2)
- Loading branch information
Showing
4 changed files
with
122 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require: | ||
members: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
gcc-build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
env: | ||
FC: gfortran | ||
GCC_V: 9 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install GCC (OSX) | ||
if: contains(matrix.os, 'macos') | ||
run: | | ||
ln -s /usr/local/bin/gfortran-${GCC_V} /usr/local/bin/gfortran | ||
which gfortran-${GCC_V} | ||
which gfortran | ||
- name: Install GCC (Linux) | ||
if: contains(matrix.os, 'ubuntu') | ||
run: | | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \ | ||
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ | ||
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V} | ||
- name: Install meson | ||
run: pip3 install meson ninja | ||
|
||
- name: Configure build | ||
run: meson setup _build | ||
|
||
- name: Build library | ||
run: meson compile -C _build | ||
|
||
- name: Run unit tests | ||
run: meson test -C _build --print-errorlogs --no-rebuild | ||
|
||
|
||
intel-build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
|
||
env: | ||
FC: ifort | ||
OMP_NUM_THREADS: 2,1 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Add Intel repository | ||
run: | | ||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB | ||
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | ||
sudo apt-get update | ||
- name: Install Intel oneAPI compiler | ||
run: | | ||
sudo apt-get install intel-oneapi-ifort | ||
source /opt/intel/oneapi/setvars.sh | ||
printenv >> $GITHUB_ENV | ||
- name: Install meson | ||
run: pip3 install meson ninja | ||
|
||
- name: Configure meson build | ||
run: meson setup build | ||
|
||
- name: Build library | ||
run: meson compile -C build | ||
|
||
- name: Run unit tests | ||
run: meson test -C build --print-errorlogs --no-rebuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: docs | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: pip install ford | ||
- name: Build Documentation | ||
run: ford docs.md | ||
- uses: JamesIves/github-pages-deploy-action@3.7.1 | ||
if: github.event_name == 'push' && github.repository == 'grimme-lab/rmsd-tool' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/main' ) | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: _docs | ||
CLEAN: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters