forked from edgedb/edgedb-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvagga.yaml
196 lines (170 loc) · 5.29 KB
/
vagga.yaml
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
commands:
make: !Command
description: Build the library
container: ubuntu
run: |
set -ex
cargo build --workspace --exclude=edgeql-pytest
cargo build -p edgeql-pytest
check: !Command
description: Check the library
container: ubuntu
run: |
set -ex
cargo build --workspace --exclude=edgedb-tokio
cargo build -p edgedb-tokio
cargo: !Command
description: Run arbitrary cargo command
symlink-name: cargo
container: ubuntu
run: [cargo]
cargo-expand: !Command
description: Print macro-expanded form for the crate
container: nightly
run: [cargo, rustc, "--", -Zunstable-options, --pretty=expanded]
test-rust: !Command
description: Run tests
container: ubuntu
run: |
set -ex
cargo test --workspace --exclude edgedb-tokio --all-features
cargo test -p edgedb-tokio --all-features
test-all-types: !Command
description: Run tests
container: ubuntu
work-dir: edgedb-protocol
run: [cargo, test, --features=all-types]
test-rust-no-features: !Command
description: Run tests
container: ubuntu
work-dir: edgedb-protocol
run: [cargo, test, --no-default-features]
test: !Command
description: Run tests
container: ubuntu
prerequisites: [test-rust, test-all-types, test-rust-no-features]
run: "echo OK"
_bulk: !Command
description: Run `bulk` command (for version bookkeeping)
container: ubuntu
run: [bulk]
server: !Command
description: Run edgedb server
container: ubuntu
run: [cargo, run, --bin, edgedb-server, '--',
'--data-dir', './tmp/db', '--log-level=debug',
'--postgres-dsn=postgres://edgedb@localhost:5432/template1?opt=val']
py: !Command
description: Build the python library and run python interpreter
container: ubuntu
run: |
set -ex
cargo build -p edgeql-python
export PYTHONPATH=/work/edgeql-pytest
python3.8 -i -c 'import edb._edgeql_rust' -v
pytest-main: !Command
description: Run binary from edgeql-pytest
container: ubuntu
run: [cargo, run, -p, edgeql-pytest]
tree: !Command
description: Run tree tool
container: ubuntu
run: [cargo, tree]
outdated: !Command
description: Run outdated tool
container: tools
run: [cargo, outdated]
fuzz: !Command
description: Run fuzz tool
container: tools
run: [cargo, fuzz]
example: !Command
description: Run named example
container: ubuntu
environ:
EDGEDB_INSECURE_DEV_MODE: 1
EDGEDB_HOST: localhost
run: [cargo, run, --example]
gen-errors: !Command
description: Generate error codes
container: ubuntu
run: |
set -ex
curl https://raw.githubusercontent.com/edgedb/edgedb/master/edb/api/errors.txt -o./errors.txt
cargo run --bin edgedb_gen_errors -- ./errors.txt
containers:
ubuntu:
setup:
- !Ubuntu focal
- !UbuntuPPA deadsnakes/ppa
- !AptTrust keys: [BA6932366A755776]
- !Install
- ca-certificates
- git
- build-essential
- vim
- musl-tools
# for cargo geiger
- libssl-dev
- pkg-config
# for \psql
- postgresql-client
# for gen-errors
- curl
- !TarInstall
url: "https://static.rust-lang.org/dist/rust-1.58.1-x86_64-unknown-linux-gnu.tar.gz"
script: "./install.sh --prefix=/usr \
--components=rustc,rust-std-x86_64-unknown-linux-gnu,cargo"
- !TarInstall
url: "https://static.rust-lang.org/dist/rust-std-1.58.1-x86_64-unknown-linux-musl.tar.gz"
script: "./install.sh --prefix=/musl \
--components=rust-std-x86_64-unknown-linux-musl"
- !Env RUSTFLAGS: -g
- !Sh 'ln -s /musl/lib/rustlib/x86_64-unknown-linux-musl /usr/lib/rustlib/x86_64-unknown-linux-musl'
- &bulk !Tar
url: "https://github.com/tailhook/bulk/releases/download/v0.4.10/bulk-v0.4.10.tar.gz"
sha256: 481513f8a0306a9857d045497fb5b50b50a51e9ff748909ecf7d2bda1de275ab
path: /
- !Sh 'cargo install cargo-nextest --root=/usr'
# edgedb itself for tests
- !Sh |
addgroup --system --gid 200 postgres
adduser --uid 200 --system --home /data --no-create-home \
--shell /bin/bash --group --gecos "PostgreSQL administrator" \
postgres
- !UbuntuRepo
url: https://packages.edgedb.com/apt
suite: focal
components: [main]
trusted: true
- !Install [edgedb-1]
environ: &environ
HOME: /work/target
CARGO_HOME: /work/target
RUST_BACKTRACE: 1
PYTHON_SYS_EXECUTABLE: /usr/bin/python3.8
EDGEDB_MAJOR_VERSION: 1
# needed for musl build
PATH: /musl/bin:/usr/local/bin:/usr/bin:/bin
LD_LIBRARY_PATH: /musl/lib/rustlib/x86_64-unknown-linux-musl/lib
volumes:
/tmp: !Tmpfs
size: 1G
tools:
setup:
- !Container ubuntu
- !Sh 'cargo install cargo-fuzz cargo-outdated --root=/usr'
environ: *environ
nightly:
setup:
- !Ubuntu xenial
- !Install
- ca-certificates
- build-essential
- !TarInstall
url: "https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz"
script: "./install.sh --prefix=/usr \
--components=rustc,rust-std-x86_64-unknown-linux-gnu,cargo"
environ:
HOME: /work/target
RUST_BACKTRACE: 1