Skip to content

Fix CI workflow

Fix CI workflow #46

Workflow file for this run

name: fpm test
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
gfortran-nix:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Get Intel OpenCL SDK from cache
id: cache-intel-opencl
uses: actions/cache@v2
with:
path: |
/tmp/opencl_runtime.tgz
key: cache-intel-opencl-v1
- name: Download Intel OpenCL SDK
if: steps.cache-intel-opencl.outputs.cache-hit != 'true'
run: |
wget -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17206/intel_sdk_for_opencl_applications_2020.3.494.tar.gz -O /tmp/opencl_runtime.tgz
- name: Install Intel OpenCL SDK
run: |
tar -xzf /tmp/opencl_runtime.tgz -C /tmp
sed 's/decline/accept/g' -i /tmp/intel_sdk_for_opencl_applications_2020.3.494/silent.cfg
sudo /tmp/intel_sdk_for_opencl_applications_2020.3.494/install.sh -s /tmp/intel_sdk_for_opencl_applications_2020.3.494/silent.cfg
- name: Run tests (debug)
run: |
gfortran --version
make -j test BUILD=debug
make clean
- name: Run tests (release)
run: |
make -j test BUILD=release
make clean
- name: Run tests (code coverage)
working-directory: test
run: |
make -j coverage BUILD=debug
bash <(curl -s https://codecov.io/bash)
make -C .. clean
- name: Run example programs
run: |
make examples
ldd bin/platform_query
./bin/platform_query
./bin/sum
./bin/nbody
Intel:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Install ifort from cache
id: cache-intel
uses: actions/cache@v2
with:
path: |
/opt/intel/oneapi/compiler
/opt/intel/oneapi/setvars.sh
/tmp/opencl_runtime.tgz
key: intel-cache-v2
- name: Download Intel OpenCL SDK
if: steps.cache-intel.outputs.cache-hit != 'true'
run: |
wget -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17206/intel_sdk_for_opencl_applications_2020.3.494.tar.gz -O /tmp/opencl_runtime.tgz
- name: Install Intel OpenCL SDK
run: |
tar -xzf /tmp/opencl_runtime.tgz -C /tmp
sed 's/decline/accept/g' -i /tmp/intel_sdk_for_opencl_applications_2020.3.494/silent.cfg
sudo /tmp/intel_sdk_for_opencl_applications_2020.3.494/install.sh -s /tmp/intel_sdk_for_opencl_applications_2020.3.494/silent.cfg
- name: Install ifort with apt
if: steps.cache-intel.outputs.cache-hit != 'true'
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-ifort
sudo rm -rf /opt/intel/oneapi/compiler/latest/linux/lib/emu
sudo rm -rf /opt/intel/oneapi/compiler/latest/linux/lib/oclfpga
- name: Setup ifort env
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
ifort --version
- name: Run tests (debug)
run: |
make -j test BUILD=debug FC=ifort
make clean
- name: Run tests (release)
run: |
make -j test BUILD=release FC=ifort
make clean
- name: Run example programs
run: |
pushd examples
make FC=ifort
popd
ldd bin/platform_query
./bin/platform_query
./bin/sum
./bin/nbody