ci: Notarize in parallel (different flavor) (#41392)
Release Notes: - N/A --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com> Co-authored-by: Ben Kunkle <ben@zed.dev> Co-authored-by: Conrad Irwin <conrad@zed.dev>
This commit is contained in:
co-authored by
Conrad Irwin
Ben Kunkle
Conrad Irwin
parent
b9eafb80fd
commit
4cc6d6a398
@@ -1,5 +1,6 @@
|
||||
use crate::tasks::workflows::{
|
||||
nix_build::build_nix,
|
||||
run_bundling::bundle_mac,
|
||||
runners::{Arch, Platform},
|
||||
steps::NamedJob,
|
||||
vars::{mac_bundle_envs, windows_bundle_envs},
|
||||
@@ -33,7 +34,8 @@ pub fn release_nightly() -> Workflow {
|
||||
let style = check_style();
|
||||
let tests = run_tests(Platform::Mac);
|
||||
let windows_tests = run_tests(Platform::Windows);
|
||||
let bundle_mac = bundle_mac_nightly(&[&style, &tests]);
|
||||
let bundle_mac_x86 = bundle_mac_nightly(Arch::X86_64, &[&style, &tests]);
|
||||
let bundle_mac_arm = bundle_mac_nightly(Arch::ARM64, &[&style, &tests]);
|
||||
let linux_x86 = bundle_linux_nightly(Arch::X86_64, &[&style, &tests]);
|
||||
let linux_arm = bundle_linux_nightly(Arch::ARM64, &[&style, &tests]);
|
||||
let windows_x86 = bundle_windows_nightly(Arch::X86_64, &[&style, &windows_tests]);
|
||||
@@ -54,7 +56,8 @@ pub fn release_nightly() -> Workflow {
|
||||
&[&style, &tests],
|
||||
);
|
||||
let update_nightly_tag = update_nightly_tag_job(&[
|
||||
&bundle_mac,
|
||||
&bundle_mac_x86,
|
||||
&bundle_mac_arm,
|
||||
&linux_x86,
|
||||
&linux_arm,
|
||||
&windows_x86,
|
||||
@@ -70,7 +73,8 @@ pub fn release_nightly() -> Workflow {
|
||||
.add_job(style.name, style.job)
|
||||
.add_job(tests.name, tests.job)
|
||||
.add_job(windows_tests.name, windows_tests.job)
|
||||
.add_job(bundle_mac.name, bundle_mac.job)
|
||||
.add_job(bundle_mac_x86.name, bundle_mac_x86.job)
|
||||
.add_job(bundle_mac_arm.name, bundle_mac_arm.job)
|
||||
.add_job(linux_x86.name, linux_x86.job)
|
||||
.add_job(linux_arm.name, linux_arm.job)
|
||||
.add_job(windows_x86.name, windows_x86.job)
|
||||
@@ -127,19 +131,21 @@ fn run_tests(platform: Platform) -> NamedJob {
|
||||
}
|
||||
}
|
||||
|
||||
fn bundle_mac_nightly(deps: &[&NamedJob]) -> NamedJob {
|
||||
fn bundle_mac_nightly(arch: Arch, deps: &[&NamedJob]) -> NamedJob {
|
||||
let platform = Platform::Mac;
|
||||
let job = release_job(deps)
|
||||
.runs_on(runners::MAC_DEFAULT)
|
||||
.envs(mac_bundle_envs())
|
||||
.add_step(steps::checkout_repo())
|
||||
.add_step(steps::setup_node())
|
||||
.add_step(steps::setup_sentry())
|
||||
.add_step(steps::clear_target_dir_if_large(platform))
|
||||
.add_step(set_release_channel_to_nightly(platform))
|
||||
.add_step(steps::script("./script/bundle-mac"))
|
||||
.add_step(upload_zed_nightly(platform, Arch::ARM64));
|
||||
named::job(job)
|
||||
NamedJob {
|
||||
name: format!("bundle_mac_nightly_{arch}"),
|
||||
job: release_job(deps)
|
||||
.runs_on(runners::MAC_DEFAULT)
|
||||
.envs(mac_bundle_envs())
|
||||
.add_step(steps::checkout_repo())
|
||||
.add_step(steps::setup_node())
|
||||
.add_step(steps::setup_sentry())
|
||||
.add_step(steps::clear_target_dir_if_large(platform))
|
||||
.add_step(set_release_channel_to_nightly(platform))
|
||||
.add_step(bundle_mac(arch))
|
||||
.add_step(upload_zed_nightly(platform, arch)),
|
||||
}
|
||||
}
|
||||
|
||||
fn bundle_linux_nightly(arch: Arch, deps: &[&NamedJob]) -> NamedJob {
|
||||
@@ -216,8 +222,8 @@ fn add_rust_to_path() -> Step<Run> {
|
||||
|
||||
fn upload_zed_nightly(platform: Platform, arch: Arch) -> Step<Run> {
|
||||
match platform {
|
||||
Platform::Linux => named::bash("script/upload-nightly linux-targz"),
|
||||
Platform::Mac => named::bash("script/upload-nightly macos"),
|
||||
Platform::Linux => named::bash(&format!("script/upload-nightly linux-targz {arch}")),
|
||||
Platform::Mac => named::bash(&format!("script/upload-nightly macos {arch}")),
|
||||
Platform::Windows => {
|
||||
let cmd = match arch {
|
||||
Arch::X86_64 => "script/upload-nightly.ps1 -Architecture x86_64",
|
||||
|
||||
@@ -22,7 +22,8 @@ pub fn run_bundling() -> Workflow {
|
||||
.add_env(("RUST_BACKTRACE", "1"))
|
||||
.add_env(("ZED_CLIENT_CHECKSUM_SEED", vars::ZED_CLIENT_CHECKSUM_SEED))
|
||||
.add_env(("ZED_MINIDUMP_ENDPOINT", vars::ZED_SENTRY_MINIDUMP_ENDPOINT))
|
||||
.add_job("bundle_mac", bundle_mac())
|
||||
.add_job("bundle_mac_x86_64", bundle_mac_job(runners::Arch::X86_64))
|
||||
.add_job("bundle_mac_arm64", bundle_mac_job(runners::Arch::ARM64))
|
||||
.add_job("bundle_linux_x86_64", bundle_linux(runners::Arch::X86_64))
|
||||
.add_job("bundle_linux_arm64", bundle_linux(runners::Arch::ARM64))
|
||||
.add_job(
|
||||
@@ -44,7 +45,8 @@ fn bundle_job() -> Job {
|
||||
.timeout_minutes(60u32)
|
||||
}
|
||||
|
||||
fn bundle_mac() -> Job {
|
||||
fn bundle_mac_job(arch: runners::Arch) -> Job {
|
||||
use vars::GITHUB_SHA;
|
||||
bundle_job()
|
||||
.runs_on(runners::MAC_DEFAULT)
|
||||
.envs(mac_bundle_envs())
|
||||
@@ -52,17 +54,21 @@ fn bundle_mac() -> Job {
|
||||
.add_step(steps::setup_node())
|
||||
.add_step(steps::setup_sentry())
|
||||
.add_step(steps::clear_target_dir_if_large(runners::Platform::Mac))
|
||||
.add_step(steps::script("./script/bundle-mac"))
|
||||
.add_step(bundle_mac(arch))
|
||||
.add_step(steps::upload_artifact(
|
||||
"Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg",
|
||||
"target/aarch64-apple-darwin/release/Zed.dmg",
|
||||
&format!("Zed_{GITHUB_SHA}-{arch}.dmg"),
|
||||
&format!("target/{arch}-apple-darwin/release/Zed.dmg"),
|
||||
))
|
||||
.add_step(steps::upload_artifact(
|
||||
"Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg",
|
||||
"target/x86_64-apple-darwin/release/Zed.dmg",
|
||||
&format!("zed-remote-server-{GITHUB_SHA}-macos-{arch}.gz"),
|
||||
&format!("target/zed-remote-server-macos-{arch}.gz"),
|
||||
))
|
||||
}
|
||||
|
||||
pub fn bundle_mac(arch: runners::Arch) -> Step<Run> {
|
||||
named::bash(&format!("./script/bundle-mac {arch}-apple-darwin"))
|
||||
}
|
||||
|
||||
fn bundle_linux(arch: runners::Arch) -> Job {
|
||||
let artifact_name = format!("zed-{}-{}.tar.gz", vars::GITHUB_SHA, arch.triple());
|
||||
let remote_server_artifact_name = format!(
|
||||
|
||||
Reference in New Issue
Block a user