Feature/docs #24
Workflow file for this run
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: linux-intel-fpm | |
on: | |
push: | |
branches: | |
- master | |
- main | |
paths-ignore: | |
- 'AUTHORS.md' | |
- 'LICENSE.md' | |
- 'README.md' | |
pull_request: | |
paths-ignore: | |
- 'AUTHORS.md' | |
- 'LICENSE.md' | |
- 'README.md' | |
env: | |
# Modify this variable to change the ifort compiler version - do NOT hardcode the version | |
# anywhere else! | |
INTEL_ONEAPI_VERSION: 2023.2.1 | |
jobs: | |
linux-tests: | |
timeout-minutes: 8 | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
name: ${{ matrix.os }} - ${{ matrix.fcompiler }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
fcompiler: ifx | |
ccompiler: icx-cc | |
shell: bash | |
- os: ubuntu-22.04 | |
fcompiler: ifort | |
ccompiler: icx-cc | |
shell: bash | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Intel oneAPI Fortran compiler | |
run: | | |
# download the key to system keyring | |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | |
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null | |
# add signed entry to apt sources and configure the APT client to use Intel repository: | |
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list | |
# update package index and install Fortran compiler | |
sudo apt update -y | |
sudo apt-get -y install intel-oneapi-compiler-fortran-$INTEL_ONEAPI_VERSION intel-oneapi-dpcpp-cpp-$INTEL_ONEAPI_VERSION | |
# set environment variables and make them persistent across steps | |
. /opt/intel/oneapi/setvars.sh | |
env | grep oneapi >> $GITHUB_ENV | |
- name: Use existing Intel oneAPI Fortran compiler | |
run: | | |
# set environment variables and make them persistent across steps | |
. /opt/intel/oneapi/setvars.sh | |
env | grep oneapi >> $GITHUB_ENV | |
- name: Show version information | |
run: | | |
${{ matrix.fcompiler }} --version | |
${{ matrix.ccompiler }} --version | |
- name: fpm tests (ifx) | |
if: ${{ (matrix.fcompiler == 'ifx') }} | |
run: | | |
wget https://github.com/fortran-lang/fpm/releases/download/v0.9.0/fpm-0.9.0-linux-x86_64 | |
chmod +x ./fpm-0.9.0-linux-x86_64 && mv ./fpm-0.9.0-linux-x86_64 fpm | |
./fpm install --compiler ${{ matrix.fcompiler }} --c-compiler ${{ matrix.ccompiler }} --flag "-debug all -check all,nouninit -traceback" | |
./fpm test --compiler ${{ matrix.fcompiler }} --c-compiler ${{ matrix.ccompiler }} --flag "-debug all -check all,nouninit -traceback" | |
./fpm run --compiler ${{ matrix.fcompiler }} --c-compiler ${{ matrix.ccompiler }} --flag "-debug all -check all,nouninit -traceback" --example "*" | |
- name: fpm tests (ifort) | |
if: ${{ (matrix.fcompiler == 'ifort') }} | |
run: | | |
wget https://github.com/fortran-lang/fpm/releases/download/v0.9.0/fpm-0.9.0-linux-x86_64 | |
chmod +x ./fpm-0.9.0-linux-x86_64 && mv ./fpm-0.9.0-linux-x86_64 fpm | |
./fpm install --compiler ${{ matrix.fcompiler }} --c-compiler ${{ matrix.ccompiler }} | |
./fpm test --compiler ${{ matrix.fcompiler }} --c-compiler ${{ matrix.ccompiler }} | |
./fpm run --compiler ${{ matrix.fcompiler }} --c-compiler ${{ matrix.ccompiler }} --example "*" | |