-
Notifications
You must be signed in to change notification settings - Fork 19
140 lines (136 loc) · 4.63 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
138
139
140
on:
push:
branches:
- master
pull_request:
jobs:
check:
runs-on: ubuntu-latest
name: formatting and linting
steps:
- name: checkout
uses: actions/checkout@v2
- name: provision
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings
build-validator:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
name: build validator
steps:
- name: Checkout steinbergmedia/vst3sdk
uses: actions/checkout@v2
with:
repository: steinbergmedia/vst3sdk
ref: 0908f475f52af56682321192d800ef25d1823dd2
path: vst3sdk
submodules: recursive
- name: Compile validator (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: mkdir build && cd build && cmake -GXcode ../vst3sdk && cmake --build . --config Debug --target validator
- name: Persist validator (macOS)
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v2
with:
name: validator-macos
path: build/bin/Debug/validator
- name: Compile validator (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: mkdir build &&
cd build && cmake -G "Visual Studio 16 2019" -A x64 ../vst3sdk &&
cmake --build . --config Debug --target validator
- name: Persist validator (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v2
with:
name: validator-win
path: build\bin\Debug\validator.exe
- name: Install validator dependencies (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install cmake gcc libstdc++6 libx11-xcb-dev libxcb-util-dev
libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev
libfontconfig1-dev libcairo2-dev libgtkmm-3.0-dev libsqlite3-dev libxcb-keysyms1-dev
- name: Compile validator (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: mkdir build && cd build && cmake ../vst3sdk && cmake --build . --config Debug --target validator
- name: Persist validator (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: validator-linux
path: build/bin/Debug/validator
validate:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
plugin: [again, passthru]
runs-on: ${{ matrix.os }}
needs: [build-validator]
name: validate
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: davidB/rust-cargo-make@v1
- name: Make plugin
uses: actions-rs/cargo@v1
with:
command: make
args: ${{ matrix.plugin }}
- name: Restore validator (macOS)
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/download-artifact@v2
with:
name: validator-macos
- name: Validate plugin (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: sudo chmod +x validator && ./validator target/debug/${{ matrix.plugin }}.vst3
- name: Restore validator (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/download-artifact@v2
with:
name: validator-win
- name: Validate plugin (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: .\validator.exe target\debug\${{ matrix.plugin }}.vst3
- name: Restore validator (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/download-artifact@v2
with:
name: validator-linux
- name: Validate plugin (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo chmod +x validator && ./validator target/debug/${{ matrix.plugin }}.vst3
test:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
name: test
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: actions-rs/cargo@v1
with:
command: test
args: --all