Skip to content

Commit

Permalink
workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
14NGiestas committed Dec 7, 2024
1 parent baf4d16 commit b7ce991
Showing 1 changed file with 58 additions and 53 deletions.
111 changes: 58 additions & 53 deletions .github/workflows/fpm-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,65 @@ name: fpm-deployment

on: [push, pull_request]
env:
GCC_V: "14"
PROJECT_NAME: "mfi"

jobs:
Build:
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/[email protected]

- name: Set up Python 3.x
uses: actions/setup-python@v1
with:
python-version: 3.x

- name: Install fypp
run: pip install --upgrade fypp

- name: Generate ${{ env.PROJECT_NAME }}-fpm package 🔧
run: |
make FYPPFLAGS=-DMFI_EXTENSIONS
mkdir mfi-fpm
cp -R src mfi-fpm
cp -R test mfi-fpm
cp fpm.toml mfi-fpm
cp LICENSE mfi-fpm
find mfi-fpm/src -type f ! -name "*.f90" -delete
find mfi-fpm/test -type f ! -name "*.f90" -delete
- name: Install GFortran
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_V }} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ env.GCC_V }} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ env.GCC_V }}
- name: Install Lapack and Blas
run: |
sudo apt install libblas3* liblapack3* libtmglib3*
- name: Install fpm latest release
uses: fortran-lang/setup-fpm@v5
with:
fpm-version: 'v0.10.0'


- name: Run fpm build ⚙
run: |
fpm build --profile release
# Update and deploy the f90 files generated by github-ci to the `PROJECT_NAME-fpm` branch.
- name: Deploy 🚀
uses: JamesIves/[email protected]
if: github.event_name != 'pull_request'
with:
BRANCH: ${{ env.PROJECT_NAME }}-fpm
FOLDER: mfi-fpm
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
toolchain: {compiler: gcc, version: 13}
steps:
- name: Checkout 🛎️
uses: actions/[email protected]

- name: Set up Python 3.x
uses: actions/setup-python@v1
with:
python-version: 3.x

- name: Install fypp
run: pip install --upgrade fypp

- name: Generate ${{ env.PROJECT_NAME }}-fpm package 🔧
run: |
make FYPPFLAGS=-DMFI_EXTENSIONS
mkdir mfi-fpm
cp -R src mfi-fpm
cp -R test mfi-fpm
cp fpm.toml mfi-fpm
cp LICENSE mfi-fpm
find mfi-fpm/src -type f ! -name "*.f90" -delete
find mfi-fpm/test -type f ! -name "*.f90" -delete
- name: setup fortran
uses: fortran-lang/setup-fortran@main
id: setup-fortran
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

- name: Install Lapack and Blas
run: |
sudo apt install libblas-dev liblapack-dev libtmglib-dev
- name: Install fpm latest release
uses: fortran-lang/setup-fpm@v5
with:
fpm-version: 'v0.10.0'

- name: Run fpm build ⚙
run: |
fpm build --profile release
# Update and deploy the f90 files generated by github-ci to the `PROJECT_NAME-fpm` branch.
- name: Deploy 🚀
uses: JamesIves/[email protected]
if: github.event_name != 'pull_request'
with:
BRANCH: ${{ env.PROJECT_NAME }}-fpm
FOLDER: mfi-fpm

0 comments on commit b7ce991

Please sign in to comment.