-
Notifications
You must be signed in to change notification settings - Fork 8
125 lines (105 loc) · 3.65 KB
/
test.yml
File metadata and controls
125 lines (105 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: fpm test
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
gfortran-nix:
runs-on: ubuntu-latest
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
./bin/platform_query
./bin/sum
./bin/nbody
Intel:
runs-on: ubuntu-latest
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
./bin/platform_query
./bin/sum
./bin/nbody