-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (111 loc) · 3.96 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
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
name: Build and run unit tests on all components
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-all-linux:
runs-on: ubuntu-latest
name: Build and test all on Linux
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: actions/checkout@v3
- name: Install npm dependencies
run: cd crates/node-service-web/frontend && npm install
- name: Build the frontend
run: cd crates/node-service-web/frontend && npm run build
- name: Build release
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- name: Run loom tests
run: LOOM_MAX_PREEMPTIONS=5 RUSTFLAGS='--cfg loom' cargo test -p pluto-utils --release
- uses: actions/upload-artifact@v3
with:
name: linux-coordinator
path: target/release/pluto-coordinator
- uses: actions/upload-artifact@v3
with:
name: linux-node
path: target/release/pluto-node-service-web
build-client-windows:
runs-on: windows-2019
name: Build and test client on Windows
env:
SQLITE3_LIB_DIR: "C:\\sqlite"
steps:
- name: "Install SQLite"
shell: cmd
run: |
mkdir C:\sqlite
CD /D C:\sqlite
curl -fsS --retry 3 --retry-connrefused -o sqlite3.zip https://sqlite.org/2022/sqlite-dll-win64-x64-3380500.zip
7z e sqlite3.zip -y
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
lib /machine:x64 /def:sqlite3.def /out:sqlite3.lib
set PATH=%PATH%;C:\sqlite
echo "##vso[task.setvariable variable=PATH;]%PATH%;C:\sqlite"
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: actions/checkout@v3
- name: Install npm dependencies
run: cd crates/node-service-web/frontend && npm install
- name: Build the frontend
run: cd crates/node-service-web/frontend && npm run build
- name: Build release
run: cargo build --release --verbose --workspace --exclude pluto-coordinator
- name: Run tests
run: cargo test --verbose --workspace --exclude pluto-coordinator
- name: Run loom tests
run: $env:LOOM_MAX_PREEMPTIONS=5; $env:RUSTFLAGS="--cfg loom"; cargo test -p pluto-utils --release
- uses: actions/upload-artifact@v3
with:
name: windows-node
path: target/release/pluto-node-service-web.exe
build-client-mac:
runs-on: macos-latest
name: Build and test client on macOS
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: actions/checkout@v3
- name: Install npm dependencies
run: cd crates/node-service-web/frontend && npm install
- name: Build the frontend
run: cd crates/node-service-web/frontend && npm run build
- name: Build release
run: cargo build --release --verbose --workspace --exclude pluto-coordinator
- name: Run tests
run: cargo test --verbose --workspace --exclude pluto-coordinator
- name: Run loom tests
run: LOOM_MAX_PREEMPTIONS=5 RUSTFLAGS='--cfg loom' cargo test -p pluto-utils --release
- uses: actions/upload-artifact@v3
with:
name: macos-node
path: target/release/pluto-node-service-web
miri-linux:
name: Test with Miri on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install npm dependencies
run: cd crates/node-service-web/frontend && npm install
- name: Build the frontend
run: cd crates/node-service-web/frontend && npm run build
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- name: Test with Miri
run: cargo miri test --verbose