1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

ci: run macos aarch64 builds on PRs and main (#22201)

We run these on the free machines now.

Also cleans up some of our os and arch conditional step handling by
introducing a new `matrix.os` and `matrix.arch`.
This commit is contained in:
Luca Casonato 2024-01-31 14:59:47 +01:00 committed by GitHub
parent 99493c5aef
commit 1b83b84454
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 207 additions and 232 deletions

View file

@ -7,29 +7,50 @@ import * as yaml from "https://deno.land/std@0.173.0/encoding/yaml.ts";
// automatically via regex, so ensure that this line maintains this format. // automatically via regex, so ensure that this line maintains this format.
const cacheVersion = 72; const cacheVersion = 72;
const ubuntuRunner = "ubuntu-22.04"; const ubuntuX86Runner = "ubuntu-22.04";
const ubuntuXlRunner = "ubuntu-22.04-xl"; const ubuntuX86XlRunner = "ubuntu-22.04-xl";
const windowsRunner = "windows-2022"; const windowsX86Runner = "windows-2022";
const windowsXlRunner = "windows-2022-xl"; const windowsX86XlRunner = "windows-2022-xl";
const macosX86Runner = "macos-12"; const macosX86Runner = "macos-12";
// https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/ const macosArmRunner = "macos-14";
const macosArmRunner = "macos-13-xlarge";
const Runners = {
linuxX86: {
os: "linux",
arch: "x86_64",
runner: ubuntuX86Runner,
},
linuxX86Xl: {
os: "linux",
arch: "x86_64",
runner:
`\${{ github.repository == 'denoland/deno' && '${ubuntuX86XlRunner}' || '${ubuntuX86Runner}' }}`,
},
macosX86: {
os: "macos",
arch: "x86_64",
runner: macosX86Runner,
},
macosArm: {
os: "macos",
arch: "aarch64",
runner: macosArmRunner,
},
windowsX86: {
os: "windows",
arch: "x86_64",
runner: windowsX86Runner,
},
windowsX86Xl: {
os: "windows",
arch: "x86_64",
runner:
`\${{ github.repository == 'denoland/deno' && '${windowsX86XlRunner}' || '${windowsX86Runner}' }}`,
},
} as const;
const Runners = (() => {
return {
ubuntuXl:
`\${{ github.repository == 'denoland/deno' && '${ubuntuXlRunner}' || '${ubuntuRunner}' }}`,
ubuntu: ubuntuRunner,
linux: ubuntuRunner,
macos: macosX86Runner,
macosArm: macosArmRunner,
windows: windowsRunner,
windowsXl:
`\${{ github.repository == 'denoland/deno' && '${windowsXlRunner}' || '${windowsRunner}' }}`,
};
})();
const prCacheKeyPrefix = const prCacheKeyPrefix =
`${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.profile }}-\${{ matrix.job }}-`; `${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.arch }}-\${{ matrix.profile }}-\${{ matrix.job }}-`;
// Note that you may need to add more version to the `apt-get remove` line below if you change this // Note that you may need to add more version to the `apt-get remove` line below if you change this
const llvmVersion = 16; const llvmVersion = 16;
@ -112,20 +133,6 @@ __0`,
const installBenchTools = "./tools/install_prebuilt.js wrk hyperfine"; const installBenchTools = "./tools/install_prebuilt.js wrk hyperfine";
// The Windows builder is a little strange -- there's lots of room on C: and not so much on D:
// We'll check out to D:, but then all of our builds should happen on a C:-mapped drive
const reconfigureWindowsStorage = {
name: "Reconfigure Windows Storage",
if: [
"startsWith(matrix.os, 'windows') && !endsWith(matrix.os, '-xl')",
],
shell: "pwsh",
run: `
New-Item -ItemType "directory" -Path "$env:TEMP/__target__"
New-Item -ItemType Junction -Target "$env:TEMP/__target__" -Path "D:/a/deno/deno"
`.trim(),
};
const cloneRepoStep = [{ const cloneRepoStep = [{
name: "Configure git", name: "Configure git",
run: [ run: [
@ -158,7 +165,7 @@ const installPythonSteps = [{
with: { "python-version": 3.11 }, with: { "python-version": 3.11 },
}, { }, {
name: "Remove unused versions of Python", name: "Remove unused versions of Python",
if: "startsWith(matrix.os, 'windows')", if: "matrix.os == 'windows'",
shell: "pwsh", shell: "pwsh",
run: [ run: [
'$env:PATH -split ";" |', '$env:PATH -split ";" |',
@ -240,26 +247,14 @@ function removeSurroundingExpression(text: string) {
function handleMatrixItems(items: { function handleMatrixItems(items: {
skip_pr?: string | true; skip_pr?: string | true;
skip?: string; skip?: string;
os: string; os: "linux" | "macos" | "windows";
arch: "x86_64" | "aarch64";
runner: string;
profile?: string; profile?: string;
job?: string; job?: string;
use_sysroot?: boolean; use_sysroot?: boolean;
wpt?: string; wpt?: string;
}[]) { }[]) {
function getOsDisplayName(os: string) {
if (os.includes("ubuntu")) {
return "ubuntu-x86_64";
} else if (os.includes("windows")) {
return "windows-x86_64";
} else if (os == macosX86Runner) {
return "macos-x86_64";
} else if (os == macosArmRunner) {
return "macos-aarch64";
} else {
throw new Error(`Display name not found: ${os}`);
}
}
return items.map((item) => { return items.map((item) => {
// use a free "ubuntu" runner on jobs that are skipped // use a free "ubuntu" runner on jobs that are skipped
@ -275,24 +270,21 @@ function handleMatrixItems(items: {
} }
if (typeof item.skip === "string") { if (typeof item.skip === "string") {
let text = let runner =
"${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && ("; "${{ (!contains(github.event.pull_request.labels.*.name, 'ci-full') && (";
text += removeSurroundingExpression(item.skip.toString()) + ")) && "; runner += removeSurroundingExpression(item.skip.toString()) + ")) && ";
text += `'${Runners.ubuntu}' || ${ runner += `'${ubuntuX86Runner}' || ${
removeSurroundingExpression(item.os) removeSurroundingExpression(item.runner)
} }}`; } }}`;
// deno-lint-ignore no-explicit-any // deno-lint-ignore no-explicit-any
(item as any).runner = text; (item as any).runner = runner;
item.skip = item.skip =
"${{ !contains(github.event.pull_request.labels.*.name, 'ci-full') && (" + "${{ !contains(github.event.pull_request.labels.*.name, 'ci-full') && (" +
removeSurroundingExpression(item.skip.toString()) + ") }}"; removeSurroundingExpression(item.skip.toString()) + ") }}";
} }
return { return { ...item };
...item,
os_display_name: getOsDisplayName(item.os),
};
}); });
} }
@ -342,10 +334,10 @@ const ci = {
}, },
build: { build: {
name: name:
"${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os_display_name }}", "${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }}",
needs: ["pre_build"], needs: ["pre_build"],
if: "${{ needs.pre_build.outputs.skip_build != 'true' }}", if: "${{ needs.pre_build.outputs.skip_build != 'true' }}",
"runs-on": "${{ matrix.runner || matrix.os }}", "runs-on": "${{ matrix.runner }}",
"timeout-minutes": 120, "timeout-minutes": 120,
defaults: { defaults: {
run: { run: {
@ -357,32 +349,34 @@ const ci = {
strategy: { strategy: {
matrix: { matrix: {
include: handleMatrixItems([{ include: handleMatrixItems([{
os: Runners.macos, ...Runners.macosX86,
job: "test", job: "test",
profile: "debug", profile: "debug",
}, { }, {
os: Runners.macos, ...Runners.macosX86,
job: "test", job: "test",
profile: "release", profile: "release",
skip_pr: true, skip_pr: true,
}, { }, {
os: Runners.macosArm, ...Runners.macosArm,
job: "test",
profile: "release",
// TODO(mmastrac): We don't want to run this M1 runner on every main commit because of the expense.
skip:
"${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' }}",
}, {
os: Runners.windows,
job: "test", job: "test",
profile: "debug", profile: "debug",
}, { }, {
os: Runners.windowsXl, ...Runners.macosArm,
job: "test", job: "test",
profile: "release", profile: "release",
skip_pr: true, skip_pr: true,
}, { }, {
os: Runners.ubuntuXl, ...Runners.windowsX86,
job: "test",
profile: "debug",
}, {
...Runners.windowsX86Xl,
job: "test",
profile: "release",
skip_pr: true,
}, {
...Runners.linuxX86Xl,
job: "test", job: "test",
profile: "release", profile: "release",
use_sysroot: true, use_sysroot: true,
@ -390,27 +384,27 @@ const ci = {
// currently run the Web Platform tests only on Linux. // currently run the Web Platform tests only on Linux.
wpt: "${{ !startsWith(github.ref, 'refs/tags/') }}", wpt: "${{ !startsWith(github.ref, 'refs/tags/') }}",
}, { }, {
os: Runners.ubuntuXl, ...Runners.linuxX86Xl,
job: "bench", job: "bench",
profile: "release", profile: "release",
use_sysroot: true, use_sysroot: true,
skip_pr: skip_pr:
"${{ !contains(github.event.pull_request.labels.*.name, 'ci-bench') }}", "${{ !contains(github.event.pull_request.labels.*.name, 'ci-bench') }}",
}, { }, {
os: Runners.ubuntu, ...Runners.linuxX86,
job: "test", job: "test",
profile: "debug", profile: "debug",
use_sysroot: true, use_sysroot: true,
}, { }, {
os: Runners.ubuntu, ...Runners.linuxX86,
job: "lint", job: "lint",
profile: "debug", profile: "debug",
}, { }, {
os: Runners.macos, ...Runners.macosX86,
job: "lint", job: "lint",
profile: "debug", profile: "debug",
}, { }, {
os: Runners.windows, ...Runners.windowsX86,
job: "lint", job: "lint",
profile: "debug", profile: "debug",
}]), }]),
@ -430,7 +424,6 @@ const ci = {
RUST_LIB_BACKTRACE: 0, RUST_LIB_BACKTRACE: 0,
}, },
steps: skipJobsIfPrAndMarkedSkip([ steps: skipJobsIfPrAndMarkedSkip([
reconfigureWindowsStorage,
...cloneRepoStep, ...cloneRepoStep,
submoduleStep("./test_util/std"), submoduleStep("./test_util/std"),
{ {
@ -439,12 +432,12 @@ const ci = {
}, },
{ {
...submoduleStep("./tools/node_compat/node"), ...submoduleStep("./tools/node_compat/node"),
if: "matrix.job == 'lint' && startsWith(matrix.os, 'ubuntu')", if: "matrix.job == 'lint' && matrix.os == 'linux'",
}, },
{ {
name: "Create source tarballs (release, linux)", name: "Create source tarballs (release, linux)",
if: [ if: [
"startsWith(matrix.os, 'ubuntu') &&", "matrix.os == 'linux' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"matrix.job == 'test' &&", "matrix.job == 'test' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
@ -484,7 +477,7 @@ const ci = {
{ {
name: "Setup gcloud (unix)", name: "Setup gcloud (unix)",
if: [ if: [
"runner.os != 'Windows' &&", "matrix.os == 'windows' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"matrix.job == 'test' &&", "matrix.job == 'test' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
@ -499,7 +492,7 @@ const ci = {
{ {
name: "Setup gcloud (windows)", name: "Setup gcloud (windows)",
if: [ if: [
"runner.os == 'Windows' &&", "matrix.os == 'windows' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"matrix.job == 'test' &&", "matrix.job == 'test' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
@ -529,11 +522,11 @@ const ci = {
...sysRootStep, ...sysRootStep,
}, },
{ {
name: "Install aarch64 lld", name: "Install macOS aarch64 lld",
run: [ run: [
"./tools/install_prebuilt.js ld64.lld", "./tools/install_prebuilt.js ld64.lld",
].join("\n"), ].join("\n"),
if: `matrix.os == '${macosArmRunner}'`, if: `matrix.os == 'macos' && matrix.arch == 'aarch64'`,
}, },
{ {
name: "Install rust-codesign", name: "Install rust-codesign",
@ -541,8 +534,7 @@ const ci = {
"./tools/install_prebuilt.js rcodesign", "./tools/install_prebuilt.js rcodesign",
"echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH", "echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH",
].join("\n"), ].join("\n"),
if: if: `matrix.os == 'macos'`,
`(matrix.os == '${macosArmRunner}' || matrix.os == '${macosX86Runner}')`,
}, },
{ {
name: "Log versions", name: "Log versions",
@ -575,9 +567,10 @@ const ci = {
"~/.cargo/registry/cache", "~/.cargo/registry/cache",
].join("\n"), ].join("\n"),
key: key:
`${cacheVersion}-cargo-home-\${{ matrix.os }}-\${{ hashFiles('Cargo.lock') }}`, `${cacheVersion}-cargo-home-\${{ matrix.os }}-\${{ matrix.arch }}-\${{ hashFiles('Cargo.lock') }}`,
// We will try to restore from the closest cargo-home we can find // We will try to restore from the closest cargo-home we can find
"restore-keys": `${cacheVersion}-cargo-home-\${{ matrix.os }}`, "restore-keys":
`${cacheVersion}-cargo-home-\${{ matrix.os }}-\${{ matrix.arch }}`,
}, },
}, },
{ {
@ -607,14 +600,14 @@ const ci = {
}, },
{ {
name: "test_format.js", name: "test_format.js",
if: "matrix.job == 'lint' && startsWith(matrix.os, 'ubuntu')", if: "matrix.job == 'lint' && matrix.os == 'linux'",
run: run:
"deno run --unstable --allow-write --allow-read --allow-run --allow-net ./tools/format.js --check", "deno run --unstable --allow-write --allow-read --allow-run --allow-net ./tools/format.js --check",
}, },
{ {
name: "Lint PR title", name: "Lint PR title",
if: if:
"matrix.job == 'lint' && github.event_name == 'pull_request' && startsWith(matrix.os, 'ubuntu')", "matrix.job == 'lint' && github.event_name == 'pull_request' && matrix.os == 'linux'",
env: { env: {
PR_TITLE: "${{ github.event.pull_request.title }}", PR_TITLE: "${{ github.event.pull_request.title }}",
}, },
@ -628,7 +621,7 @@ const ci = {
}, },
{ {
name: "node_compat/setup.ts --check", name: "node_compat/setup.ts --check",
if: "matrix.job == 'lint' && startsWith(matrix.os, 'ubuntu')", if: "matrix.job == 'lint' && matrix.os == 'linux'",
run: run:
"deno run --allow-write --allow-read --allow-run=git ./tools/node_compat/setup.ts --check", "deno run --allow-write --allow-read --allow-run=git ./tools/node_compat/setup.ts --check",
}, },
@ -675,21 +668,21 @@ const ci = {
{ {
name: "Pre-release (linux)", name: "Pre-release (linux)",
if: [ if: [
"startsWith(matrix.os, 'ubuntu') &&", "matrix.os == 'linux' &&",
"matrix.job == 'test' &&", "matrix.job == 'test' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno'", "github.repository == 'denoland/deno'",
].join("\n"), ].join("\n"),
run: [ run: [
"cd target/release", "cd target/release",
"zip -r deno-x86_64-unknown-linux-gnu.zip deno", "zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno",
"./deno types > lib.deno.d.ts", "./deno types > lib.deno.d.ts",
].join("\n"), ].join("\n"),
}, },
{ {
name: "Pre-release (mac intel)", name: "Pre-release (mac)",
if: [ if: [
`matrix.os == '${macosX86Runner}' &&`, `matrix.os == 'macos' &&`,
"matrix.job == 'test' &&", "matrix.job == 'test' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno'", "github.repository == 'denoland/deno'",
@ -706,45 +699,21 @@ const ci = {
"--p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) " + "--p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) " +
"--entitlements-xml-file=cli/entitlements.plist", "--entitlements-xml-file=cli/entitlements.plist",
"cd target/release", "cd target/release",
"zip -r deno-x86_64-apple-darwin.zip deno", "zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno",
]
.join("\n"),
},
{
name: "Pre-release (mac aarch64)",
if: [
`matrix.os == '${macosArmRunner}' &&`,
"matrix.job == 'test' &&",
"matrix.profile == 'release' &&",
"github.repository == 'denoland/deno'",
].join("\n"),
env: {
"APPLE_CODESIGN_KEY": "${{ secrets.APPLE_CODESIGN_KEY }}",
"APPLE_CODESIGN_PASSWORD": "${{ secrets.APPLE_CODESIGN_PASSWORD }}",
},
run: [
'echo "Key is $(echo $APPLE_CODESIGN_KEY | base64 -d | wc -c) bytes"',
"rcodesign sign target/release/deno " +
"--code-signature-flags=runtime " +
'--p12-password="$APPLE_CODESIGN_PASSWORD" ' +
"--p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) " +
"--entitlements-xml-file=cli/entitlements.plist",
"cd target/release",
"zip -r deno-aarch64-apple-darwin.zip deno",
] ]
.join("\n"), .join("\n"),
}, },
{ {
name: "Pre-release (windows)", name: "Pre-release (windows)",
if: [ if: [
"startsWith(matrix.os, 'windows') &&", "matrix.os == 'windows' &&",
"matrix.job == 'test' &&", "matrix.job == 'test' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno'", "github.repository == 'denoland/deno'",
].join("\n"), ].join("\n"),
shell: "pwsh", shell: "pwsh",
run: run:
"Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-x86_64-pc-windows-msvc.zip", "Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip",
}, },
{ {
name: "Upload canary to dl.deno.land", name: "Upload canary to dl.deno.land",
@ -757,32 +726,38 @@ const ci = {
run: [ run: [
'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/', 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/',
"echo ${{ github.sha }} > canary-latest.txt", "echo ${{ github.sha }} > canary-latest.txt",
'gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt', 'gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-${{ matrix.arch }}-latest.txt',
].join("\n"), ].join("\n"),
}, },
{ {
name: "Autobahn testsuite", name: "Autobahn testsuite",
if: [ if: [
"matrix.job == 'test' && matrix.profile == 'release' &&", "matrix.os == 'linux' &&",
"!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu')", "matrix.job == 'test' &&",
"matrix.profile == 'release' &&",
"!startsWith(github.ref, 'refs/tags/')",
].join("\n"), ].join("\n"),
run: run:
"target/release/deno run -A --unstable ext/websocket/autobahn/fuzzingclient.js", "target/release/deno run -A --unstable ext/websocket/autobahn/fuzzingclient.js",
}, },
{ {
name: "Test debug", name: "Test (full, debug)",
if: [ if: [
"matrix.job == 'test' && matrix.profile == 'debug' &&", "matrix.job == 'test' &&",
"!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu')", "matrix.profile == 'debug' &&",
"!startsWith(github.ref, 'refs/tags/') &&",
// Run full tests only on Linux.
"matrix.os == 'linux'",
].join("\n"), ].join("\n"),
run: "cargo test --locked", run: "cargo test --locked",
env: { CARGO_PROFILE_DEV_DEBUG: 0 }, env: { CARGO_PROFILE_DEV_DEBUG: 0 },
}, },
{ {
name: "Test debug (fast)", name: "Test (fast, debug)",
if: [ if: [
"matrix.job == 'test' && matrix.profile == 'debug' &&", "matrix.job == 'test' &&",
"(startsWith(github.ref, 'refs/tags/') || !startsWith(matrix.os, 'ubuntu'))", "matrix.profile == 'debug' &&",
"(startsWith(github.ref, 'refs/tags/') || matrix.os != 'linux')",
].join("\n"), ].join("\n"),
run: [ run: [
// Run unit then integration tests. Skip doc tests here // Run unit then integration tests. Skip doc tests here
@ -793,9 +768,10 @@ const ci = {
env: { CARGO_PROFILE_DEV_DEBUG: 0 }, env: { CARGO_PROFILE_DEV_DEBUG: 0 },
}, },
{ {
name: "Test release", name: "Test (release)",
if: [ if: [
"matrix.job == 'test' && matrix.profile == 'release' &&", "matrix.job == 'test' &&",
"matrix.profile == 'release' &&",
"(matrix.use_sysroot || (", "(matrix.use_sysroot || (",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
"!startsWith(github.ref, 'refs/tags/')))", "!startsWith(github.ref, 'refs/tags/')))",
@ -867,7 +843,7 @@ const ci = {
"continue-on-error": true, "continue-on-error": true,
if: [ if: [
"matrix.wpt &&", "matrix.wpt &&",
"runner.os == 'Linux' &&", "matrix.os == 'linux' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
"github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')", "github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')",
@ -885,7 +861,7 @@ const ci = {
"continue-on-error": true, "continue-on-error": true,
if: [ if: [
"matrix.wpt &&", "matrix.wpt &&",
"runner.os == 'Linux' &&", "matrix.os == 'linux' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
"github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')", "github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')",
@ -949,7 +925,7 @@ const ci = {
{ {
name: "Upload release to dl.deno.land (unix)", name: "Upload release to dl.deno.land (unix)",
if: [ if: [
"runner.os != 'Windows' &&", "matrix.os != 'windows' &&",
"matrix.job == 'test' &&", "matrix.job == 'test' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
@ -961,7 +937,7 @@ const ci = {
{ {
name: "Upload release to dl.deno.land (windows)", name: "Upload release to dl.deno.land (windows)",
if: [ if: [
"runner.os == 'Windows' &&", "matrix.os == 'windows' &&",
"matrix.job == 'test' &&", "matrix.job == 'test' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
@ -1016,7 +992,8 @@ const ci = {
name: "Save cache build output (main)", name: "Save cache build output (main)",
uses: "actions/cache/save@v3", uses: "actions/cache/save@v3",
if: if:
"(matrix.job == 'test' || matrix.job == 'lint') && github.ref == 'refs/heads/main'", // TODO(@lucacasonato): revert before landing
"(matrix.job == 'test' || matrix.job == 'lint')", // && github.ref == 'refs/heads/main'",
with: { with: {
path: [ path: [
"./target", "./target",
@ -1031,7 +1008,7 @@ const ci = {
}, },
"publish-canary": { "publish-canary": {
name: "publish canary", name: "publish canary",
"runs-on": "ubuntu-22.04", "runs-on": ubuntuX86Runner,
needs: ["build"], needs: ["build"],
if: if:
"github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'", "github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'",

View file

@ -41,11 +41,11 @@ jobs:
echo $GIT_MESSAGE | grep '\[ci\]' || (echo 'Exiting due to draft PR. Commit with [ci] to bypass.' ; echo 'skip_build=true' >> $GITHUB_OUTPUT) echo $GIT_MESSAGE | grep '\[ci\]' || (echo 'Exiting due to draft PR. Commit with [ci] to bypass.' ; echo 'skip_build=true' >> $GITHUB_OUTPUT)
if: github.event.pull_request.draft == true if: github.event.pull_request.draft == true
build: build:
name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os_display_name }}' name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }}'
needs: needs:
- pre_build - pre_build
if: '${{ needs.pre_build.outputs.skip_build != ''true'' }}' if: '${{ needs.pre_build.outputs.skip_build != ''true'' }}'
runs-on: '${{ matrix.runner || matrix.os }}' runs-on: '${{ matrix.runner }}'
timeout-minutes: 120 timeout-minutes: 120
defaults: defaults:
run: run:
@ -53,74 +53,80 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: macos-12 - os: macos
arch: x86_64
runner: macos-12
job: test job: test
profile: debug profile: debug
os_display_name: macos-x86_64 - os: macos
- os: macos-12 arch: x86_64
job: test
profile: release
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}'
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || ''macos-12'' }}' runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || ''macos-12'' }}'
os_display_name: macos-x86_64
- os: macos-13-xlarge
job: test
profile: release
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' || github.ref == ''refs/heads/main'') }}'
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' || github.ref == ''refs/heads/main'')) && ''ubuntu-22.04'' || ''macos-13-xlarge'' }}'
os_display_name: macos-aarch64
- os: windows-2022
job: test
profile: debug
os_display_name: windows-x86_64
- os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
job: test job: test
profile: release profile: release
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}' skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}'
- os: macos
arch: aarch64
runner: macos-14
job: test
profile: debug
- os: macos
arch: aarch64
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || ''macos-14'' }}'
job: test
profile: release
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}'
- os: windows
arch: x86_64
runner: windows-2022
job: test
profile: debug
- os: windows
arch: x86_64
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}' runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
os_display_name: windows-x86_64 job: test
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}' profile: release
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}'
- os: linux
arch: x86_64
runner: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
job: test job: test
profile: release profile: release
use_sysroot: true use_sysroot: true
wpt: '${{ !startsWith(github.ref, ''refs/tags/'') }}' wpt: '${{ !startsWith(github.ref, ''refs/tags/'') }}'
os_display_name: ubuntu-x86_64 - os: linux
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}' arch: x86_64
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' && !contains(github.event.pull_request.labels.*.name, ''ci-bench''))) && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
job: bench job: bench
profile: release profile: release
use_sysroot: true use_sysroot: true
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' && !contains(github.event.pull_request.labels.*.name, ''ci-bench'')) }}' skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' && !contains(github.event.pull_request.labels.*.name, ''ci-bench'')) }}'
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' && !contains(github.event.pull_request.labels.*.name, ''ci-bench''))) && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}' - os: linux
os_display_name: ubuntu-x86_64 arch: x86_64
- os: ubuntu-22.04 runner: ubuntu-22.04
job: test job: test
profile: debug profile: debug
use_sysroot: true use_sysroot: true
os_display_name: ubuntu-x86_64 - os: linux
- os: ubuntu-22.04 arch: x86_64
runner: ubuntu-22.04
job: lint job: lint
profile: debug profile: debug
os_display_name: ubuntu-x86_64 - os: macos
- os: macos-12 arch: x86_64
runner: macos-12
job: lint job: lint
profile: debug profile: debug
os_display_name: macos-x86_64 - os: windows
- os: windows-2022 arch: x86_64
runner: windows-2022
job: lint job: lint
profile: debug profile: debug
os_display_name: windows-x86_64
fail-fast: '${{ github.event_name == ''pull_request'' || (github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')) }}' fail-fast: '${{ github.event_name == ''pull_request'' || (github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')) }}'
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
RUST_BACKTRACE: full RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0 RUST_LIB_BACKTRACE: 0
steps: steps:
- name: Reconfigure Windows Storage
if: '!(matrix.skip) && (startsWith(matrix.os, ''windows'') && !endsWith(matrix.os, ''-xl''))'
shell: pwsh
run: |-
New-Item -ItemType "directory" -Path "$env:TEMP/__target__"
New-Item -ItemType Junction -Target "$env:TEMP/__target__" -Path "D:/a/deno/deno"
- name: Configure git - name: Configure git
run: |- run: |-
git config --global core.symlinks true git config --global core.symlinks true
@ -140,10 +146,10 @@ jobs:
if: '!(matrix.skip) && (matrix.wpt)' if: '!(matrix.skip) && (matrix.wpt)'
- name: Clone submodule ./tools/node_compat/node - name: Clone submodule ./tools/node_compat/node
run: git submodule update --init --recursive --depth=1 -- ./tools/node_compat/node run: git submodule update --init --recursive --depth=1 -- ./tools/node_compat/node
if: '!(matrix.skip) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))' if: '!(matrix.skip) && (matrix.job == ''lint'' && matrix.os == ''linux'')'
- name: 'Create source tarballs (release, linux)' - name: 'Create source tarballs (release, linux)'
if: |- if: |-
!(matrix.skip) && (startsWith(matrix.os, 'ubuntu') && !(matrix.skip) && (matrix.os == 'linux' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
matrix.job == 'test' && matrix.job == 'test' &&
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
@ -165,7 +171,7 @@ jobs:
python-version: 3.11 python-version: 3.11
if: '!(matrix.skip) && (matrix.job != ''lint'')' if: '!(matrix.skip) && (matrix.job != ''lint'')'
- name: Remove unused versions of Python - name: Remove unused versions of Python
if: '!(matrix.skip) && (matrix.job != ''lint'' && (startsWith(matrix.os, ''windows'')))' if: '!(matrix.skip) && (matrix.job != ''lint'' && (matrix.os == ''windows''))'
shell: pwsh shell: pwsh
run: |- run: |-
$env:PATH -split ";" | $env:PATH -split ";" |
@ -198,7 +204,7 @@ jobs:
create_credentials_file: true create_credentials_file: true
- name: Setup gcloud (unix) - name: Setup gcloud (unix)
if: |- if: |-
!(matrix.skip) && (runner.os != 'Windows' && !(matrix.skip) && (matrix.os == 'windows' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
matrix.job == 'test' && matrix.job == 'test' &&
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
@ -209,7 +215,7 @@ jobs:
project_id: denoland project_id: denoland
- name: Setup gcloud (windows) - name: Setup gcloud (windows)
if: |- if: |-
!(matrix.skip) && (runner.os == 'Windows' && !(matrix.skip) && (matrix.os == 'windows' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
matrix.job == 'test' && matrix.job == 'test' &&
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
@ -301,14 +307,14 @@ jobs:
CC=clang-16 CC=clang-16
CFLAGS=-flto=thin --sysroot=/sysroot CFLAGS=-flto=thin --sysroot=/sysroot
__0 __0
- name: Install aarch64 lld - name: Install macOS aarch64 lld
run: ./tools/install_prebuilt.js ld64.lld run: ./tools/install_prebuilt.js ld64.lld
if: '!(matrix.skip) && (matrix.os == ''macos-13-xlarge'')' if: '!(matrix.skip) && (matrix.os == ''macos'' && matrix.arch == ''aarch64'')'
- name: Install rust-codesign - name: Install rust-codesign
run: |- run: |-
./tools/install_prebuilt.js rcodesign ./tools/install_prebuilt.js rcodesign
echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
if: '!(matrix.skip) && ((matrix.os == ''macos-13-xlarge'' || matrix.os == ''macos-12''))' if: '!(matrix.skip) && (matrix.os == ''macos'')'
- name: Log versions - name: Log versions
run: |- run: |-
python --version python --version
@ -330,8 +336,8 @@ jobs:
path: |- path: |-
~/.cargo/registry/index ~/.cargo/registry/index
~/.cargo/registry/cache ~/.cargo/registry/cache
key: '72-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}' key: '72-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '72-cargo-home-${{ matrix.os }}' restore-keys: '72-cargo-home-${{ matrix.os }}-${{ matrix.arch }}'
if: '!(matrix.skip)' if: '!(matrix.skip)'
- name: Restore cache build output (PR) - name: Restore cache build output (PR)
uses: actions/cache/restore@v3 uses: actions/cache/restore@v3
@ -343,17 +349,17 @@ jobs:
!./target/*/*.zip !./target/*/*.zip
!./target/*/*.tar.gz !./target/*/*.tar.gz
key: never_saved key: never_saved
restore-keys: '72-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-' restore-keys: '72-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-'
- name: Apply and update mtime cache - name: Apply and update mtime cache
if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))' if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))'
uses: ./.github/mtime_cache uses: ./.github/mtime_cache
with: with:
cache-path: ./target cache-path: ./target
- name: test_format.js - name: test_format.js
if: '!(matrix.skip) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))' if: '!(matrix.skip) && (matrix.job == ''lint'' && matrix.os == ''linux'')'
run: deno run --unstable --allow-write --allow-read --allow-run --allow-net ./tools/format.js --check run: deno run --unstable --allow-write --allow-read --allow-run --allow-net ./tools/format.js --check
- name: Lint PR title - name: Lint PR title
if: '!(matrix.skip) && (matrix.job == ''lint'' && github.event_name == ''pull_request'' && startsWith(matrix.os, ''ubuntu''))' if: '!(matrix.skip) && (matrix.job == ''lint'' && github.event_name == ''pull_request'' && matrix.os == ''linux'')'
env: env:
PR_TITLE: '${{ github.event.pull_request.title }}' PR_TITLE: '${{ github.event.pull_request.title }}'
run: deno run ./tools/verify_pr_title.js "$PR_TITLE" run: deno run ./tools/verify_pr_title.js "$PR_TITLE"
@ -361,7 +367,7 @@ jobs:
if: '!(matrix.skip) && (matrix.job == ''lint'')' if: '!(matrix.skip) && (matrix.job == ''lint'')'
run: deno run --unstable --allow-write --allow-read --allow-run --allow-net ./tools/lint.js run: deno run --unstable --allow-write --allow-read --allow-run --allow-net ./tools/lint.js
- name: node_compat/setup.ts --check - name: node_compat/setup.ts --check
if: '!(matrix.skip) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))' if: '!(matrix.skip) && (matrix.job == ''lint'' && matrix.os == ''linux'')'
run: deno run --allow-write --allow-read --allow-run=git ./tools/node_compat/setup.ts --check run: deno run --allow-write --allow-read --allow-run=git ./tools/node_compat/setup.ts --check
- name: Build debug - name: Build debug
if: '!(matrix.skip) && (matrix.job == ''test'' && matrix.profile == ''debug'')' if: '!(matrix.skip) && (matrix.job == ''test'' && matrix.profile == ''debug'')'
@ -393,17 +399,17 @@ jobs:
path: target/release/deno path: target/release/deno
- name: Pre-release (linux) - name: Pre-release (linux)
if: |- if: |-
!(matrix.skip) && (startsWith(matrix.os, 'ubuntu') && !(matrix.skip) && (matrix.os == 'linux' &&
matrix.job == 'test' && matrix.job == 'test' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
github.repository == 'denoland/deno') github.repository == 'denoland/deno')
run: |- run: |-
cd target/release cd target/release
zip -r deno-x86_64-unknown-linux-gnu.zip deno zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno
./deno types > lib.deno.d.ts ./deno types > lib.deno.d.ts
- name: Pre-release (mac intel) - name: Pre-release (mac)
if: |- if: |-
!(matrix.skip) && (matrix.os == 'macos-12' && !(matrix.skip) && (matrix.os == 'macos' &&
matrix.job == 'test' && matrix.job == 'test' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
github.repository == 'denoland/deno') github.repository == 'denoland/deno')
@ -414,29 +420,15 @@ jobs:
echo "Key is $(echo $APPLE_CODESIGN_KEY | base64 -d | wc -c) bytes" echo "Key is $(echo $APPLE_CODESIGN_KEY | base64 -d | wc -c) bytes"
rcodesign sign target/release/deno --code-signature-flags=runtime --p12-password="$APPLE_CODESIGN_PASSWORD" --p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) --entitlements-xml-file=cli/entitlements.plist rcodesign sign target/release/deno --code-signature-flags=runtime --p12-password="$APPLE_CODESIGN_PASSWORD" --p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) --entitlements-xml-file=cli/entitlements.plist
cd target/release cd target/release
zip -r deno-x86_64-apple-darwin.zip deno zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno
- name: Pre-release (mac aarch64)
if: |-
!(matrix.skip) && (matrix.os == 'macos-13-xlarge' &&
matrix.job == 'test' &&
matrix.profile == 'release' &&
github.repository == 'denoland/deno')
env:
APPLE_CODESIGN_KEY: '${{ secrets.APPLE_CODESIGN_KEY }}'
APPLE_CODESIGN_PASSWORD: '${{ secrets.APPLE_CODESIGN_PASSWORD }}'
run: |-
echo "Key is $(echo $APPLE_CODESIGN_KEY | base64 -d | wc -c) bytes"
rcodesign sign target/release/deno --code-signature-flags=runtime --p12-password="$APPLE_CODESIGN_PASSWORD" --p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) --entitlements-xml-file=cli/entitlements.plist
cd target/release
zip -r deno-aarch64-apple-darwin.zip deno
- name: Pre-release (windows) - name: Pre-release (windows)
if: |- if: |-
!(matrix.skip) && (startsWith(matrix.os, 'windows') && !(matrix.skip) && (matrix.os == 'windows' &&
matrix.job == 'test' && matrix.job == 'test' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
github.repository == 'denoland/deno') github.repository == 'denoland/deno')
shell: pwsh shell: pwsh
run: Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-x86_64-pc-windows-msvc.zip run: 'Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip'
- name: Upload canary to dl.deno.land - name: Upload canary to dl.deno.land
if: |- if: |-
!(matrix.skip) && (matrix.job == 'test' && !(matrix.skip) && (matrix.job == 'test' &&
@ -446,31 +438,37 @@ jobs:
run: |- run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/ gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
echo ${{ github.sha }} > canary-latest.txt echo ${{ github.sha }} > canary-latest.txt
gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-${{ matrix.arch }}-latest.txt
- name: Autobahn testsuite - name: Autobahn testsuite
if: |- if: |-
!(matrix.skip) && (matrix.job == 'test' && matrix.profile == 'release' && !(matrix.skip) && (matrix.os == 'linux' &&
!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu')) matrix.job == 'test' &&
matrix.profile == 'release' &&
!startsWith(github.ref, 'refs/tags/'))
run: target/release/deno run -A --unstable ext/websocket/autobahn/fuzzingclient.js run: target/release/deno run -A --unstable ext/websocket/autobahn/fuzzingclient.js
- name: Test debug - name: 'Test (full, debug)'
if: |- if: |-
!(matrix.skip) && (matrix.job == 'test' && matrix.profile == 'debug' && !(matrix.skip) && (matrix.job == 'test' &&
!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu')) matrix.profile == 'debug' &&
!startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'linux')
run: cargo test --locked run: cargo test --locked
env: env:
CARGO_PROFILE_DEV_DEBUG: 0 CARGO_PROFILE_DEV_DEBUG: 0
- name: Test debug (fast) - name: 'Test (fast, debug)'
if: |- if: |-
!(matrix.skip) && (matrix.job == 'test' && matrix.profile == 'debug' && !(matrix.skip) && (matrix.job == 'test' &&
(startsWith(github.ref, 'refs/tags/') || !startsWith(matrix.os, 'ubuntu'))) matrix.profile == 'debug' &&
(startsWith(github.ref, 'refs/tags/') || matrix.os != 'linux'))
run: |- run: |-
cargo test --locked --lib cargo test --locked --lib
cargo test --locked --test '*' cargo test --locked --test '*'
env: env:
CARGO_PROFILE_DEV_DEBUG: 0 CARGO_PROFILE_DEV_DEBUG: 0
- name: Test release - name: Test (release)
if: |- if: |-
!(matrix.skip) && (matrix.job == 'test' && matrix.profile == 'release' && !(matrix.skip) && (matrix.job == 'test' &&
matrix.profile == 'release' &&
(matrix.use_sysroot || ( (matrix.use_sysroot || (
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
!startsWith(github.ref, 'refs/tags/')))) !startsWith(github.ref, 'refs/tags/'))))
@ -520,7 +518,7 @@ jobs:
continue-on-error: true continue-on-error: true
if: |- if: |-
!(matrix.skip) && (matrix.wpt && !(matrix.skip) && (matrix.wpt &&
runner.os == 'Linux' && matrix.os == 'linux' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')) github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/'))
@ -534,7 +532,7 @@ jobs:
continue-on-error: true continue-on-error: true
if: |- if: |-
!(matrix.skip) && (matrix.wpt && !(matrix.skip) && (matrix.wpt &&
runner.os == 'Linux' && matrix.os == 'linux' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')) github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/'))
@ -579,7 +577,7 @@ jobs:
cat /proc/meminfo cat /proc/meminfo
- name: Upload release to dl.deno.land (unix) - name: Upload release to dl.deno.land (unix)
if: |- if: |-
!(matrix.skip) && (runner.os != 'Windows' && !(matrix.skip) && (matrix.os != 'windows' &&
matrix.job == 'test' && matrix.job == 'test' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
@ -587,7 +585,7 @@ jobs:
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/' run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/'
- name: Upload release to dl.deno.land (windows) - name: Upload release to dl.deno.land (windows)
if: |- if: |-
!(matrix.skip) && (runner.os == 'Windows' && !(matrix.skip) && (matrix.os == 'windows' &&
matrix.job == 'test' && matrix.job == 'test' &&
matrix.profile == 'release' && matrix.profile == 'release' &&
github.repository == 'denoland/deno' && github.repository == 'denoland/deno' &&
@ -625,14 +623,14 @@ jobs:
draft: true draft: true
- name: Save cache build output (main) - name: Save cache build output (main)
uses: actions/cache/save@v3 uses: actions/cache/save@v3
if: '!(matrix.skip) && ((matrix.job == ''test'' || matrix.job == ''lint'') && github.ref == ''refs/heads/main'')' if: '!(matrix.skip) && ((matrix.job == ''test'' || matrix.job == ''lint''))'
with: with:
path: |- path: |-
./target ./target
!./target/*/gn_out !./target/*/gn_out
!./target/*/*.zip !./target/*/*.zip
!./target/*/*.tar.gz !./target/*/*.tar.gz
key: '72-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' key: '72-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
publish-canary: publish-canary:
name: publish canary name: publish canary
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04