-
Notifications
You must be signed in to change notification settings - Fork 47
111 lines (111 loc) · 4.4 KB
/
build.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
name: Build and test
on: push
jobs:
Linux-build:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install NVCC
run: |
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
yum install -y cuda-nvcc-11-1-11.1.105-1 cuda-cudart-devel-11-1-11.1.74-1
- name: Compile
run: |
PATH=$PATH:/usr/local/cuda-11.1/bin
CUDA_HOME=/usr/local/cuda-11.1
CUDA_ROOT=/usr/local/cuda-11.1
CUDA_PATH=/usr/local/cuda-11.1
CUDADIR=/usr/local/cuda-11.1
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.1/lib64
cd src/deepwave
cp /lib64/libgomp.so.1 .
./build_linux.sh
- name: Archive built libraries
uses: actions/upload-artifact@v3
with:
name: linux_libraries
path: src/deepwave/*.so*
MacOS-build:
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Compile
run: |
cd src/deepwave
./build_macos.sh
- name: Archive built libraries
uses: actions/upload-artifact@v3
with:
name: macos_libraries
path: src/deepwave/*.dylib
Windows-build:
runs-on: windows-2019
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install NVCC
run: |
curl https://developer.download.nvidia.com/compute/cuda/11.1.1/network_installers/cuda_11.1.1_win10_network.exe -o cuda_11.1.1_win10_network.exe
chmod +x ./cuda_11.1.1_win10_network.exe
./cuda_11.1.1_win10_network.exe -s nvcc_11.1 cudart_11.1
echo "CUDA_PATH=C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.1" >> $GITHUB_ENV
echo "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.1\\bin" >> $GITHUB_PATH
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Compile
run: |
cd src/deepwave
nuget install intelopenmp.devel.win -DirectDownload -NonInteractive
nuget install intelopenmp.redist.win -DirectDownload -NonInteractive
cp intelopenmp.devel.win*/lib/native/win-x64/libiomp5md.lib .
cp intelopenmp.redist.win*/runtimes/win-x86/native/libiomp5md.dll .
./build_windows.sh
- name: Archive built libraries
uses: actions/upload-artifact@v3
with:
name: windows_libraries
path: src/deepwave/*.dll
Test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
needs: [Linux-build, MacOS-build, Windows-build]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download built Linux libraries
uses: actions/download-artifact@v3
with:
name: linux_libraries
path: src/deepwave/
- name: Download built MacOS libraries
uses: actions/download-artifact@v3
with:
name: macos_libraries
path: src/deepwave/
- name: Download built Windows libraries
uses: actions/download-artifact@v3
with:
name: windows_libraries
path: src/deepwave/
- name: Set up Python
uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest scipy
python -m pip install .
- name: Test with pytest (full)
if: matrix.os == 'ubuntu-latest'
run: pytest
- name: Test with pytest (partial)
if: matrix.os != 'ubuntu-latest'
run: pytest tests/test_scalar.py