mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
chore: add aarch64-apple-darwin builds to ci (#21243)
This is a prerequisite to automatic code signing.
This commit is contained in:
parent
c806fbdabe
commit
93c4c1a2c1
3 changed files with 169 additions and 97 deletions
82
.github/workflows/ci.generate.ts
vendored
82
.github/workflows/ci.generate.ts
vendored
|
@ -7,18 +7,22 @@ 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 = 59;
|
const cacheVersion = 59;
|
||||||
|
|
||||||
const Runners = (() => {
|
|
||||||
const ubuntuRunner = "ubuntu-22.04";
|
const ubuntuRunner = "ubuntu-22.04";
|
||||||
const ubuntuXlRunner = "ubuntu-22.04-xl";
|
const ubuntuXlRunner = "ubuntu-22.04-xl";
|
||||||
const windowsRunner = "windows-2022";
|
const windowsRunner = "windows-2022";
|
||||||
const windowsXlRunner = "windows-2022-xl";
|
const windowsXlRunner = "windows-2022-xl";
|
||||||
|
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-13-xlarge";
|
||||||
|
|
||||||
|
const Runners = (() => {
|
||||||
return {
|
return {
|
||||||
ubuntuXl:
|
ubuntuXl:
|
||||||
`\${{ github.repository == 'denoland/deno' && '${ubuntuXlRunner}' || '${ubuntuRunner}' }}`,
|
`\${{ github.repository == 'denoland/deno' && '${ubuntuXlRunner}' || '${ubuntuRunner}' }}`,
|
||||||
ubuntu: ubuntuRunner,
|
ubuntu: ubuntuRunner,
|
||||||
linux: ubuntuRunner,
|
linux: ubuntuRunner,
|
||||||
macos: "macos-12",
|
macos: macosX86Runner,
|
||||||
|
macosArm: macosArmRunner,
|
||||||
windows: windowsRunner,
|
windows: windowsRunner,
|
||||||
windowsXl:
|
windowsXl:
|
||||||
`\${{ github.repository == 'denoland/deno' && '${windowsXlRunner}' || '${windowsRunner}' }}`,
|
`\${{ github.repository == 'denoland/deno' && '${windowsXlRunner}' || '${windowsRunner}' }}`,
|
||||||
|
@ -199,7 +203,7 @@ function skipJobsIfPrAndMarkedSkip(
|
||||||
return steps.map((s) =>
|
return steps.map((s) =>
|
||||||
withCondition(
|
withCondition(
|
||||||
s,
|
s,
|
||||||
"!(github.event_name == 'pull_request' && matrix.skip_pr)",
|
"!(matrix.skip)",
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -235,6 +239,7 @@ function removeSurroundingExpression(text: string) {
|
||||||
|
|
||||||
function handleMatrixItems(items: {
|
function handleMatrixItems(items: {
|
||||||
skip_pr?: string | true;
|
skip_pr?: string | true;
|
||||||
|
skip?: string;
|
||||||
os: string;
|
os: string;
|
||||||
profile?: string;
|
profile?: string;
|
||||||
job?: string;
|
job?: string;
|
||||||
|
@ -246,20 +251,32 @@ function handleMatrixItems(items: {
|
||||||
return "ubuntu-x86_64";
|
return "ubuntu-x86_64";
|
||||||
} else if (os.includes("windows")) {
|
} else if (os.includes("windows")) {
|
||||||
return "windows-x86_64";
|
return "windows-x86_64";
|
||||||
} else if (os.includes("macos")) {
|
} else if (os == macosX86Runner) {
|
||||||
return "macos-x86_64";
|
return "macos-x86_64";
|
||||||
|
} else if (os == macosArmRunner) {
|
||||||
|
return "macos-aarch64";
|
||||||
} else {
|
} else {
|
||||||
throw new Error(`Display name not found: ${os}`);
|
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 on pull requests
|
// use a free "ubuntu" runner on jobs that are skipped
|
||||||
|
|
||||||
|
// skip_pr is shorthand for skip = github.event_name == 'pull_request'.
|
||||||
if (item.skip_pr != null) {
|
if (item.skip_pr != null) {
|
||||||
let text = "${{ github.event_name == 'pull_request' && ";
|
if (item.skip_pr === true) {
|
||||||
if (typeof item.skip_pr === "string") {
|
item.skip = "${{ github.event_name == 'pull_request' }}";
|
||||||
text += removeSurroundingExpression(item.skip_pr.toString()) + " && ";
|
} else if (typeof item.skip_pr === "string") {
|
||||||
|
item.skip = "${{ github.event_name == 'pull_request' && " +
|
||||||
|
removeSurroundingExpression(item.skip_pr.toString()) + " }}";
|
||||||
}
|
}
|
||||||
|
delete item.skip_pr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof item.skip === "string") {
|
||||||
|
let text = "${{ (";
|
||||||
|
text += removeSurroundingExpression(item.skip.toString()) + ") && ";
|
||||||
text += `'${Runners.ubuntu}' || ${
|
text += `'${Runners.ubuntu}' || ${
|
||||||
removeSurroundingExpression(item.os)
|
removeSurroundingExpression(item.os)
|
||||||
} }}`;
|
} }}`;
|
||||||
|
@ -267,6 +284,7 @@ function handleMatrixItems(items: {
|
||||||
// deno-lint-ignore no-explicit-any
|
// deno-lint-ignore no-explicit-any
|
||||||
(item as any).runner = text;
|
(item as any).runner = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
os_display_name: getOsDisplayName(item.os),
|
os_display_name: getOsDisplayName(item.os),
|
||||||
|
@ -343,6 +361,13 @@ const ci = {
|
||||||
job: "test",
|
job: "test",
|
||||||
profile: "release",
|
profile: "release",
|
||||||
skip_pr: true,
|
skip_pr: true,
|
||||||
|
}, {
|
||||||
|
os: 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,
|
os: Runners.windows,
|
||||||
job: "test",
|
job: "test",
|
||||||
|
@ -497,6 +522,14 @@ const ci = {
|
||||||
if: "matrix.use_sysroot",
|
if: "matrix.use_sysroot",
|
||||||
...sysRootStep,
|
...sysRootStep,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Install aarch64 lld",
|
||||||
|
run: [
|
||||||
|
"./tools/install_prebuilt.js ld64.lld",
|
||||||
|
"echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH",
|
||||||
|
].join("\n"),
|
||||||
|
if: `matrix.os == '${macosArmRunner}'`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Log versions",
|
name: "Log versions",
|
||||||
run: [
|
run: [
|
||||||
|
@ -601,9 +634,7 @@ const ci = {
|
||||||
if: [
|
if: [
|
||||||
"(matrix.job == 'test' || matrix.job == 'bench') &&",
|
"(matrix.job == 'test' || matrix.job == 'bench') &&",
|
||||||
"matrix.profile == 'release' && (matrix.use_sysroot ||",
|
"matrix.profile == 'release' && (matrix.use_sysroot ||",
|
||||||
"(github.repository == 'denoland/deno' &&",
|
"github.repository == 'denoland/deno')",
|
||||||
"(github.ref == 'refs/heads/main' ||",
|
|
||||||
"startsWith(github.ref, 'refs/tags/'))))",
|
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
run: [
|
run: [
|
||||||
// output fs space before and after building
|
// output fs space before and after building
|
||||||
|
@ -642,13 +673,12 @@ const ci = {
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Pre-release (mac)",
|
name: "Pre-release (mac intel)",
|
||||||
if: [
|
if: [
|
||||||
"startsWith(matrix.os, 'macOS') &&",
|
`matrix.os == '${macosX86Runner}' &&`,
|
||||||
"matrix.job == 'test' &&",
|
"matrix.job == 'test' &&",
|
||||||
"matrix.profile == 'release' &&",
|
"matrix.profile == 'release' &&",
|
||||||
"github.repository == 'denoland/deno' &&",
|
"github.repository == 'denoland/deno'",
|
||||||
"(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))",
|
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
run: [
|
run: [
|
||||||
"cd target/release",
|
"cd target/release",
|
||||||
|
@ -656,14 +686,27 @@ const ci = {
|
||||||
]
|
]
|
||||||
.join("\n"),
|
.join("\n"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Pre-release (mac aarch64)",
|
||||||
|
if: [
|
||||||
|
`matrix.os == '${macosArmRunner}' &&`,
|
||||||
|
"matrix.job == 'test' &&",
|
||||||
|
"matrix.profile == 'release' &&",
|
||||||
|
"github.repository == 'denoland/deno'",
|
||||||
|
].join("\n"),
|
||||||
|
run: [
|
||||||
|
"cd target/release",
|
||||||
|
"zip -r deno-aarch64-apple-darwin.zip deno",
|
||||||
|
]
|
||||||
|
.join("\n"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Pre-release (windows)",
|
name: "Pre-release (windows)",
|
||||||
if: [
|
if: [
|
||||||
"startsWith(matrix.os, 'windows') &&",
|
"startsWith(matrix.os, 'windows') &&",
|
||||||
"matrix.job == 'test' &&",
|
"matrix.job == 'test' &&",
|
||||||
"matrix.profile == 'release' &&",
|
"matrix.profile == 'release' &&",
|
||||||
"github.repository == 'denoland/deno' &&",
|
"github.repository == 'denoland/deno'",
|
||||||
"(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))",
|
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
shell: "pwsh",
|
shell: "pwsh",
|
||||||
run:
|
run:
|
||||||
|
@ -718,7 +761,7 @@ const ci = {
|
||||||
name: "Test debug (fast)",
|
name: "Test debug (fast)",
|
||||||
if: [
|
if: [
|
||||||
"matrix.job == 'test' && matrix.profile == 'debug' &&",
|
"matrix.job == 'test' && matrix.profile == 'debug' &&",
|
||||||
"!startsWith(matrix.os, 'ubuntu')",
|
"(startsWith(github.ref, 'refs/tags/') || !startsWith(matrix.os, 'ubuntu'))",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
run: [
|
run: [
|
||||||
// Run unit then integration tests. Skip doc tests here
|
// Run unit then integration tests. Skip doc tests here
|
||||||
|
@ -734,7 +777,7 @@ const ci = {
|
||||||
"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' &&",
|
||||||
"github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')))",
|
"!startsWith(github.ref, 'refs/tags/')))",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
run: "cargo test --release --locked",
|
run: "cargo test --release --locked",
|
||||||
},
|
},
|
||||||
|
@ -939,6 +982,7 @@ const ci = {
|
||||||
"target/release/deno-x86_64-pc-windows-msvc.zip",
|
"target/release/deno-x86_64-pc-windows-msvc.zip",
|
||||||
"target/release/deno-x86_64-unknown-linux-gnu.zip",
|
"target/release/deno-x86_64-unknown-linux-gnu.zip",
|
||||||
"target/release/deno-x86_64-apple-darwin.zip",
|
"target/release/deno-x86_64-apple-darwin.zip",
|
||||||
|
"target/release/deno-aarch64-apple-darwin.zip",
|
||||||
"target/release/deno_src.tar.gz",
|
"target/release/deno_src.tar.gz",
|
||||||
"target/release/lib.deno.d.ts",
|
"target/release/lib.deno.d.ts",
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
|
|
159
.github/workflows/ci.yml
vendored
159
.github/workflows/ci.yml
vendored
|
@ -60,9 +60,15 @@ jobs:
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
job: test
|
job: test
|
||||||
profile: release
|
profile: release
|
||||||
skip_pr: true
|
skip: '${{ github.event_name == ''pull_request'' }}'
|
||||||
runner: '${{ github.event_name == ''pull_request'' && ''ubuntu-22.04'' || ''macos-12'' }}'
|
runner: '${{ (github.event_name == ''pull_request'') && ''ubuntu-22.04'' || ''macos-12'' }}'
|
||||||
os_display_name: macos-x86_64
|
os_display_name: macos-x86_64
|
||||||
|
- os: macos-13-xlarge
|
||||||
|
job: test
|
||||||
|
profile: release
|
||||||
|
skip: '${{ github.event_name == ''pull_request'' || github.ref == ''refs/heads/main'' }}'
|
||||||
|
runner: '${{ (github.event_name == ''pull_request'' || github.ref == ''refs/heads/main'') && ''ubuntu-22.04'' || ''macos-13-xlarge'' }}'
|
||||||
|
os_display_name: macos-aarch64
|
||||||
- os: windows-2022
|
- os: windows-2022
|
||||||
job: test
|
job: test
|
||||||
profile: debug
|
profile: debug
|
||||||
|
@ -70,8 +76,8 @@ jobs:
|
||||||
- os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
- os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
||||||
job: test
|
job: test
|
||||||
profile: release
|
profile: release
|
||||||
skip_pr: true
|
skip: '${{ github.event_name == ''pull_request'' }}'
|
||||||
runner: '${{ github.event_name == ''pull_request'' && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
runner: '${{ (github.event_name == ''pull_request'') && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
||||||
os_display_name: windows-x86_64
|
os_display_name: windows-x86_64
|
||||||
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
|
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
|
||||||
job: test
|
job: test
|
||||||
|
@ -83,8 +89,8 @@ jobs:
|
||||||
job: bench
|
job: bench
|
||||||
profile: release
|
profile: release
|
||||||
use_sysroot: true
|
use_sysroot: true
|
||||||
skip_pr: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-bench'') }}'
|
skip: '${{ github.event_name == ''pull_request'' && !contains(github.event.pull_request.labels.*.name, ''ci-bench'') }}'
|
||||||
runner: '${{ 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'' }}'
|
runner: '${{ (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_display_name: ubuntu-x86_64
|
os_display_name: ubuntu-x86_64
|
||||||
- os: ubuntu-22.04
|
- os: ubuntu-22.04
|
||||||
job: test
|
job: test
|
||||||
|
@ -109,7 +115,7 @@ jobs:
|
||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
steps:
|
steps:
|
||||||
- name: Reconfigure Windows Storage
|
- name: Reconfigure Windows Storage
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (startsWith(matrix.os, ''windows'') && !endsWith(matrix.os, ''-xl''))'
|
if: '!(matrix.skip) && (startsWith(matrix.os, ''windows'') && !endsWith(matrix.os, ''-xl''))'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |-
|
run: |-
|
||||||
New-Item -ItemType "directory" -Path "$env:TEMP/__target__"
|
New-Item -ItemType "directory" -Path "$env:TEMP/__target__"
|
||||||
|
@ -118,25 +124,25 @@ jobs:
|
||||||
run: |-
|
run: |-
|
||||||
git config --global core.symlinks true
|
git config --global core.symlinks true
|
||||||
git config --global fetch.parallel 32
|
git config --global fetch.parallel 32
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
if: '!(matrix.skip)'
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 5
|
fetch-depth: 5
|
||||||
submodules: false
|
submodules: false
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
if: '!(matrix.skip)'
|
||||||
- name: Clone submodule ./test_util/std
|
- name: Clone submodule ./test_util/std
|
||||||
run: git submodule update --init --recursive --depth=1 -- ./test_util/std
|
run: git submodule update --init --recursive --depth=1 -- ./test_util/std
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
if: '!(matrix.skip)'
|
||||||
- name: Clone submodule ./test_util/wpt
|
- name: Clone submodule ./test_util/wpt
|
||||||
run: git submodule update --init --recursive --depth=1 -- ./test_util/wpt
|
run: git submodule update --init --recursive --depth=1 -- ./test_util/wpt
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
if: '!(matrix.skip) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
||||||
- name: 'Create source tarballs (release, linux)'
|
- name: 'Create source tarballs (release, linux)'
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (startsWith(matrix.os, 'ubuntu') &&
|
!(matrix.skip) && (startsWith(matrix.os, 'ubuntu') &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -146,8 +152,8 @@ jobs:
|
||||||
tar --exclude=".git*" --exclude=target --exclude=third_party/prebuilt \
|
tar --exclude=".git*" --exclude=target --exclude=third_party/prebuilt \
|
||||||
-czvf target/release/deno_src.tar.gz -C .. deno
|
-czvf target/release/deno_src.tar.gz -C .. deno
|
||||||
- uses: dsherret/rust-toolchain-file@v1
|
- uses: dsherret/rust-toolchain-file@v1
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
if: '!(matrix.skip)'
|
||||||
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' || matrix.job == ''test'' || matrix.job == ''bench'')'
|
- if: '!(matrix.skip) && (matrix.job == ''lint'' || matrix.job == ''test'' || matrix.job == ''bench'')'
|
||||||
name: Install Deno
|
name: Install Deno
|
||||||
uses: denoland/setup-deno@v1
|
uses: denoland/setup-deno@v1
|
||||||
with:
|
with:
|
||||||
|
@ -156,16 +162,16 @@ jobs:
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.11
|
python-version: 3.11
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job != ''lint'')'
|
if: '!(matrix.skip) && (matrix.job != ''lint'')'
|
||||||
- name: Remove unused versions of Python
|
- name: Remove unused versions of Python
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job != ''lint'' && (startsWith(matrix.os, ''windows'')))'
|
if: '!(matrix.skip) && (matrix.job != ''lint'' && (startsWith(matrix.os, ''windows'')))'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |-
|
run: |-
|
||||||
$env:PATH -split ";" |
|
$env:PATH -split ";" |
|
||||||
Where-Object { Test-Path "$_\python.exe" } |
|
Where-Object { Test-Path "$_\python.exe" } |
|
||||||
Select-Object -Skip 1 |
|
Select-Object -Skip 1 |
|
||||||
ForEach-Object { Move-Item "$_" "$_.disabled" }
|
ForEach-Object { Move-Item "$_" "$_.disabled" }
|
||||||
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''bench'')'
|
- if: '!(matrix.skip) && (matrix.job == ''bench'')'
|
||||||
name: Install Node
|
name: Install Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
|
@ -175,9 +181,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
version: '21.12'
|
version: '21.12'
|
||||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
if: '!(matrix.skip)'
|
||||||
- if: |-
|
- if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.profile == 'release' &&
|
!(matrix.skip) && (matrix.profile == 'release' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
(github.ref == 'refs/heads/main' ||
|
(github.ref == 'refs/heads/main' ||
|
||||||
|
@ -191,7 +197,7 @@ jobs:
|
||||||
create_credentials_file: true
|
create_credentials_file: true
|
||||||
- name: Setup gcloud (unix)
|
- name: Setup gcloud (unix)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (runner.os != 'Windows' &&
|
!(matrix.skip) && (runner.os != 'Windows' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -202,7 +208,7 @@ jobs:
|
||||||
project_id: denoland
|
project_id: denoland
|
||||||
- name: Setup gcloud (windows)
|
- name: Setup gcloud (windows)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (runner.os == 'Windows' &&
|
!(matrix.skip) && (runner.os == 'Windows' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -215,12 +221,12 @@ jobs:
|
||||||
project_id: denoland
|
project_id: denoland
|
||||||
- name: Configure canary build
|
- name: Configure canary build
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' &&
|
!(matrix.skip) && (matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
github.ref == 'refs/heads/main')
|
github.ref == 'refs/heads/main')
|
||||||
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
|
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
|
||||||
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.use_sysroot)'
|
- if: '!(matrix.skip) && (matrix.use_sysroot)'
|
||||||
name: Set up incremental LTO and sysroot build
|
name: Set up incremental LTO and sysroot build
|
||||||
run: |-
|
run: |-
|
||||||
# Avoid running man-db triggers, which sometimes takes several minutes
|
# Avoid running man-db triggers, which sometimes takes several minutes
|
||||||
|
@ -294,6 +300,11 @@ jobs:
|
||||||
CC=clang-16
|
CC=clang-16
|
||||||
CFLAGS=-flto=thin --sysroot=/sysroot
|
CFLAGS=-flto=thin --sysroot=/sysroot
|
||||||
__0
|
__0
|
||||||
|
- name: Install aarch64 lld
|
||||||
|
run: |-
|
||||||
|
./tools/install_prebuilt.js ld64.lld
|
||||||
|
echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
|
||||||
|
if: '!(matrix.skip) && (matrix.os == ''macos-13-xlarge'')'
|
||||||
- name: Log versions
|
- name: Log versions
|
||||||
run: |-
|
run: |-
|
||||||
python --version
|
python --version
|
||||||
|
@ -308,7 +319,7 @@ jobs:
|
||||||
node -v
|
node -v
|
||||||
./tools/install_prebuilt.js wrk hyperfine
|
./tools/install_prebuilt.js wrk hyperfine
|
||||||
fi
|
fi
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
if: '!(matrix.skip)'
|
||||||
- name: Cache Cargo home
|
- name: Cache Cargo home
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
@ -317,10 +328,10 @@ jobs:
|
||||||
~/.cargo/registry/cache
|
~/.cargo/registry/cache
|
||||||
key: '59-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
|
key: '59-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
|
||||||
restore-keys: '59-cargo-home-${{ matrix.os }}'
|
restore-keys: '59-cargo-home-${{ matrix.os }}'
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
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
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/''))'
|
if: '!(matrix.skip) && (github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/''))'
|
||||||
with:
|
with:
|
||||||
path: |-
|
path: |-
|
||||||
./target
|
./target
|
||||||
|
@ -330,26 +341,26 @@ jobs:
|
||||||
key: never_saved
|
key: never_saved
|
||||||
restore-keys: '59-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
|
restore-keys: '59-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
|
||||||
- name: Apply and update mtime cache
|
- name: Apply and update mtime cache
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (!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: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
if: '!(matrix.skip) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
||||||
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: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && github.event_name == ''pull_request'' && startsWith(matrix.os, ''ubuntu''))'
|
if: '!(matrix.skip) && (matrix.job == ''lint'' && github.event_name == ''pull_request'' && startsWith(matrix.os, ''ubuntu''))'
|
||||||
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"
|
||||||
- name: lint.js
|
- name: lint.js
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
if: '!(matrix.skip) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
||||||
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: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''test'' && matrix.profile == ''debug'')'
|
if: '!(matrix.skip) && (matrix.job == ''test'' && matrix.profile == ''debug'')'
|
||||||
run: |-
|
run: |-
|
||||||
df -h
|
df -h
|
||||||
cargo build --locked --all-targets
|
cargo build --locked --all-targets
|
||||||
|
@ -358,18 +369,16 @@ jobs:
|
||||||
CARGO_PROFILE_DEV_DEBUG: 0
|
CARGO_PROFILE_DEV_DEBUG: 0
|
||||||
- name: Build release
|
- name: Build release
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && ((matrix.job == 'test' || matrix.job == 'bench') &&
|
!(matrix.skip) && ((matrix.job == 'test' || matrix.job == 'bench') &&
|
||||||
matrix.profile == 'release' && (matrix.use_sysroot ||
|
matrix.profile == 'release' && (matrix.use_sysroot ||
|
||||||
(github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno'))
|
||||||
(github.ref == 'refs/heads/main' ||
|
|
||||||
startsWith(github.ref, 'refs/tags/')))))
|
|
||||||
run: |-
|
run: |-
|
||||||
df -h
|
df -h
|
||||||
cargo build --release --locked --all-targets
|
cargo build --release --locked --all-targets
|
||||||
df -h
|
df -h
|
||||||
- name: Upload PR artifact (linux)
|
- name: Upload PR artifact (linux)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' &&
|
!(matrix.skip) && (matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' && (matrix.use_sysroot ||
|
matrix.profile == 'release' && (matrix.use_sysroot ||
|
||||||
(github.repository == 'denoland/deno' &&
|
(github.repository == 'denoland/deno' &&
|
||||||
(github.ref == 'refs/heads/main' ||
|
(github.ref == 'refs/heads/main' ||
|
||||||
|
@ -380,7 +389,7 @@ jobs:
|
||||||
path: target/release/deno
|
path: target/release/deno
|
||||||
- name: Pre-release (linux)
|
- name: Pre-release (linux)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (startsWith(matrix.os, 'ubuntu') &&
|
!(matrix.skip) && (startsWith(matrix.os, 'ubuntu') &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno')
|
github.repository == 'denoland/deno')
|
||||||
|
@ -388,28 +397,35 @@ jobs:
|
||||||
cd target/release
|
cd target/release
|
||||||
zip -r deno-x86_64-unknown-linux-gnu.zip deno
|
zip -r deno-x86_64-unknown-linux-gnu.zip deno
|
||||||
./deno types > lib.deno.d.ts
|
./deno types > lib.deno.d.ts
|
||||||
- name: Pre-release (mac)
|
- name: Pre-release (mac intel)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (startsWith(matrix.os, 'macOS') &&
|
!(matrix.skip) && (matrix.os == 'macos-12' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno')
|
||||||
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')))
|
|
||||||
run: |-
|
run: |-
|
||||||
cd target/release
|
cd target/release
|
||||||
zip -r deno-x86_64-apple-darwin.zip deno
|
zip -r deno-x86_64-apple-darwin.zip deno
|
||||||
- name: Pre-release (windows)
|
- name: Pre-release (mac aarch64)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (startsWith(matrix.os, 'windows') &&
|
!(matrix.skip) && (matrix.os == 'macos-13-xlarge' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno')
|
||||||
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')))
|
run: |-
|
||||||
|
cd target/release
|
||||||
|
zip -r deno-aarch64-apple-darwin.zip deno
|
||||||
|
- name: Pre-release (windows)
|
||||||
|
if: |-
|
||||||
|
!(matrix.skip) && (startsWith(matrix.os, 'windows') &&
|
||||||
|
matrix.job == 'test' &&
|
||||||
|
matrix.profile == 'release' &&
|
||||||
|
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-x86_64-pc-windows-msvc.zip
|
||||||
- name: Upload canary to dl.deno.land (unix)
|
- name: Upload canary to dl.deno.land (unix)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (runner.os != 'Windows' &&
|
!(matrix.skip) && (runner.os != 'Windows' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -417,7 +433,7 @@ jobs:
|
||||||
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/'
|
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/'
|
||||||
- name: Upload canary to dl.deno.land (windows)
|
- name: Upload canary to dl.deno.land (windows)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (runner.os == 'Windows' &&
|
!(matrix.skip) && (runner.os == 'Windows' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -427,20 +443,20 @@ jobs:
|
||||||
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/'
|
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/'
|
||||||
- name: Autobahn testsuite
|
- name: Autobahn testsuite
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'release' &&
|
!(matrix.skip) && (matrix.job == 'test' && matrix.profile == 'release' &&
|
||||||
!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu'))
|
!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu'))
|
||||||
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 debug
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'debug' &&
|
!(matrix.skip) && (matrix.job == 'test' && matrix.profile == 'debug' &&
|
||||||
!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu'))
|
!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu'))
|
||||||
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 debug (fast)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'debug' &&
|
!(matrix.skip) && (matrix.job == 'test' && matrix.profile == 'debug' &&
|
||||||
!startsWith(matrix.os, 'ubuntu'))
|
(startsWith(github.ref, 'refs/tags/') || !startsWith(matrix.os, 'ubuntu')))
|
||||||
run: |-
|
run: |-
|
||||||
cargo test --locked --lib
|
cargo test --locked --lib
|
||||||
cargo test --locked --test '*'
|
cargo test --locked --test '*'
|
||||||
|
@ -448,25 +464,25 @@ jobs:
|
||||||
CARGO_PROFILE_DEV_DEBUG: 0
|
CARGO_PROFILE_DEV_DEBUG: 0
|
||||||
- name: Test release
|
- name: Test release
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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' &&
|
||||||
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/'))))
|
!startsWith(github.ref, 'refs/tags/'))))
|
||||||
run: cargo test --release --locked
|
run: cargo test --release --locked
|
||||||
- name: Check deno binary
|
- name: Check deno binary
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.profile == ''release'' && startsWith(github.ref, ''refs/tags/''))'
|
if: '!(matrix.skip) && (matrix.profile == ''release'' && startsWith(github.ref, ''refs/tags/''))'
|
||||||
run: target/release/deno eval "console.log(1+2)" | grep 3
|
run: target/release/deno eval "console.log(1+2)" | grep 3
|
||||||
env:
|
env:
|
||||||
NO_COLOR: 1
|
NO_COLOR: 1
|
||||||
- name: Check deno binary (in sysroot)
|
- name: Check deno binary (in sysroot)
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.profile == ''release'' && matrix.use_sysroot)'
|
if: '!(matrix.skip) && (matrix.profile == ''release'' && matrix.use_sysroot)'
|
||||||
run: sudo chroot /sysroot "$(pwd)/target/release/deno" --version
|
run: sudo chroot /sysroot "$(pwd)/target/release/deno" --version
|
||||||
- name: Configure hosts file for WPT
|
- name: Configure hosts file for WPT
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.wpt)'
|
if: '!(matrix.skip) && (matrix.wpt)'
|
||||||
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
|
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
|
||||||
working-directory: test_util/wpt/
|
working-directory: test_util/wpt/
|
||||||
- name: Run web platform tests (debug)
|
- name: Run web platform tests (debug)
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.wpt && matrix.profile == ''debug'')'
|
if: '!(matrix.skip) && (matrix.wpt && matrix.profile == ''debug'')'
|
||||||
env:
|
env:
|
||||||
DENO_BIN: ./target/debug/deno
|
DENO_BIN: ./target/debug/deno
|
||||||
run: |-
|
run: |-
|
||||||
|
@ -479,7 +495,7 @@ jobs:
|
||||||
--lock=tools/deno.lock.json \
|
--lock=tools/deno.lock.json \
|
||||||
./tools/wpt.ts run --quiet --binary="$DENO_BIN"
|
./tools/wpt.ts run --quiet --binary="$DENO_BIN"
|
||||||
- name: Run web platform tests (release)
|
- name: Run web platform tests (release)
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.wpt && matrix.profile == ''release'')'
|
if: '!(matrix.skip) && (matrix.wpt && matrix.profile == ''release'')'
|
||||||
env:
|
env:
|
||||||
DENO_BIN: ./target/release/deno
|
DENO_BIN: ./target/release/deno
|
||||||
run: |-
|
run: |-
|
||||||
|
@ -497,7 +513,7 @@ jobs:
|
||||||
- name: Upload wpt results to dl.deno.land
|
- name: Upload wpt results to dl.deno.land
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.wpt &&
|
!(matrix.skip) && (matrix.wpt &&
|
||||||
runner.os == 'Linux' &&
|
runner.os == 'Linux' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -511,7 +527,7 @@ jobs:
|
||||||
- name: Upload wpt results to wpt.fyi
|
- name: Upload wpt results to wpt.fyi
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.wpt &&
|
!(matrix.skip) && (matrix.wpt &&
|
||||||
runner.os == 'Linux' &&
|
runner.os == 'Linux' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -524,11 +540,11 @@ jobs:
|
||||||
./target/release/deno run --allow-all --lock=tools/deno.lock.json \
|
./target/release/deno run --allow-all --lock=tools/deno.lock.json \
|
||||||
./tools/upload_wptfyi.js $(git rev-parse HEAD) --ghstatus
|
./tools/upload_wptfyi.js $(git rev-parse HEAD) --ghstatus
|
||||||
- name: Run benchmarks
|
- name: Run benchmarks
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''bench'' && !startsWith(github.ref, ''refs/tags/''))'
|
if: '!(matrix.skip) && (matrix.job == ''bench'' && !startsWith(github.ref, ''refs/tags/''))'
|
||||||
run: cargo bench --locked
|
run: cargo bench --locked
|
||||||
- name: Post Benchmarks
|
- name: Post Benchmarks
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'bench' &&
|
!(matrix.skip) && (matrix.job == 'bench' &&
|
||||||
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/'))
|
||||||
env:
|
env:
|
||||||
|
@ -546,18 +562,18 @@ jobs:
|
||||||
git commit --message "Update benchmarks"
|
git commit --message "Update benchmarks"
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
- name: Build product size info
|
- name: Build product size info
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job != ''lint'' && matrix.profile != ''debug'' && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')))'
|
if: '!(matrix.skip) && (matrix.job != ''lint'' && matrix.profile != ''debug'' && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')))'
|
||||||
run: |-
|
run: |-
|
||||||
du -hd1 "./target/${{ matrix.profile }}"
|
du -hd1 "./target/${{ matrix.profile }}"
|
||||||
du -ha "./target/${{ matrix.profile }}/deno"
|
du -ha "./target/${{ matrix.profile }}/deno"
|
||||||
- name: Worker info
|
- name: Worker info
|
||||||
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''bench'')'
|
if: '!(matrix.skip) && (matrix.job == ''bench'')'
|
||||||
run: |-
|
run: |-
|
||||||
cat /proc/cpuinfo
|
cat /proc/cpuinfo
|
||||||
cat /proc/meminfo
|
cat /proc/meminfo
|
||||||
- name: Upload release to dl.deno.land (unix)
|
- name: Upload release to dl.deno.land (unix)
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (runner.os != 'Windows' &&
|
!(matrix.skip) && (runner.os != 'Windows' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -565,7 +581,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: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (runner.os == 'Windows' &&
|
!(matrix.skip) && (runner.os == 'Windows' &&
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
|
@ -575,7 +591,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: Create release notes
|
- name: Create release notes
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' &&
|
!(matrix.skip) && (matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
startsWith(github.ref, 'refs/tags/'))
|
startsWith(github.ref, 'refs/tags/'))
|
||||||
|
@ -585,7 +601,7 @@ jobs:
|
||||||
- name: Upload release to GitHub
|
- name: Upload release to GitHub
|
||||||
uses: softprops/action-gh-release@v0.1.15
|
uses: softprops/action-gh-release@v0.1.15
|
||||||
if: |-
|
if: |-
|
||||||
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' &&
|
!(matrix.skip) && (matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
startsWith(github.ref, 'refs/tags/'))
|
startsWith(github.ref, 'refs/tags/'))
|
||||||
|
@ -596,13 +612,14 @@ jobs:
|
||||||
target/release/deno-x86_64-pc-windows-msvc.zip
|
target/release/deno-x86_64-pc-windows-msvc.zip
|
||||||
target/release/deno-x86_64-unknown-linux-gnu.zip
|
target/release/deno-x86_64-unknown-linux-gnu.zip
|
||||||
target/release/deno-x86_64-apple-darwin.zip
|
target/release/deno-x86_64-apple-darwin.zip
|
||||||
|
target/release/deno-aarch64-apple-darwin.zip
|
||||||
target/release/deno_src.tar.gz
|
target/release/deno_src.tar.gz
|
||||||
target/release/lib.deno.d.ts
|
target/release/lib.deno.d.ts
|
||||||
body_path: target/release/release-notes.md
|
body_path: target/release/release-notes.md
|
||||||
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: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && ((matrix.job == ''test'' || matrix.job == ''lint'') && github.ref == ''refs/heads/main'')'
|
if: '!(matrix.skip) && ((matrix.job == ''test'' || matrix.job == ''lint'') && github.ref == ''refs/heads/main'')'
|
||||||
with:
|
with:
|
||||||
path: |-
|
path: |-
|
||||||
./target
|
./target
|
||||||
|
|
|
@ -19,6 +19,8 @@ const versions = {
|
||||||
"dlint": "dlint 0.51.0",
|
"dlint": "dlint 0.51.0",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const compressed = new Set(["ld64.lld"]);
|
||||||
|
|
||||||
export const ROOT_PATH = dirname(dirname(fromFileUrl(import.meta.url)));
|
export const ROOT_PATH = dirname(dirname(fromFileUrl(import.meta.url)));
|
||||||
|
|
||||||
async function getFilesFromGit(baseDir, args) {
|
async function getFilesFromGit(baseDir, args) {
|
||||||
|
@ -176,7 +178,7 @@ export function getPrebuiltToolPath(toolName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const downloadUrl =
|
const downloadUrl =
|
||||||
`https://raw.githubusercontent.com/denoland/deno_third_party/69ffd968c0c435f5f9dbba713a92b4fb6a3e2301/prebuilt/${platformDirName}`;
|
`https://raw.githubusercontent.com/denoland/deno_third_party/1fd66ef78ab40841db833d4a1efd5c5597faf066/prebuilt/${platformDirName}`;
|
||||||
|
|
||||||
export async function downloadPrebuilt(toolName) {
|
export async function downloadPrebuilt(toolName) {
|
||||||
// Ensure only one download per tool happens at a time
|
// Ensure only one download per tool happens at a time
|
||||||
|
@ -195,7 +197,10 @@ export async function downloadPrebuilt(toolName) {
|
||||||
try {
|
try {
|
||||||
await Deno.mkdir(PREBUILT_TOOL_DIR, { recursive: true });
|
await Deno.mkdir(PREBUILT_TOOL_DIR, { recursive: true });
|
||||||
|
|
||||||
const url = `${downloadUrl}/${toolName}${executableSuffix}`;
|
let url = `${downloadUrl}/${toolName}${executableSuffix}`;
|
||||||
|
if (compressed.has(toolName)) {
|
||||||
|
url += ".gz";
|
||||||
|
}
|
||||||
|
|
||||||
const resp = await fetch(url);
|
const resp = await fetch(url);
|
||||||
if (!resp.ok) {
|
if (!resp.ok) {
|
||||||
|
@ -208,7 +213,13 @@ export async function downloadPrebuilt(toolName) {
|
||||||
mode: 0o755,
|
mode: 0o755,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (compressed.has(toolName)) {
|
||||||
|
await resp.body.pipeThrough(new DecompressionStream("gzip")).pipeTo(
|
||||||
|
file.writable,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
await resp.body.pipeTo(file.writable);
|
await resp.body.pipeTo(file.writable);
|
||||||
|
}
|
||||||
spinner.text = `Checking prebuilt tool: ${toolName}`;
|
spinner.text = `Checking prebuilt tool: ${toolName}`;
|
||||||
await sanityCheckPrebuiltFile(tempFile);
|
await sanityCheckPrebuiltFile(tempFile);
|
||||||
if (!await verifyVersion(toolName, tempFile)) {
|
if (!await verifyVersion(toolName, tempFile)) {
|
||||||
|
|
Loading…
Reference in a new issue