Update CI #13
Workflow file for this run
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: Setup Fortran Conda CI/CD | |
| on: | |
| push: | |
| branches: [main, dev] | |
| paths-ignore: ['README.md','CHANGELOG.md','VERSION','LICENSE'] | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: ['README.md','CHANGELOG.md','VERSION','LICENSE'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| test_fpm: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
| name: ${{ matrix.os }}_${{ matrix.compiler }}_fpm | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {os: ubuntu-latest, compiler: gfortran } | |
| - {os: ubuntu-latest, compiler: ifx } | |
| - {os: ubuntu-latest, compiler: flang-new} | |
| - {os: ubuntu-latest, compiler: nvfortran} | |
| - {os: ubuntu-latest, compiler: lfortran } | |
| - {os: windows-latest, compiler: gfortran } | |
| - {os: windows-latest, compiler: ifx } | |
| - {os: windows-latest, compiler: flang-new} | |
| - {os: windows-latest, compiler: lfortran } | |
| - {os: macos-latest, compiler: gfortran } | |
| - {os: macos-latest, compiler: lfortran } | |
| steps: | |
| - name: Setup Fortran | |
| uses: gha3mi/setup-fortran-conda@latest | |
| with: | |
| platform: ${{ matrix.os }} | |
| compiler: ${{ matrix.compiler }} | |
| - name: fpm test (debug) | |
| run: fpm @${{ matrix.os }}_${{ matrix.compiler }}_debug --verbose | |
| - name: fpm test (release) | |
| run: fpm @${{ matrix.os }}_${{ matrix.compiler }}_release --verbose | |
| test_cmake: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
| name: ${{ matrix.os }}_${{ matrix.compiler }}_cmake | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {os: ubuntu-latest, compiler: gfortran } | |
| - {os: ubuntu-latest, compiler: ifx } | |
| - {os: ubuntu-latest, compiler: flang-new} | |
| - {os: ubuntu-latest, compiler: nvfortran} | |
| - {os: ubuntu-latest, compiler: lfortran } | |
| - {os: windows-latest, compiler: gfortran } | |
| - {os: windows-latest, compiler: ifx } | |
| - {os: windows-latest, compiler: flang-new} | |
| - {os: windows-latest, compiler: lfortran } | |
| - {os: macos-latest, compiler: gfortran } | |
| - {os: macos-latest, compiler: lfortran } | |
| steps: | |
| - name: Setup Fortran | |
| uses: gha3mi/setup-fortran-conda@latest | |
| with: | |
| platform: ${{ matrix.os }} | |
| compiler: ${{ matrix.compiler }} | |
| - name: cmake test (debug) | |
| run: | | |
| cmake -S . -B build/debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_Fortran_COMPILER=${{ matrix.compiler }} -G Ninja -DFORTIME_BUILD_TESTS=ON | |
| cmake --build build/debug --config Debug | |
| ctest --test-dir build/debug --output-on-failure | |
| - name: cmake test (release) | |
| run: | | |
| cmake -S . -B build/release -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=${{ matrix.compiler }} -G Ninja -DFORTIME_BUILD_TESTS=ON | |
| cmake --build build/release --config Release | |
| ctest --test-dir build/release --output-on-failure | |
| doc_ford: | |
| if: ${{ github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]') }} | |
| name: Generate FORD Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup and Generate FORD Documentation | |
| uses: gha3mi/setup-fortran-conda@latest | |
| with: | |
| compiler: gfortran | |
| platform: ubuntu-latest | |
| generate-doc-ford: true | |
| ford-working-directory: . | |
| ford-config: README.md | |
| ford-output-directory: doc | |
| ford-branch: gh-pages | |
| ford-target-folder: . | |
| status_fpm: | |
| if: ${{ always() && github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]') }} | |
| name: Generate STATUS.md | |
| needs: [test_fpm] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate summary | |
| uses: gha3mi/setup-fortran-conda@latest | |
| with: | |
| generate-status-fpm: true | |
| status_cmake: | |
| if: ${{ always() && github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip ci]') }} | |
| name: Generate STATUS.md | |
| needs: [test_cmake] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate summary | |
| uses: gha3mi/setup-fortran-conda@latest | |
| with: | |
| generate-status-cmake: true | |
| update_readme_table: | |
| if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip ci]') }} | |
| name: Update README.md status table | |
| needs: [status_fpm, status_cmake] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Update README status | |
| uses: gha3mi/setup-fortran-conda@latest | |
| with: | |
| update-readme-table: true | |
| update-readme-token: ${{ secrets.GH_PAT }} # Update with your GitHub personal access token | |
| update-readme-user-name: "Seyed Ali Ghasemi" # Update with your name | |
| update-readme-user-email: "info@gha3mi.com" # Update with your email | |
| linter_fortitude: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
| name: Run Fortitude Linter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Run Fortitude Linter | |
| uses: gha3mi/setup-fortran-conda@latest | |
| with: | |
| fortitude-check: true | |
| fortitude-settings: "--output-format github" |