change fpm.rsp to use gfortran-10 and added -fPIE for intel to compil… #249
This file contains 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: CI | |
on: [push, pull_request, workflow_dispatch] | |
permissions: | |
contents: write | |
env: | |
BUILD_DIR: _build | |
PIP_PACKAGES: >- | |
gcovr | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
toolchain: [{compiler: gcc, version: 11}] | |
include: | |
- os: ubuntu-latest | |
toolchain: {compiler: intel, version: '2023.1'} | |
- os: ubuntu-latest | |
toolchain: {compiler: intel-classic, version: '2021.9'} | |
# - os: macos-latest | |
# toolchain: {compiler: intel-classic, version: '2021.9'} | |
defaults: | |
run: | |
shell: ${{ matrix.shell || 'bash' }} | |
env: | |
FC: gfortran | |
PYTHON_V: 3.8 | |
steps: | |
- uses: fortran-lang/setup-fortran@v1 | |
with: | |
compiler: ${{ matrix.toolchain.compiler }} | |
version: ${{ matrix.toolchain.version }} | |
- run: ${{ env.FC }} --version | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: fortran-lang/setup-fpm@v5 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and compile (GNU) | |
run: fpm build | |
- name: Test and compile (GNU) | |
run: fpm @test | |
- name: Run CodeCov | |
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.toolchain.compiler, 'gcc') }} | |
run: | | |
gcov ./build/gfortran_*/sMCRT/src*.gcda -r ./src/ -b | |
- name: Codecov | |
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.toolchain.compiler, 'gcc') }} | |
uses: codecov/codecov-action@v3.1.1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: build docs | |
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.toolchain.compiler, 'gcc') }} | |
run: | | |
pip install ford | |
pip install markdown-checklist | |
ford docs.md | |
- uses: JamesIves/github-pages-deploy-action@3.7.1 | |
if: ${{ contains(matrix.os, 'ubuntu') && contains(matrix.toolchain.compiler, 'gcc') }} | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: docs | |
CLEAN: true | |
CLEAN_EXCLUDE: | | |
CNAME |