-
Notifications
You must be signed in to change notification settings - Fork 11
CI expansion in GitHub Actions #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c0c08f1
CI: Convert existing GitHub action to explicit gfortran-12
bonachea 29d08f5
CI: enable macos-13 and ubuntu-24.04, add examples
bonachea b7c450c
CI: Matrix gfortran-{13,14}, where available
bonachea 902c914
CI: Matrix flang-new container
bonachea 4dc811b
CI: Add macos-14
bonachea f0f4b3b
CI: Add flang release containers
bonachea 6694a6b
test-assert-subroutine-error-termination: Remove check-exit-status fr…
bonachea 52c2c0d
CI: Rename FORD action to reduce confusion
bonachea 7624adc
CI: Cleaner refactor for EXTRA_FLAGS
bonachea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: Build | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
|
|
||
| jobs: | ||
| build: | ||
| name: ${{ matrix.compiler }}-${{ matrix.version }} (${{ matrix.os }}) | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [macos-13, macos-14, ubuntu-22.04, ubuntu-24.04] | ||
| compiler: [ gfortran ] | ||
| version: [ 12, 13, 14 ] | ||
| extra_flags: [ -ffree-line-length-0 ] | ||
| include: | ||
| - os: ubuntu-24.04 | ||
| compiler: flang | ||
| version: new | ||
| container: gmao/llvm-flang:latest | ||
| extra_flags: -g | ||
| exclude: | ||
| - os: ubuntu-22.04 | ||
| version: 13 # no package available | ||
| - os: ubuntu-22.04 | ||
| version: 14 # no package available | ||
|
|
||
| container: | ||
| image: ${{ matrix.container }} | ||
|
|
||
| env: | ||
| GCC_V: ${{ matrix.version }} | ||
| FPM_FC: ${{ matrix.compiler }}-${{ matrix.version }} | ||
| EXTRA_FLAGS: ${{ matrix.extra_flags }} | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Dependencies Ubuntu | ||
| if: contains(matrix.os, 'ubuntu') && 0 | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt list -a 'gfortran-*' | ||
| sudo apt install -y gfortran-${GCC_V} build-essential | ||
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \ | ||
| --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ | ||
|
bonachea marked this conversation as resolved.
Outdated
|
||
| --slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V} | ||
|
bonachea marked this conversation as resolved.
Outdated
bonachea marked this conversation as resolved.
Outdated
|
||
|
|
||
| - uses: fortran-lang/setup-fpm@main | ||
| if: ${{ matrix.os != 'macos-14' }} | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build FPM | ||
| if: ${{ matrix.os == 'macos-14' }} # no arm64 fpm distro, build from source | ||
| run: | | ||
| set -x | ||
| curl --retry 5 -LOsS https://github.com/fortran-lang/fpm/releases/download/v0.11.0/fpm-0.11.0.F90 | ||
| mkdir fpm-temp | ||
| gfortran-14 -o fpm-temp/fpm fpm-0.11.0.F90 | ||
| echo "PATH=`pwd`/fpm-temp:${PATH}" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Version info | ||
| run: | | ||
| set -x | ||
| echo == TOOL VERSIONS == | ||
| uname -a | ||
| if test -r /etc/os-release ; then cat /etc/os-release ; fi | ||
| ${FPM_FC} --version | ||
| fpm --version | ||
|
|
||
| - name: Build and Test (Assertions OFF) | ||
| env: | ||
| FPM_FLAGS: --profile release --flag ${{ env.EXTRA_FLAGS }} | ||
| run: | | ||
| set -x | ||
| fpm test --verbose ${FPM_FLAGS} | ||
| fpm run --verbose --example false-assertion ${FPM_FLAGS} | ||
| fpm run --verbose --example invoke-via-macro ${FPM_FLAGS} | ||
|
|
||
| - name: Build and Test (Assertions ON) | ||
| env: | ||
| FPM_FLAGS: --profile release --flag ${{ env.EXTRA_FLAGS }} --flag -DASSERTIONS | ||
| run: | | ||
| set -x | ||
| fpm test --verbose ${FPM_FLAGS} | ||
| ( set +e ; fpm run --verbose --example false-assertion ${FPM_FLAGS} ; test $? = 1 ) | ||
| ( set +e ; fpm run --verbose --example invoke-via-macro ${FPM_FLAGS} ; test $? = 1 ) | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.