From 029c19c233633aba8eb7fab3a6c5ffea21466d81 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Sat, 23 Sep 2023 21:30:41 -0500 Subject: [PATCH] CI updates --- .github/workflows/CI.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0584cbb..7c4ec9f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,9 +1,11 @@ name: CI -on: [push, pull_request] +on: [push] jobs: Build: runs-on: ${{ matrix.os }} + permissions: + contents: write strategy: fail-fast: false matrix: @@ -16,12 +18,12 @@ jobs: 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@v4 + uses: fortran-lang/setup-fpm@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -44,6 +46,9 @@ jobs: if: contains( matrix.os, 'ubuntu') run: | sudo apt-get install lcov + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update + 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 }} \ @@ -58,14 +63,15 @@ jobs: - name: Create coverage report run: | mkdir -p ${{ env.COV_DIR }} - lcov --capture --initial --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.base - lcov --capture --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.capture + mv ./build/gfortran_*/*/* ${{ env.COV_DIR }} + lcov --capture --initial --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.base + lcov --capture --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.capture lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info env: COV_DIR: build/coverage - name: Upload coverage report - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: files: build/coverage/coverage.info @@ -74,7 +80,7 @@ jobs: - name: Deploy Documentation if: github.ref == 'refs/heads/master' - uses: JamesIves/github-pages-deploy-action@4.1.0 + 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.