diff --git a/.buildkite/ci.mjs b/.buildkite/ci.mjs index 7b07dafb47..9969aacb79 100755 --- a/.buildkite/ci.mjs +++ b/.buildkite/ci.mjs @@ -621,6 +621,21 @@ function getReleaseStep(buildPlatforms, options) { }; } +/** + * @returns {Step} + */ +function getBenchmarkStep() { + return { + key: "benchmark", + label: "📊", + agents: { + queue: "build-zig", + }, + command: "bun .buildkite/scripts/upload-benchmark.ts", + depends_on: [`linux-x64-build-bun`], + }; +} + /** * @typedef {Object} Pipeline * @property {Step[]} [steps] @@ -1099,6 +1114,8 @@ async function getPipeline(options = {}) { steps.push(getReleaseStep(buildPlatforms, options)); } + steps.push(getBenchmarkStep()); + /** @type {Map} */ const stepsByGroup = new Map(); diff --git a/.buildkite/scripts/upload-benchmark.ts b/.buildkite/scripts/upload-benchmark.ts new file mode 100644 index 0000000000..eb98acd464 --- /dev/null +++ b/.buildkite/scripts/upload-benchmark.ts @@ -0,0 +1,7 @@ +import { getCommit, getSecret } from "../../scripts/utils.mjs"; + +console.log("Submitting..."); +const response = await fetch(getSecret("BENCHMARK_URL") + "?tag=_&commit=" + getCommit() + "&artifact_url=_", { + method: "POST", +}); +console.log("Got status " + response.status);