From 84c088df670c7af56620c35d5f1ef9f4f7a4281d Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Wed, 27 Dec 2023 07:10:25 -0500 Subject: [PATCH] Add wasm targets to the build test in the CI. --- .lighthouse/pipeline-rust-build.yaml | 48 ++++++++++++++++++++++++++++ docker/organic_build/Dockerfile | 1 + 2 files changed, 49 insertions(+) diff --git a/.lighthouse/pipeline-rust-build.yaml b/.lighthouse/pipeline-rust-build.yaml index d38280b9..b21ce7e7 100644 --- a/.lighthouse/pipeline-rust-build.yaml +++ b/.lighthouse/pipeline-rust-build.yaml @@ -192,6 +192,54 @@ spec: ] - name: docker-image value: "$(params.image-name):$(tasks.fetch-repository.results.commit)" + - name: run-image-wasm + taskRef: + name: run-docker-image + workspaces: + - name: source + workspace: git-source + - name: cargo-cache + workspace: cargo-cache + runAfter: + - run-image-all + params: + - name: args + value: + [ + "--target", + "wasm32-unknown-unknown", + "--profile", + "wasm", + "--bin", + "wasm", + "--no-default-features", + "--features", + "wasm", + ] + - name: docker-image + value: "$(params.image-name):$(tasks.fetch-repository.results.commit)" + - name: run-image-wasm-test + taskRef: + name: run-docker-image + workspaces: + - name: source + workspace: git-source + - name: cargo-cache + workspace: cargo-cache + runAfter: + - run-image-wasm + params: + - name: args + value: + [ + "--bin", + "wasm_test", + "--no-default-features", + "--features", + "wasm_test", + ] + - name: docker-image + value: "$(params.image-name):$(tasks.fetch-repository.results.commit)" finally: - name: report-success when: diff --git a/docker/organic_build/Dockerfile b/docker/organic_build/Dockerfile index fdf38f43..39a74ccb 100644 --- a/docker/organic_build/Dockerfile +++ b/docker/organic_build/Dockerfile @@ -2,5 +2,6 @@ FROM rustlang/rust:nightly-alpine3.17 RUN apk add --no-cache musl-dev RUN cargo install --locked --no-default-features --features ci-autoclean cargo-cache +RUN rustup target add wasm32-unknown-unknown ENTRYPOINT ["cargo", "build"]