forked from cloudflare/wirefilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcfsetup.yaml
70 lines (69 loc) · 2.17 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
everything: &everything
build: &build
builddeps:
- rust
- cargo-deb
pre-cache-copy-paths: &paths
- engine/Cargo.toml
- ffi/Cargo.toml
- wasm/Cargo.toml
- Cargo.lock
- Cargo.toml
- cfsetup-cargo.sh
pre-cache:
- ./cfsetup-cargo.sh prebuild --release
post-cache:
- cd ffi
- sudo ../cfsetup-cargo.sh deb -- --release --frozen
artifacts:
- /var/lib/cargo/target/debian/*.deb
build-arm64:
<<: *build
target-arch: arm64
build-wasm:
builddeps: &wasm-deps
- rust
- wasm-pack
- nodejs
pre-cache-copy-paths: *paths
pre-cache:
- ./cfsetup-cargo.sh prebuild --target wasm32-unknown-unknown
post-cache:
- sudo ./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"
- sudo ./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:
- sudo ./cfsetup-cargo.sh test --frozen
- sudo ./cfsetup-cargo.sh clippy --all-targets --frozen
- sudo ./cfsetup-cargo.sh fmt -- --check
ci-test:
builddeps:
- rust
- cargo-to-teamcity
pre-cache-copy-paths: *paths
pre-cache: *test-pre-cache
post-cache:
- sudo ./cfsetup-cargo.sh test --frozen | cargo-to-teamcity
- sudo ./cfsetup-cargo.sh clippy --all-targets --frozen -- -D clippy
- sudo ./cfsetup-cargo.sh fmt -- --check
stretch: *everything
jessie: *everything