forked from cloudflare/wirefilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cfsetup.yaml
90 lines (88 loc) · 3.01 KB
/
cfsetup.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
everything: &everything
build: &build
builddeps: &builddeps
? rust
? cargo-deb
pre-cache-copy-paths: &paths
- engine/Cargo.toml
- ffi/Cargo.toml
- ffi/tests/ctests/Cargo.toml
- fuzz/bytes/Cargo.toml
- fuzz/map-keys/Cargo.toml
- wasm/Cargo.toml
- wirefilter-parser/Cargo.toml
- Cargo.lock
- Cargo.toml
- cfsetup-cargo.sh
pre-cache:
- ./cfsetup-cargo.sh prebuild --release --target x86_64-unknown-linux-gnu
post-cache:
- cd ffi
- ../cfsetup-cargo.sh build --release --target x86_64-unknown-linux-gnu --frozen --offline
- ../cfsetup-cargo.sh deb --no-build --target x86_64-unknown-linux-gnu -- --frozen --offline
artifacts:
- /var/lib/cargo/target/x86_64-unknown-linux-gnu/debian/*.deb
build-arm64:
builddeps:
<<: *builddeps
? crossbuild-essential-arm64
pre-cache-copy-paths: *paths
pre-cache:
- ./cfsetup-cargo.sh prebuild --release --target aarch64-unknown-linux-gnu
post-cache:
- cd ffi
- ../cfsetup-cargo.sh build --release --target aarch64-unknown-linux-gnu --frozen --offline
- ../cfsetup-cargo.sh deb --no-build --target aarch64-unknown-linux-gnu -- --frozen --offline
artifacts:
- /var/lib/cargo/target/aarch64-unknown-linux-gnu/debian/*.deb
build-wasm:
builddeps: &wasm-deps
- rust
- wasm-pack
- nodejs
- libssl-dev
- pkg-config
pre-cache-copy-paths: *paths
pre-cache:
- ./cfsetup-cargo.sh prebuild --target wasm32-unknown-unknown
post-cache:
- ./cfsetup-cargo.sh wasm-pack wasm --debug --mode no-install --target browser --scope cloudflare
artifacts: &wasm-artifacts
- wasm/pkg/*.tgz
publish-wasm:
builddeps: *wasm-deps
pre-cache-copy-paths: *paths
pre-cache:
# Cargo doesn't currently allow overriding profile config per target, so use RUSTFLAGS instead:
- export RUSTFLAGS="-C opt-level=z -C codegen-units=1"
- ./cfsetup-cargo.sh prebuild --release --target wasm32-unknown-unknown
post-cache:
- export RUSTFLAGS="-C opt-level=z -C codegen-units=1"
- ./cfsetup-cargo.sh wasm-pack wasm --mode no-install --target browser --scope cloudflare
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- npm publish wasm/pkg/*.tgz
artifacts: *wasm-artifacts
test:
builddeps:
- rust
pre-cache-copy-paths: *paths
pre-cache: &test-pre-cache
- ./cfsetup-cargo.sh prebuild
post-cache:
- ./cfsetup-cargo.sh test --frozen
- ./cfsetup-cargo.sh clippy --all-targets --frozen
- ./cfsetup-cargo.sh fmt -- --check
ci-test:
builddeps:
- rust
- cargo-to-teamcity
pre-cache-copy-paths: *paths
pre-cache: *test-pre-cache
post-cache:
- ./cfsetup-cargo.sh test --frozen | cargo-to-teamcity
- ./cfsetup-cargo.sh clippy --all-targets --frozen -- -D clippy
- ./cfsetup-cargo.sh fmt -- --check
buster: *everything
stretch: *everything
buster: *everything
default-flavor: buster