-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (95 loc) · 2.98 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get install -y libasound2-dev libsndfile-dev
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build
- name: Test
run: cargo test --all
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: brew install libsndfile
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build
- name: Test
run: cargo test --all
windows:
runs-on: windows-latest
env:
LLVM_PATH: C:/temp/llvm
steps:
- uses: actions/checkout@v2
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v2
with:
path: ${{ env.LLVM_PATH }}
key: llvm-11.0
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "11.0"
directory: ${{ env.LLVM_PATH }}
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Install dependencies
run: choco install -y libsndfile
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
env:
CPLUS_INCLUDE_PATH: C:\Program Files\libsndfile\include
LIBSNDFILE_PATH: C:/Program Files/libsndfile/lib
LIBCLANG_PATH: ${{ env.LLVM_PATH }}/lib
LLVM_CONFIG_PATH: ${{ env.LLVM_PATH }}/bin/llvm-config
run: |
$Env:Path="C:\msys64\mingw64\bin;$Env:Path"
rustup target add x86_64-pc-windows-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
cargo build --target x86_64-pc-windows-gnu
- name: Test
env:
CPLUS_INCLUDE_PATH: C:\Program Files\libsndfile\include
LIBSNDFILE_PATH: C:/Program Files/libsndfile/lib
LIBCLANG_PATH: ${{ env.LLVM_PATH }}/lib
LLVM_CONFIG_PATH: ${{ env.LLVM_PATH }}/bin/llvm-config
run: |
$Env:Path="C:\msys64\mingw64\bin;$Env:Path;~\.rustup\toolchains\stable-x86_64-pc-windows-gnu\bin"
rustup target add x86_64-pc-windows-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
cargo test --target x86_64-pc-windows-gnu # cargo test --all doesn't work in CI