Skip to content

Commit

Permalink
ci: only run Wasm tests once a PR reaches the merge queue (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhess authored Apr 8, 2024
2 parents 94a164c + 6142212 commit 8644ea1
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .buildkite/primer-wasm.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
# Note: because they take so much time to run, we only run the Primer
# Wasm tests when one of these conditions is true:
#
# 1. The PR has hit the merge queue.
# 2. The PR has the "Run Wasm tests" label.

agents:
queue: "nix-build"
os: "linux"

steps:
- label: ":haskell: :linux: Primer Wasm targets"
# Note: only one of these should run during any given build.
# Unfortunately, Buildkite doesn't support if-else conditionals, so
# this gets a bit tricky.

- label: ":haskell: :linux: Primer Wasm tests"
if: |
build.branch =~ /^gh-readonly-queue\// ||
build.pull_request.labels includes "Run Wasm tests"
command: |
nix develop .#wasm --print-build-logs --command make -f Makefile.wasm32 update
nix develop .#wasm --print-build-logs --command make -f Makefile.wasm32
nix develop .#wasm --print-build-logs --command make -f Makefile.wasm32 test
- label: ":haskell: :linux: Primer Wasm build"
if: |
build.branch !~ /^gh-readonly-queue\// &&
!(build.pull_request.labels includes "Run Wasm tests")
command: |
nix develop .#wasm --print-build-logs --command make -f Makefile.wasm32 update
nix develop .#wasm --print-build-logs --command make -f Makefile.wasm32

0 comments on commit 8644ea1

Please sign in to comment.