fpm 0.8.0 #50
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
Build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
gcc_v: [10] # Version of GFortran we want to use. | |
python-version: [3.9] | |
env: | |
FC: gfortran-${{ matrix.gcc_v }} | |
GCC_V: ${{ matrix.gcc_v }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install Python | |
uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc. | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup Graphviz | |
uses: ts-graphviz/setup-graphviz@v1 | |
# - name: Setup Fortran Package Manager | |
# uses: fortran-lang/setup-fpm@v3 | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Fortran Package Manager | |
run: | | |
wget https://github.com/fortran-lang/fpm/releases/download/v0.6.0/fpm-0.6.0-linux-x86_64 | |
chmod u+x fpm-0.6.0-linux-x86_64 | |
mkdir -p /home/runner/.local/bin | |
mv fpm-0.6.0-linux-x86_64 /home/runner/.local/bin/fpm | |
echo $PATH | |
export PATH=$PATH:/home/runner/.local/bin | |
hash -r | |
ls -l /home/runner/.local/bin | |
fpm --version | |
- name: Install Python dependencies | |
if: contains( matrix.os, 'ubuntu') | |
run: | | |
python -m pip install --upgrade pip | |
pip install ford numpy matplotlib | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Install GFortran Linux | |
if: contains( matrix.os, 'ubuntu') | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install -y gcc-${GCC_V} gfortran-${GCC_V} | |
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/bingcov gcov /usr/bin/gcov-${GCC_V} | |
- name: Compile | |
run: fpm build --compiler gfortran --profile release -flag -std=legacy | |
- name: Test | |
run: fpm test --compiler gfortran --profile release -flag -std=legacy | |
- name: Build documentation | |
run: ford ./ford.md | |
- name: Deploy Documentation | |
if: github.ref == 'refs/heads/master' | |
uses: JamesIves/github-pages-deploy-action@4.1.0 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs/fpm-ford # The folder the action should deploy. |