ci: drop redundant flang step and run debug examples #93
This file contains hidden or 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: test | |
| on: [push, pull_request] | |
| jobs: | |
| cmake: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install GFortran and LAPACK | |
| run: sudo apt-get install -y gfortran liblapack-dev libblas-dev | |
| - name: Configure | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| run: cmake --build build | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| flang: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install flang macOS | |
| if: contains(matrix.os, 'macos') | |
| run: | | |
| brew install flang | |
| FC_PATH="$(command -v flang || command -v flang-new)" | |
| if [ -z "${FC_PATH}" ]; then | |
| echo "flang compiler not found on PATH" >&2 | |
| exit 1 | |
| fi | |
| echo "FC=${FC_PATH}" >> "$GITHUB_ENV" | |
| echo "FPM_FC=${FC_PATH}" >> "$GITHUB_ENV" | |
| - name: Install fpm | |
| uses: fortran-lang/setup-fpm@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run example programs (debug) | |
| run: | | |
| "${FC}" --version | |
| fpm run --example robertson | |
| fpm run --example vanpol |