delete submodules #183
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: Build and test pkg | |
on: [push, pull_request] | |
env: | |
FLAGS: "-Wno-compare-reals" | |
jobs: | |
linux-gcc-build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
gcc_v: [10, 12] | |
include: | |
- os: ubuntu-latest | |
os-arch: linux-x86_64 | |
env: | |
FC: gfortran | |
GCC_V: ${{ matrix.gcc_v }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install GFortran, OpenBLAS | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \ | |
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ | |
--slave /usr/bin/gcov gcov /usr/bin/gcov-${GCC_V} | |
sudo apt-get install libopenblas-dev | |
- name: Install fpm | |
uses: fortran-lang/setup-fpm@v5 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
fpm-version: "v0.10.0" | |
- name: Build and test | |
run: | | |
gfortran --version | |
fpm test --profile debug --flag $FLAGS --verbose | |
fpm test --profile release --flag $FLAGS --verbose | |
- name: Generate coverage report | |
if: ${{ matrix.gcc_v == '10' }} | |
run: | | |
gfortran --version | |
rm -rf ./build/gfortran* | |
fpm test --profile debug --flag "$FLAGS --coverage" | |
gcov ./build/gfortran*/odrpack95/src*.gcda -r ./src/ -b -w | |
- name: Run examples | |
run: | | |
gfortran --version | |
fpm run --example "example5" --profile release | |
- name: Upload coverage to Codecov | |
if: ${{ matrix.gcc_v == '10' }} | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
msys2-gcc-build: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install MSYS2, GFortran, fpm, OpenBLAS | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
update: true | |
path-type: inherit | |
install: | | |
mingw-w64-x86_64-gcc-fortran | |
mingw-w64-x86_64-fpm | |
mingw-w64-x86_64-openblas | |
- name: Build and test | |
run: | | |
gfortran --version | |
fpm test --profile debug --flag $FLAGS --verbose | |
fpm test --profile release --flag $FLAGS --verbose |