-
Notifications
You must be signed in to change notification settings - Fork 737
137 lines (124 loc) · 4.27 KB
/
ci.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
# for github runner images, see: https://github.com/actions/runner-images?tab=readme-ov-file#available-images
name: CI
on:
push:
branches:
- develop
- pk-actions
workflow_dispatch:
schedule:
- cron: "0 12 * * *"
env:
python_bld_ver: 3.9
# ubuntu_test: ubuntu-latest
# mac_test: macOS-latest
# windows_test: windows-latest
jobs:
hello-world:
strategy:
matrix:
include:
- name: linux_release_64
image: ubuntu-20.04
asm: "-asm"
options: "-release_64"
artifact_name: "libebm_ubuntu_release_64"
- name: linux_debug_64
image: ubuntu-20.04
asm: ""
options: "-debug_64"
artifact_name: "libebm_ubuntu_debug_64"
- name: mac_release_64
image: macos-13
asm: "-asm"
options: "-release_64"
artifact_name: "libebm_mac_release_64"
- name: mac_debug_64
image: macos-13
asm: ""
options: "-debug_64"
artifact_name: "libebm_mac_debug_64"
- name: mac_release_arm
image: macos-14
asm: "-asm"
options: "-release_arm"
artifact_name: "libebm_mac_release_arm"
- name: mac_debug_arm
image: macos-14
asm: ""
options: "-debug_arm"
artifact_name: "libebm_mac_debug_arm"
- name: win_release_64
image: windows-2022
asm: ""
options: "-release_64"
artifact_name: "libebm_win_release_64"
- name: win_debug_64
image: windows-2022
asm: ""
options: "-debug_64"
artifact_name: "libebm_win_debug_64"
runs-on: ${{ matrix.image }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
if: startsWith(matrix.image, 'windows')
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Download CUDA installer
if: startsWith(matrix.image, 'windows')
run: |
python -c "from urllib.request import urlretrieve; urlretrieve('https://developer.download.nvidia.com/compute/cuda/11.2.2/network_installers/cuda_11.2.2_win10_network.exe', 'cuda_11.2.2_win10_network.exe')"
- name: Build on Windows
if: startsWith(matrix.image, 'windows')
run: |
$env:PATH += ';C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'
$env:CudaToolkitDir = 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2'
Start-Process -FilePath "cuda_11.2.2_win10_network.exe" -ArgumentList "-s nvcc_11.2 visual_studio_integration_11.2 cudart_11.2" -NoNewWindow -Wait
if ($LASTEXITCODE -ne 0) {
Write-Error "cuda_11.2.2_win10_network.exe FAILED"
exit 201
}
.\build.bat ${{ matrix.options }} ${{ matrix.asm }}
- name: Build on Linux
if: startsWith(matrix.image, 'ubuntu')
run: |
sudo apt --yes update
sudo apt --yes install nvidia-cuda-toolkit
/bin/sh ./build.sh ${{ matrix.options }} ${{ matrix.asm }}
- name: Build on macOS
if: startsWith(matrix.image, 'macOS')
run: |
/bin/sh ./build.sh ${{ matrix.options }} ${{ matrix.asm }}
- name: Publish native shared library
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifact_name }}
path: bld/lib
- name: Publish assembly x64
if: ${{ matrix.asm != '' }}
uses: actions/upload-artifact@v2
with:
name: asm-${{ matrix.artifact_name }}
path: bld/asm/
# jobs:
# bld:
# strategy:
# matrix:
# include:
# - name: linux_release_64
# image: ${{ env.ubuntu_bld }}
# asm: "-asm"
# options: "-release_64"
# artifact_name: "libebm_ubuntu_release_64"
# - name: linux_debug_64
# image: ${{ env.ubuntu_bld }}
# asm: ""
# options: "-debug_64"
# artifact_name: "libebm_ubuntu_debug_64"
# runs-on: ${{ matrix.image }}
# steps:
# - name: Check out repository
# uses: actions/checkout@v2