-
Notifications
You must be signed in to change notification settings - Fork 197
Added code_coverage support. #1039
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
Open
loiseaujc
wants to merge
7
commits into
fortran-lang:master
Choose a base branch
from
loiseaujc:code_coverage
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+60
−7
Open
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a8544c1
Added code_coverage support.
loiseaujc 91f136a
Update .github/workflows/fpm-deployment.yml
loiseaujc 687e733
bump-up fpm version and setup-fpm version
loiseaujc 542dd99
Apply suggestions from code review
jvdp1 98448a3
parametrize versions
jalvesz 191614c
revert parameter for gcc
jalvesz adaee34
revert parametrization
jalvesz 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 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 |
|---|---|---|
|
|
@@ -3,7 +3,8 @@ name: fpm-deployment | |
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| test: | ||
| deploy: | ||
| name: Run tests and deploys the fpm branches | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
|
|
@@ -41,22 +42,74 @@ jobs: | |
| - run: | # Just for deployment: create stdlib-fpm-ilp64 folder | ||
| python config/fypp_deployment.py --deploy_stdlib_fpm --with_ilp64 | ||
|
|
||
| - run: | # Use fpm gnu ci to check xdp and qp | ||
| - run: | # Use fpm gnu ci to check xdp and qp | ||
| python config/fypp_deployment.py --with_xdp --with_qp | ||
| fpm test --profile release --flag '-DWITH_XDP -DWITH_QP' | ||
|
|
||
| # Update and deploy the f90 files generated by github-ci to the `stdlib-fpm` branch. | ||
| # Update and deploy the f90 files generated by github-ci to the `stdlib-fpm` branch. | ||
| - name: Deploy 🚀 | ||
| uses: JamesIves/[email protected] | ||
| if: github.event_name != 'pull_request' | ||
| with: | ||
| BRANCH: stdlib-fpm | ||
| FOLDER: stdlib-fpm | ||
|
|
||
| # Update and deploy the f90 files generated by github-ci to the `stdlib-fpm-ilp64` branch. | ||
| # Update and deploy the f90 files generated by github-ci to the `stdlib-fpm-ilp64` branch. | ||
| - name: Deploy with 64-bit integer support 🚀 | ||
| uses: JamesIves/[email protected] | ||
| if: github.event_name != 'pull_request' | ||
| with: | ||
| BRANCH: stdlib-fpm-ilp64 | ||
| FOLDER: stdlib-fpm-ilp64 | ||
|
|
||
| coverage: | ||
| name: Generate and upload code coverage report | ||
| needs: deploy | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-latest | ||
| toolchain: {compiler: gcc, version: 13} | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/[email protected] | ||
| with: | ||
| ref: stdlib-fpm | ||
|
|
||
| - uses: fortran-lang/setup-fortran@main | ||
| id: setup-fortran | ||
| with: | ||
| compiler: ${{ matrix.toolchain.compiler }} | ||
| version: ${{ matrix.toolchain.version }} | ||
|
|
||
| - name: Setup Fortran Package Manager | ||
| uses: fortran-lang/setup-fpm@v5 | ||
jvdp1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| with: | ||
| fpm-version: 'v0.10.0' | ||
loiseaujc marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Prepare for code coverage | ||
| if: contains( matrix.os, 'ubuntu') | ||
| run: | | ||
| sudo apt-get install lcov | ||
|
|
||
| - name: Run tests to generate the coverage. | ||
| run: fpm test --profile release --flag '-DWITH_XDP -DWITH_QP -coverage' | ||
|
|
||
| - name: Create coverage report | ||
| run: | | ||
| mkdir -p ${{ env.COV_DIR }} | ||
| mv ./build/gfortran_*/*/* ${{ env.COV_DIR }} | ||
| lcov --capture --initial --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.base --ignore-errors mismatch | ||
| lcov --capture --base-directory . --directory ${{ env.COV_DIR }} --output-file ${{ env.COV_DIR }}/coverage.capture --ignore-errors mismatch | ||
| lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info --ignore-errors mismatch | ||
| env: | ||
| COV_DIR: build/coverage | ||
|
|
||
| - name: Upload coverage report | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| files: build/coverage/coverage.info | ||
Oops, something went wrong.
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.