Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: sign macOS builds #988

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
6 changes: 3 additions & 3 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
- "be_cmd update-all-repos -- node replay_build_scripts/update-all-repos.mjs"
- "pushd ../backend"
- "be_cmd buck2-kill -- buck2 kill"
- "be_cmd buck2-build -- buck2 build --console simple //:chromium"
- "be_cmd buck2-build -- buck2 build --console simple //:upload-chromium"
- "popd"
env:
GOMA_SERVER_HOST: simpsonite.goma.engflow.com
Expand Down Expand Up @@ -51,7 +51,7 @@ steps:
- "be_cmd update-all-repos -- node replay_build_scripts/update-all-repos.mjs"
- "pushd ../backend"
- "be_cmd buck2-kill -- buckle kill"
- "be_cmd buck2-build -- buckle build --console simple //:chromium"
- "be_cmd buck2-build -- buckle build --console simple //:upload-chromium"
- "popd"
env:
GOMA_SERVER_HOST: simpsonite.goma.engflow.com
Expand Down Expand Up @@ -81,7 +81,7 @@ steps:
- "be_cmd update-all-repos -- node replay_build_scripts/update-all-repos.mjs"
- "pushd ../backend"
- "be_cmd buck2-kill -- buckle kill"
- "be_cmd buck2-build -- buckle build --console simple //:chromium"
- "be_cmd buck2-build -- buckle build --console simple //:upload-chromium"
- "popd"
env:
GOMA_SERVER_HOST: simpsonite.goma.engflow.com
Expand Down
2 changes: 1 addition & 1 deletion REPLAY_BACKEND_REV
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12ba81f2625a89585e53a210f211eb0380832039
4cba30f266a40b8ff35a6f87e81ab7b5bfa022ff
10 changes: 10 additions & 0 deletions buildMac.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
// Script used by buildkite to build Chromium for macOS in CI
import fs from "fs";
import path from "path";
import { spawnChecked } from "./replay_build_scripts/common.mjs";

const buildArm = !!process.env.REPLAY_BUILD_ARM;
const outdir = buildArm ? "out/Release-ARM" : "out/Release";

spawnChecked("node", ["build.js"], { stdio: "inherit" });
fs.rmSync(path.join(outdir, "Replay-Chromium.app"), {
recursive: true,
force: true,
});
fs.renameSync("out/Release/Chromium.app", "out/Release/Replay-Chromium.app");
33 changes: 0 additions & 33 deletions replay_build_scripts/upload_build_artifacts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ function prepareLinuxBinaries(buildId) {
const buildIdArchive = `${buildId}.tar.xz`;
const buildArchive = "linux-chromium.tar.xz";

spawnChecked("rm", ["-rf", "replay-chromium"], { stdio: "inherit" });

fs.mkdirSync("replay-chromium");

copyBuildFiles("out/Release", "replay-chromium");

// Parallel build (requires xz), unlimited cores, w/ reasonable compression.
spawnChecked(
"tar",
Expand Down Expand Up @@ -163,29 +157,6 @@ function prepareMacOSBinaries(buildId) {
const buildIdDmgArchive = buildArm ? `${buildId}-arm.dmg` : `${buildId}.dmg`;
const dmgArchive = buildArm ? "macos-chromium-arm.dmg" : "macos-chromium.dmg";
const outdir = buildArm ? "out/Release-ARM" : "out/Release";
fs.rmSync(path.join(outdir, "Replay-Chromium.app"), {
recursive: true,
force: true,
});
fs.renameSync(
path.join(outdir, "Chromium.app"),
path.join(outdir, "Replay-Chromium.app")
);
spawnChecked(
"hdiutil",
[
"create",
path.join(process.cwd(), buildIdDmgArchive),
"-ov",
"-volname",
"Replay-Chromium",
"-fs",
"HFS+",
"-srcfolder",
"Replay-Chromium.app",
],
{ cwd: outdir, stdio: "inherit" }
);
const buildIdTarArchive = buildArm
? `${buildId}-arm.tar.xz`
: `${buildId}.tar.xz`;
Expand All @@ -198,10 +169,6 @@ function prepareMacOSBinaries(buildId) {
["cfJ", path.join(process.cwd(), buildIdTarArchive), "Replay-Chromium.app"],
{ cwd: outdir }
);
fs.renameSync(
path.join(outdir, "Replay-Chromium.app"),
path.join(outdir, "Chromium.app")
);

fs.cpSync(buildIdDmgArchive, dmgArchive);
fs.cpSync(buildIdTarArchive, tarArchive);
Expand Down