-
Notifications
You must be signed in to change notification settings - Fork 2
280 lines (240 loc) · 10.5 KB
/
build_and_test.yml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
name: Build and run tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
# ---
# Linux jobs
# ---
build_ubuntu_mkl2019:
name: Test on Ubuntu (MKL 2019.5)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install MKL
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
sudo apt update
sudo apt install intel-mkl-64bit-2019.5-075
- name: Update Rust
run: rustup update
- name: Build
run: |
source /opt/intel/mkl/bin/mklvars.sh intel64
cargo build --verbose
- name: Run tests (--features "dss")
run: |
source /opt/intel/mkl/bin/mklvars.sh intel64
cargo test --verbose
- name: Build (--release)
run: |
source /opt/intel/mkl/bin/mklvars.sh intel64
cargo build --release --verbose
- name: Run tests (--release)
run: |
source /opt/intel/mkl/bin/mklvars.sh intel64
cargo test --release --verbose
build_ubuntu_mkl2020:
name: Test on Ubuntu (MKL 2020.1)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install MKL
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
sudo apt update
sudo apt install intel-mkl-64bit-2020.1-102
- name: Update Rust
run: rustup update
- name: Build
run: |
source /opt/intel/mkl/bin/mklvars.sh intel64
cargo build --verbose
- name: Run tests (--features "dss")
run: |
source /opt/intel/mkl/bin/mklvars.sh intel64
cargo test --verbose
- name: Build (--release)
run: |
source /opt/intel/mkl/bin/mklvars.sh intel64
cargo build --release --verbose
- name: Run tests (--release)
run: |
source /opt/intel/mkl/bin/mklvars.sh intel64
cargo test --release --verbose
# ---
# Windows jobs
# ---
build_windows_mkl2019:
name: Test on Windows (MKL 2019.5)
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# Caching of MKL and clang does not work due to cache size limitations of Github
# - name: Cache MKL installation
# id: cache-mkl-installation
# uses: actions/cache@v1
# with:
# path: mkl
# key: ${{ runner.os }}-mkl-installed-w_mkl_2019.5.281
- name: Download MKL installer
#if: steps.cache-mkl-installation.outputs.cache-hit != 'true'
run: (New-Object System.Net.WebClient).DownloadFile("http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15806/w_mkl_2019.5.281.exe", "$(($pwd).path)\w_mkl_2019.5.281.exe")
shell: pwsh
- name: Extract MKL installer files
#if: steps.cache-mkl-installation.outputs.cache-hit != 'true'
run: Start-Process .\w_mkl_2019.5.281.exe -ArgumentList @("--silent", "--extract-folder", "$(($pwd).path)\mkl-installer", "--extract-only") -Wait
shell: pwsh
- name: Install MKL
#if: steps.cache-mkl-installation.outputs.cache-hit != 'true'
run: Start-Process .\mkl-installer\install.exe -ArgumentList @("install", "--output=$(($pwd).path)\log.txt", "--eula=accept", "--installdir=$(($pwd).path)\mkl") -Wait
shell: pwsh
# - name: Show log
# if: steps.cache-mkl-installation.outputs.cache-hit != 'true'
# run: gc "$(($pwd).path)\log.txt"
# shell: pwsh
# - name: Find "mklvars.bat"
# run: ls -r -ea silentlycontinue -fo -inc "mklvars.bat" | % { $_.fullname }
# shell: pwsh
# - name: Run mklvars.bat
# run: .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
# shell: pwsh
# - name: Cache Clang installation
# id: cache-clang-installation
# uses: actions/cache@v1
# with:
# path: clang
# key: ${{ runner.os }}-clang-installed-LLVM-9.0.0-win64
- name: Download Clang
#if: steps.cache-clang-installation.outputs.cache-hit != 'true'
run: (New-Object System.Net.WebClient).DownloadFile("https://releases.llvm.org/9.0.0/LLVM-9.0.0-win64.exe", "$(($pwd).path)\LLVM-9.0.0-win64.exe")
shell: pwsh
- name: Install Clang
#if: steps.cache-clang-installation.outputs.cache-hit != 'true'
run: Start-Process .\LLVM-9.0.0-win64.exe -ArgumentList @("/S", "/NCRC", "/D=$(($pwd).path)\clang") -Wait
shell: pwsh
# - name: Test Clang version
# run: .\clang\bin\clang.exe --version
# shell: pwsh
# - name: Find "clang.dll"
# run: ls -r -ea silentlycontinue -fo -inc "libclang.dll" | % { $_.fullname }
# shell: pwsh
# - name: Download rustup-init
# run: (New-Object System.Net.WebClient).DownloadFile("https://win.rustup.rs/", "$(($pwd).path)\rustup-init.exe")
# shell: pwsh
# - name: Install Rust
# run: .\rustup-init.exe -y --quiet
# shell: pwsh
# - name: Test Rust version
# run: $env:Path = "$env:USERPROFILE\.cargo\bin;$env:Path"; rustc.exe --version
# shell: pwsh
- name: Update Rust
run: rustup update
shell: pwsh
# The following steps have to be run in CMD in order to get the environment variables from the .bat scripts
- name: Build
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
set LIBCLANG_PATH=%cd%\clang\bin
cargo build --verbose
shell: cmd
- name: Run tests
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
set LIBCLANG_PATH=%cd%\clang\bin
cargo test --verbose
shell: cmd
- name: Build (--release)
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
set LIBCLANG_PATH=%cd%\clang\bin
cargo build --release --verbose
shell: cmd
- name: Run tests (--release)
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
set LIBCLANG_PATH=%cd%\clang\bin
cargo test --release --verbose
shell: cmd
build_windows_mkl2020:
name: Test on Windows (MKL 2020.1)
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# Caching of MKL and clang does not work due to cache size limitations of Github
# - name: Cache MKL installation
# id: cache-mkl-installation
# uses: actions/cache@v1
# with:
# path: mkl
# key: ${{ runner.os }}-mkl-installed-w_mkl_2020.0.166
- name: Download MKL installer
#if: steps.cache-mkl-installation.outputs.cache-hit != 'true'
run: (New-Object System.Net.WebClient).DownloadFile("http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16543/w_mkl_2020.1.216.exe", "$(($pwd).path)\w_mkl_2020.1.216.exe")
shell: pwsh
- name: Extract MKL installer files
#if: steps.cache-mkl-installation.outputs.cache-hit != 'true'
run: Start-Process .\w_mkl_2020.1.216.exe -ArgumentList @("--silent", "--extract-folder", "$(($pwd).path)\mkl-installer", "--extract-only") -Wait
shell: pwsh
- name: Install MKL
#if: steps.cache-mkl-installation.outputs.cache-hit != 'true'
run: Start-Process .\mkl-installer\install.exe -ArgumentList @("install", "--output=$(($pwd).path)\log.txt", "--eula=accept", "--installdir=$(($pwd).path)\mkl") -Wait
shell: pwsh
# - name: Cache Clang installation
# id: cache-clang-installation
# uses: actions/cache@v1
# with:
# path: clang
# key: ${{ runner.os }}-clang-installed-LLVM-9.0.0-win64
- name: Download Clang
#if: steps.cache-clang-installation.outputs.cache-hit != 'true'
run: (New-Object System.Net.WebClient).DownloadFile("https://releases.llvm.org/9.0.0/LLVM-9.0.0-win64.exe", "$(($pwd).path)\LLVM-9.0.0-win64.exe")
shell: pwsh
- name: Install Clang
#if: steps.cache-clang-installation.outputs.cache-hit != 'true'
run: Start-Process .\LLVM-9.0.0-win64.exe -ArgumentList @("/S", "/NCRC", "/D=$(($pwd).path)\clang") -Wait
shell: pwsh
- name: Update Rust
run: rustup update
shell: pwsh
# The following steps have to be run in CMD in order to get the environment variables from the .bat scripts
- name: Build
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
set LIBCLANG_PATH=%cd%\clang\bin
cargo build --verbose
shell: cmd
- name: Run tests
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
set LIBCLANG_PATH=%cd%\clang\bin
cargo test --verbose
shell: cmd
- name: Build (--release)
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
set LIBCLANG_PATH=%cd%\clang\bin
cargo build --release --verbose
shell: cmd
- name: Run tests (--release)
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call .\mkl\compilers_and_libraries\windows\mkl\bin\mklvars.bat intel64
set LIBCLANG_PATH=%cd%\clang\bin
cargo test --release --verbose
shell: cmd