From fdecbc85672013b6e8e89b1be1bcd7fb48055722 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Thu, 28 Dec 2023 09:54:09 -0600 Subject: [PATCH] CI updates --- .github/workflows/CI.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index abb8bf6..ac2cd9f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,24 +4,26 @@ jobs: Build: runs-on: ${{ matrix.os }} + permissions: + contents: write strategy: fail-fast: false matrix: os: [ubuntu-latest] - gcc_v: [9] # Version of GFortran we want to use. - python-version: [3.7] + 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 + uses: actions/checkout@v3 with: submodules: recursive - name: Install Python - uses: actions/setup-python@v1 # Use pip to install latest CMake, & FORD/Jin2For, etc. + uses: actions/setup-python@v4 # Use pip to install latest CMake, & FORD/Jin2For, etc. with: python-version: ${{ matrix.python-version }} @@ -29,7 +31,7 @@ jobs: uses: ts-graphviz/setup-graphviz@v1 - name: Setup Fortran Package Manager - uses: fortran-lang/setup-fpm@v3 + uses: fortran-lang/setup-fpm@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -37,7 +39,7 @@ jobs: if: contains( matrix.os, 'ubuntu') run: | python -m pip install --upgrade pip - pip install ford + pip install ford numpy matplotlib if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Install GFortran Linux @@ -45,23 +47,21 @@ jobs: 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 --profile release + sudo apt-get install -y gcc-${{ matrix.gcc_v }} gfortran-${{ matrix.gcc_v }} + sudo update-alternatives \ + --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \ + --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \ + --slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc_v }} - name: Run tests - run: fpm test + run: fpm test --profile release - name: Build documentation run: ford ./daglib.md - name: Deploy Documentation if: github.ref == 'refs/heads/master' - uses: JamesIves/github-pages-deploy-action@4.1.4 + uses: JamesIves/github-pages-deploy-action@v4.4.1 with: branch: gh-pages # The branch the action should deploy to. folder: doc # The folder the action should deploy.