diff --git a/.github/dco.yml b/.github/dco.yml new file mode 100644 index 0000000..0c4b142 --- /dev/null +++ b/.github/dco.yml @@ -0,0 +1,2 @@ +require: + members: false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c59306d --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..77e657f --- /dev/null +++ b/.github/workflows/docs.yml @@ -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 diff --git a/docs.md b/docs.md index def54d0..35517d3 100644 --- a/docs.md +++ b/docs.md @@ -6,7 +6,8 @@ project_download: https://github.com/grimme-lab/rmsd-tool/releases author: Grimme group, Bonn github: https://github.com/grimme-lab src_dir: ./src -output_dir: ./docs + ./app +output_dir: ./_docs exclude_dir: ./test docmark: < predocmark: >