-
Notifications
You must be signed in to change notification settings - Fork 2
152 lines (140 loc) · 4.53 KB
/
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
name: test
on:
workflow_dispatch:
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
cargo-fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Ubuntu build dependencies
run: sudo apt update && sudo apt install -y clang cmake
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check Style
run: cargo fmt --check
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Ubuntu build dependencies
if: matrix.platform == 'ubuntu-latest'
run: sudo apt update && sudo apt install -y clang cmake
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build
build-vulkan:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: sudo apt update && sudo apt install -y clang cmake ninja-build
- name: Install vulkan sdk
uses: humbletim/install-vulkan-sdk@c2aa128094d42ba02959a660f03e0a4e012192f9
with:
version: 1.3.250.1
cache: true
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --features vulkan
build-metal:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --features metal
build-cuda:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install cuda toolkit
uses: Jimver/[email protected]
- name: Install Windows dependencies
if: matrix.platform == 'windows-2022'
uses: ilammy/msvc-dev-cmd@v1
- name: Ubuntu build dependencies
if: matrix.platform == 'ubuntu-22.04'
run: sudo apt update && sudo apt install -y clang cmake
- uses: dtolnay/rust-toolchain@stable
- name: Build
env:
CUDA_COMPUTE_CAP: "75"
run: cargo build --features cublas
build-rocm:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Free Disk Space (Ubuntu) for Rocm
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Ubuntu build dependencies
run: sudo apt update && sudo apt install -y clang cmake
- name: Install Rocm Toolkit
run: |
wget https://repo.radeon.com/amdgpu-install/6.1.2/ubuntu/jammy/amdgpu-install_6.1.60102-1_all.deb
sudo apt install ./amdgpu-install_6.1.60102-1_all.deb
sudo apt update
sudo apt install -y rocm
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: |
source /opt/intel/oneapi/setvars.sh
cargo build --features hipblas
build-sycl:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Ubuntu build dependencies
run: sudo apt update && sudo apt install -y clang cmake
- name: Install oneAPI Toolkit
run: |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update && sudo apt install -y intel-basekit intel-hpckit
- uses: dtolnay/rust-toolchain@stable
- name: Build
run: |
source /opt/intel/oneapi/setvars.sh
cargo build --features sycl