-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (36 loc) · 1.38 KB
/
rust.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
name: Rust
on:
push:
branches: [ "main", "next", "refactor" ]
pull_request:
branches: [ "main", "next", "refactor" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: "Install Dependencies"
run: |
sudo apt-get purge --auto-remove cmake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -y install cmake
sudo apt-get -y install gcc-11 g++-11 build-essential ninja-build git file libopencv-dev uuid-dev libglfw3-dev libxinerama-dev libxcursor-dev libxi-dev
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 14
# - name: "Setup CUDA"
# uses: Jimver/[email protected]
# with:
# linux-local-args: '["--toolkit"]'
- name: "Run Tests"
run: |
RUST_BACKTRACE=full CC=clang-14 CXX=clang++-14 cargo test --verbose -- --nocapture
# - name: "Run CUDA Tests"
# run: CC=clang-14 CXX=clang++-14 LUISA_TEST_DEVICE=cuda cargo test --features cuda --verbose --release