Skip to content

Commit 4ce077a

Browse files
committed
chore: build examples as part of CICD
Signed-off-by: Martijn Swaagman <[email protected]>
1 parent 2cc3ea6 commit 4ce077a

File tree

3 files changed

+25
-92
lines changed

3 files changed

+25
-92
lines changed

.github/workflows/rust.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ jobs:
7777
export PATH=$PATH:$(go env GOPATH)/bin
7878
buildifier -mode=check WORKSPACE
7979
buildifier -mode=check BUILD
80-
buildifier -mode=check examples/BUILD
8180
8281
- name: Format (cargo raze)
8382
run: |
@@ -251,3 +250,28 @@ jobs:
251250
run: |
252251
cp -p bazel/cargo/Cargo.raze.lock .
253252
cargo audit
253+
254+
examples:
255+
runs-on: ubuntu-latest
256+
env:
257+
RUSTFLAGS: -D warnings -C link-args=-S
258+
strategy:
259+
matrix:
260+
example: ['hello_world', 'http_auth_random', 'http_body', 'http_config', 'http_headers']
261+
defaults:
262+
run:
263+
working-directory: ./examples/${{ matrix.example }}
264+
steps:
265+
- uses: actions/checkout@v2
266+
- name: Format (rustfmt)
267+
run: cargo fmt -- --check
268+
- name: Format (manifest)
269+
run: cargo verify-project
270+
- run: cargo audit
271+
- run: cargo outdated --root-deps-only --exit-code 1
272+
- name: Clippy (wasm32-unknown-unknown)
273+
run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown
274+
- name: Build (wasm32-unknown-unknown)
275+
run: cargo build --release --all-targets --target=wasm32-unknown-unknown
276+
- name: Build (wasm32-wasi)
277+
run: cargo build --release --all-targets --target=wasm32-wasi

Cargo.toml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,3 @@ panic = "abort"
2626
package_aliases_dir = "bazel/cargo"
2727
workspace_path = "//bazel/cargo"
2828
genmode = "Remote"
29-
30-
# [[example]]
31-
# name = "hello_world"
32-
# path = "examples/hello_world/src/lib.rs"
33-
# crate-type = ["cdylib"]
34-
35-
# [[example]]
36-
# name = "http_auth_random"
37-
# path = "examples/http_auth_random.rs"
38-
# crate-type = ["cdylib"]
39-
40-
# [[example]]
41-
# name = "http_headers"
42-
# path = "examples/http_headers.rs"
43-
# crate-type = ["cdylib"]
44-
45-
# [[example]]
46-
# name = "http_body"
47-
# path = "examples/http_body.rs"
48-
# crate-type = ["cdylib"]
49-
50-
# [[example]]
51-
# name = "http_config"
52-
# path = "examples/http_config.rs"
53-
# crate-type = ["cdylib"]

examples/BUILD

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)