2023-01-10 19:16:11 -05:00
# GENERATED BY ./ci.generate.ts -- DO NOT DIRECTLY EDIT
2019-09-18 17:23:27 -04:00
2023-01-10 19:16:11 -05:00
name : ci
2024-03-01 11:11:32 -05:00
permissions :
contents : write
2023-01-10 19:16:11 -05:00
on :
2023-01-11 13:44:11 -05:00
push :
branches :
- main
tags :
- '*'
pull_request :
types :
- opened
- reopened
- synchronize
- ready_for_review
2022-03-02 05:34:27 -05:00
concurrency :
2023-01-12 15:45:41 -05:00
group : '${{ github.workflow }}-${{ !contains(github.event.pull_request.labels.*.name, ' 'ci-test-flaky' ') && github.head_ref || github.run_id }}'
2022-03-02 05:34:27 -05:00
cancel-in-progress : true
2019-09-18 17:23:27 -04:00
jobs :
2023-04-08 09:27:21 -04:00
pre_build :
name : pre-build
runs-on : ubuntu-latest
outputs :
skip_build : '${{ steps.check.outputs.skip_build }}'
steps :
- name : Configure git
run : |-
git config --global core.symlinks true
git config --global fetch.parallel 32
if : github.event.pull_request.draft == true
- name : Clone repository
2024-02-07 11:06:33 -05:00
uses : actions/checkout@v4
2023-04-08 09:27:21 -04:00
with :
2024-09-19 09:54:59 -04:00
fetch-depth : 5
2023-04-08 09:27:21 -04:00
submodules : false
if : github.event.pull_request.draft == true
- id : check
2024-06-04 20:51:27 -04:00
if : 'github.event.pull_request.draft == true && (!contains(github.event.pull_request.labels.*.name, ' 'ci-draft' '))'
2023-04-08 09:27:21 -04:00
run : |-
GIT_MESSAGE=$(git log --format=%s -n 1 ${{github.event.after}})
echo Commit message : $GIT_MESSAGE
2024-06-04 20:51:27 -04:00
echo $GIT_MESSAGE | grep '\[ci\]' || (echo 'Exiting due to draft PR. Commit with [ci] to bypass or add the ci-draft label.' ; echo 'skip_build=true' >> $GITHUB_OUTPUT)
2019-09-18 17:23:27 -04:00
build :
2024-01-31 08:59:47 -05:00
name : '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }}'
2023-04-08 09:27:21 -04:00
needs :
- pre_build
if : '${{ needs.pre_build.outputs.skip_build != ' 'true' ' }}'
2024-01-31 08:59:47 -05:00
runs-on : '${{ matrix.runner }}'
2024-09-19 20:05:20 -04:00
timeout-minutes : 180
2023-03-24 12:00:47 -04:00
defaults :
run :
shell : bash
2019-09-18 17:23:27 -04:00
strategy :
matrix :
2020-09-26 10:13:59 -04:00
include :
2024-01-31 08:59:47 -05:00
- os : macos
arch : x86_64
2024-04-02 17:46:05 -04:00
runner : macos-13
2021-09-22 11:15:04 -04:00
job : test
2023-03-15 21:47:15 -04:00
profile : debug
2024-01-31 08:59:47 -05:00
- os : macos
arch : x86_64
2024-11-01 06:43:02 -04:00
runner : '${{ (!contains(github.event.pull_request.labels.*.name, ' 'ci-full' ') && (github.event_name == ' 'pull_request' ')) && ' 'ubuntu-24.04' ' || ' 'macos-13' ' }}'
2021-08-14 07:28:22 -04:00
job : test
2021-04-23 12:54:23 -04:00
profile : release
2023-11-23 17:30:26 -05:00
skip : '${{ !contains(github.event.pull_request.labels.*.name, ' 'ci-full' ') && (github.event_name == ' 'pull_request' ') }}'
2024-01-31 08:59:47 -05:00
- os : macos
arch : aarch64
2024-11-04 18:56:09 -05:00
runner : '${{ github.repository == ' 'denoland/deno' ' && startsWith(github.ref, ' 'refs/tags/' ') && ' 'self-hosted' ' || ' 'macos-14' ' }}'
2024-01-31 08:59:47 -05:00
job : test
profile : debug
- os : macos
arch : aarch64
2024-11-04 18:56:09 -05:00
runner : '${{ (!contains(github.event.pull_request.labels.*.name, ' 'ci-full' ') && (github.event_name == ' 'pull_request' ')) && ' 'ubuntu-24.04' ' || github.repository == ' 'denoland/deno' ' && startsWith(github.ref, ' 'refs/tags/' ') && ' 'self-hosted' ' || ' 'macos-14' ' }}'
2023-11-19 18:11:20 -05:00
job : test
profile : release
2024-01-31 08:59:47 -05:00
skip : '${{ !contains(github.event.pull_request.labels.*.name, ' 'ci-full' ') && (github.event_name == ' 'pull_request' ') }}'
- os : windows
arch : x86_64
runner : windows-2022
2021-09-22 11:15:04 -04:00
job : test
2023-03-15 21:47:15 -04:00
profile : debug
2024-01-31 08:59:47 -05:00
- os : windows
arch : x86_64
2024-11-01 06:43:02 -04:00
runner : '${{ (!contains(github.event.pull_request.labels.*.name, ' 'ci-full' ') && (github.event_name == ' 'pull_request' ')) && ' 'ubuntu-24.04' ' || github.repository == ' 'denoland/deno' ' && ' 'windows-2022-xl' ' || ' 'windows-2022' ' }}'
2021-08-14 07:28:22 -04:00
job : test
2021-04-23 12:54:23 -04:00
profile : release
2023-11-23 17:30:26 -05:00
skip : '${{ !contains(github.event.pull_request.labels.*.name, ' 'ci-full' ') && (github.event_name == ' 'pull_request' ') }}'
2024-01-31 08:59:47 -05:00
- os : linux
arch : x86_64
2024-11-01 06:43:02 -04:00
runner : '${{ github.repository == ' 'denoland/deno' ' && ' 'ubuntu-24.04-xl' ' || ' 'ubuntu-24.04' ' }}'
2021-08-14 07:28:22 -04:00
job : test
2021-05-11 18:06:58 -04:00
profile : release
use_sysroot : true
2023-01-12 11:22:38 -05:00
wpt : '${{ !startsWith(github.ref, ' 'refs/tags/' ') }}'
2024-01-31 08:59:47 -05:00
- os : linux
arch : x86_64
2024-11-01 06:43:02 -04:00
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-24.04' ' || github.repository == ' 'denoland/deno' ' && ' 'ubuntu-24.04-xl' ' || ' 'ubuntu-24.04' ' }}'
2021-08-14 07:28:22 -04:00
job : bench
2021-04-23 12:54:23 -04:00
profile : release
2021-05-11 18:06:58 -04:00
use_sysroot : true
2023-11-23 17:30:26 -05:00
skip : '${{ !contains(github.event.pull_request.labels.*.name, ' 'ci-full' ') && (github.event_name == ' 'pull_request' ' && !contains(github.event.pull_request.labels.*.name, ' 'ci-bench' ')) }}'
2024-01-31 08:59:47 -05:00
- os : linux
arch : x86_64
2024-11-01 06:43:02 -04:00
runner : ubuntu-24.04
2021-08-14 07:28:22 -04:00
job : test
2021-04-23 12:54:23 -04:00
profile : debug
2022-10-06 11:50:00 -04:00
use_sysroot : true
2024-01-31 08:59:47 -05:00
- os : linux
arch : x86_64
2024-11-01 06:43:02 -04:00
runner : ubuntu-24.04
2021-08-14 07:28:22 -04:00
job : lint
2021-04-23 12:54:23 -04:00
profile : debug
2024-02-08 13:51:37 -05:00
- os : linux
arch : aarch64
runner : ubicloud-standard-16-arm
job : test
profile : debug
- os : linux
arch : aarch64
runner : ubicloud-standard-16-arm
job : test
profile : release
use_sysroot : true
2024-01-31 08:59:47 -05:00
- os : macos
arch : x86_64
2024-04-02 17:46:05 -04:00
runner : macos-13
2023-08-01 16:08:41 -04:00
job : lint
profile : debug
2024-01-31 08:59:47 -05:00
- os : windows
arch : x86_64
runner : windows-2022
2023-08-01 16:08:41 -04:00
job : lint
profile : debug
2023-01-10 19:16:11 -05:00
fail-fast : '${{ github.event_name == ' 'pull_request' ' || (github.ref != ' 'refs/heads/main' ' && !startsWith(github.ref, ' 'refs/tags/' ')) }}'
2020-03-17 20:06:40 -04:00
env :
2021-05-11 18:06:58 -04:00
CARGO_TERM_COLOR : always
2020-03-17 20:06:40 -04:00
RUST_BACKTRACE : full
2024-01-09 18:20:52 -05:00
RUST_LIB_BACKTRACE : 0
2019-09-18 17:23:27 -04:00
steps :
- name : Configure git
2023-01-10 19:16:11 -05:00
run : |-
2021-05-11 18:06:58 -04:00
git config --global core.symlinks true
git config --global fetch.parallel 32
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip)'
2019-09-18 17:23:27 -04:00
- name : Clone repository
2024-02-07 11:06:33 -05:00
uses : actions/checkout@v4
2019-09-18 17:23:27 -04:00
with :
2024-09-19 09:54:59 -04:00
fetch-depth : 5
2023-01-11 08:23:08 -05:00
submodules : false
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip)'
2024-02-13 11:22:49 -05:00
- name : Clone submodule ./tests/util/std
run : git submodule update --init --recursive --depth=1 -- ./tests/util/std
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip)'
2024-02-15 22:32:28 -05:00
- name : Clone submodule ./tests/wpt/suite
run : git submodule update --init --recursive --depth=1 -- ./tests/wpt/suite
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.wpt)'
2024-04-02 18:24:55 -04:00
- name : Clone submodule ./tests/node_compat/runner/suite
run : git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
2024-01-31 08:59:47 -05:00
if : '!(matrix.skip) && (matrix.job == ' 'lint' ' && matrix.os == ' 'linux' ')'
2024-04-16 17:13:48 -04:00
- name : Clone submodule ./cli/bench/testdata/lsp_benchdata
run : git submodule update --init --recursive --depth=1 -- ./cli/bench/testdata/lsp_benchdata
if : '!(matrix.skip) && (matrix.job == ' 'bench' ')'
2023-01-10 19:16:11 -05:00
- name : 'Create source tarballs (release, linux)'
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.os == 'linux' &&
2021-04-23 12:54:23 -04:00
matrix.profile == 'release' &&
2021-08-14 07:28:22 -04:00
matrix.job == 'test' &&
2020-05-08 13:28:49 -04:00
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/'))
2023-01-10 19:16:11 -05:00
run : |-
2019-10-25 15:29:17 -04:00
mkdir -p target/release
2021-05-11 18:06:58 -04:00
tar --exclude=".git*" --exclude=target --exclude=third_party/prebuilt \
-czvf target/release/deno_src.tar.gz -C .. deno
2023-03-09 17:01:41 -05:00
- uses : dsherret/rust-toolchain-file@v1
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip)'
- if : '!(matrix.skip) && (matrix.job == ' 'lint' ' || matrix.job == ' 'test' ' || matrix.job == ' 'bench' ')'
2023-01-11 08:23:08 -05:00
name : Install Deno
2024-10-22 11:24:27 -04:00
uses : denoland/setup-deno@v2
2022-03-30 16:37:00 -04:00
with :
2022-05-18 16:00:11 -04:00
deno-version : v1.x
2021-01-02 23:19:46 -05:00
- name : Install Python
2024-02-08 13:03:36 -05:00
uses : actions/setup-python@v5
2021-01-02 23:19:46 -05:00
with :
2023-01-26 06:22:32 -05:00
python-version : 3.11
2024-02-07 11:06:33 -05:00
if : '!(matrix.skip) && (matrix.job != ' 'lint' ' && (matrix.os != ' 'linux' ' || matrix.arch != ' 'aarch64' '))'
2021-01-02 23:19:46 -05:00
- name : Remove unused versions of Python
2024-02-07 11:06:33 -05:00
if : '!(matrix.skip) && (matrix.job != ' 'lint' ' && (matrix.os != ' 'linux' ' || matrix.arch != ' 'aarch64' ') && (matrix.os == ' 'windows' '))'
2023-01-11 13:44:11 -05:00
shell : pwsh
2021-01-02 23:19:46 -05:00
run : |-
$env:PATH -split ";" |
Where-Object { Test-Path "$_\python.exe" } |
Select-Object -Skip 1 |
ForEach-Object { Move-Item "$_" "$_.disabled" }
2024-05-06 21:06:01 -04:00
- if : '!(matrix.skip) && (matrix.job == ' 'bench' ' || matrix.job == ' 'test' ')'
2023-01-12 10:49:46 -05:00
name : Install Node
2024-02-08 13:03:36 -05:00
uses : actions/setup-node@v4
2023-01-11 08:23:08 -05:00
with :
2023-01-11 18:30:38 -05:00
node-version : 18
2023-01-12 12:53:47 -05:00
- if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && (matrix.profile == 'release' &&
2023-01-12 10:19:35 -05:00
matrix.job == 'test' &&
github.repository == 'denoland/deno' &&
(github.ref == 'refs/heads/main' ||
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/')))
2023-01-12 12:53:47 -05:00
name : Authenticate with Google Cloud
2024-03-20 13:40:29 -04:00
uses : google-github-actions/auth@v2
2023-01-12 10:19:35 -05:00
with :
project_id : denoland
credentials_json : '${{ secrets.GCP_SA_KEY }}'
export_environment_variables : true
create_credentials_file : true
2020-11-23 12:06:47 -05:00
- name : Setup gcloud (unix)
2023-01-10 19:16:11 -05:00
if : |-
2024-01-31 10:09:17 -05:00
!(matrix.skip) && (matrix.os != 'windows' &&
2021-04-23 12:54:23 -04:00
matrix.profile == 'release' &&
2021-08-14 07:28:22 -04:00
matrix.job == 'test' &&
2020-11-23 12:06:47 -05:00
github.repository == 'denoland/deno' &&
2021-02-19 09:58:19 -05:00
(github.ref == 'refs/heads/main' ||
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/')))
2024-03-20 13:40:29 -04:00
uses : google-github-actions/setup-gcloud@v2
2020-11-23 12:06:47 -05:00
with :
project_id : denoland
- name : Setup gcloud (windows)
2023-01-10 19:16:11 -05:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.os == 'windows' &&
2021-04-23 12:54:23 -04:00
matrix.profile == 'release' &&
2023-01-12 12:53:47 -05:00
matrix.job == 'test' &&
2020-11-23 12:06:47 -05:00
github.repository == 'denoland/deno' &&
2021-02-19 09:58:19 -05:00
(github.ref == 'refs/heads/main' ||
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/')))
2024-03-20 13:40:29 -04:00
uses : google-github-actions/setup-gcloud@v2
2020-11-23 12:06:47 -05:00
env :
2023-01-10 19:16:11 -05:00
CLOUDSDK_PYTHON : '${{env.pythonLocation}}\python.exe'
2020-11-23 12:06:47 -05:00
with :
project_id : denoland
2021-06-29 17:01:34 -04:00
- name : Configure canary build
2023-01-10 19:16:11 -05:00
if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && (matrix.job == 'test' &&
2021-06-29 17:01:34 -04:00
matrix.profile == 'release' &&
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
github.ref == 'refs/heads/main')
2021-06-29 17:01:34 -04:00
run : echo "DENO_CANARY=true" >> $GITHUB_ENV
2023-11-19 18:11:20 -05:00
- if : '!(matrix.skip) && (matrix.use_sysroot)'
2023-01-11 08:23:08 -05:00
name : Set up incremental LTO and sysroot build
2023-01-10 19:16:11 -05:00
run : |-
2024-02-07 18:17:21 -05:00
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
2021-07-06 09:50:19 -04:00
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
2024-02-07 18:17:21 -05:00
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
2023-06-08 11:16:24 -04:00
# Remove older clang before we install
2024-11-01 06:43:02 -04:00
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' > /dev/null 2> /dev/null
2022-03-07 21:07:10 -05:00
2023-06-29 17:25:48 -04:00
# Install clang-XXX, lld-XXX, and debootstrap.
2024-11-01 06:43:02 -04:00
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-19.list
2022-03-07 21:07:10 -05:00
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
2021-05-11 18:06:58 -04:00
sudo apt-get update
2023-01-12 21:35:25 -05:00
# this was unreliable sometimes, so try again if it fails
2024-11-01 06:43:02 -04:00
sudo apt-get install --no-install-recommends clang-19 lld-19 clang-tools-19 clang-format-19 clang-tidy-19 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends clang-19 lld-19 clang-tools-19 clang-format-19 clang-tidy-19
2023-06-08 11:16:24 -04:00
# Fix alternatives
2024-02-07 21:54:21 -05:00
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
2021-05-11 18:06:58 -04:00
2024-02-07 18:17:21 -05:00
echo "Decompressing sysroot..."
2024-11-01 06:43:02 -04:00
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20241030/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
2024-02-07 18:17:21 -05:00
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
2021-05-11 18:06:58 -04:00
sudo mount --rbind /dev /sysroot/dev
sudo mount --rbind /sys /sysroot/sys
sudo mount --rbind /home /sysroot/home
sudo mount -t proc /proc /sysroot/proc
2024-02-07 18:17:21 -05:00
cd
2021-05-11 18:06:58 -04:00
2024-05-15 11:18:17 -04:00
echo "Done."
2023-03-14 12:42:33 -04:00
2022-03-07 21:07:10 -05:00
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
2024-05-15 11:18:17 -04:00
# Load the sysroot's env vars
echo "sysroot env:"
cat /sysroot/.env
. /sysroot/.env
# Important notes:
# 1. -ldl seems to be required to avoid a failure in FFI tests. This flag seems
# to be in the Rust default flags in the smoketest, so uncertain why we need
# to be explicit here.
# 2. RUSTFLAGS and RUSTDOCFLAGS must be specified, otherwise the doctests fail
# to build because the object formats are not compatible.
echo "
2022-03-07 21:07:10 -05:00
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_BENCH_LTO=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
CARGO_PROFILE_RELEASE_LTO=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
2024-11-01 06:43:02 -04:00
-C linker=clang-19
-C link-arg=-fuse-ld=lld-19
2023-03-14 12:42:33 -04:00
-C link-arg=-ldl
2022-03-07 21:07:10 -05:00
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
2023-06-09 07:52:51 -04:00
--cfg tokio_unstable
2024-05-15 11:18:17 -04:00
$RUSTFLAGS
2022-03-07 21:07:10 -05:00
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
2024-11-01 06:43:02 -04:00
-C linker=clang-19
-C link-arg=-fuse-ld=lld-19
2023-03-14 12:42:33 -04:00
-C link-arg=-ldl
2022-03-07 21:07:10 -05:00
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
2024-05-15 11:18:17 -04:00
--cfg tokio_unstable
$RUSTFLAGS
2022-03-07 21:07:10 -05:00
__1
2024-11-01 06:43:02 -04:00
CC=/usr/bin/clang-19
2024-05-15 11:18:17 -04:00
CFLAGS=-flto=thin $CFLAGS
" > $GITHUB_ENV
2024-04-03 20:02:57 -04:00
- name : Remove macOS cURL --ipv4 flag
run : |-
curl --version
which curl
cat /etc/hosts
rm ~/.curlrc || true
if : '!(matrix.skip) && (matrix.os == ' 'macos' ')'
2024-01-31 08:59:47 -05:00
- name : Install macOS aarch64 lld
2023-11-23 17:30:26 -05:00
run : ./tools/install_prebuilt.js ld64.lld
2024-01-31 08:59:47 -05:00
if : '!(matrix.skip) && (matrix.os == ' 'macos' ' && matrix.arch == ' 'aarch64' ')'
2023-11-23 17:30:26 -05:00
- name : Install rust-codesign
2023-11-19 18:11:20 -05:00
run : |-
2023-11-23 17:30:26 -05:00
./tools/install_prebuilt.js rcodesign
2023-11-19 18:11:20 -05:00
echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
2024-01-31 08:59:47 -05:00
if : '!(matrix.skip) && (matrix.os == ' 'macos' ')'
2019-09-18 17:23:27 -04:00
- name : Log versions
2023-01-10 19:16:11 -05:00
run : |-
2024-02-08 13:51:37 -05:00
echo '*** Python'
command -v python && python --version || echo 'No python found or bad executable'
echo '*** Rust'
command -v rustc && rustc --version || echo 'No rustc found or bad executable'
echo '*** Cargo'
command -v cargo && cargo --version || echo 'No cargo found or bad executable'
echo '*** Deno'
command -v deno && deno --version || echo 'No deno found or bad executable'
echo '*** Node'
command -v node && node --version || echo 'No node found or bad executable'
echo '*** Installed packages'
command -v dpkg && dpkg -l || echo 'No dpkg found or bad executable'
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip)'
2024-02-08 13:51:37 -05:00
- name : Install benchmark tools
if : '!(matrix.skip) && (matrix.job == ' 'bench' ')'
run : ./tools/install_prebuilt.js wrk hyperfine
2021-04-22 07:17:00 -04:00
- name : Cache Cargo home
2024-02-07 11:06:33 -05:00
uses : actions/cache@v4
2021-04-22 07:17:00 -04:00
with :
2023-01-10 19:16:11 -05:00
path : |-
2021-04-22 07:17:00 -04:00
~/.cargo/registry/index
~/.cargo/registry/cache
2024-11-10 02:42:18 -05:00
key : '25-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(' 'Cargo.lock' ') }}'
restore-keys : '25-cargo-home-${{ matrix.os }}-${{ matrix.arch }}'
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip)'
2023-01-11 16:21:02 -05:00
- name : Restore cache build output (PR)
2024-02-08 13:03:36 -05:00
uses : actions/cache/restore@v4
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (github.ref != ' 'refs/heads/main' ' && !startsWith(github.ref, ' 'refs/tags/' '))'
2021-05-10 21:46:41 -04:00
with :
2023-01-10 19:16:11 -05:00
path : |-
2021-05-10 21:46:41 -04:00
./target
2021-05-11 18:06:58 -04:00
!./target/*/gn_out
2024-07-15 12:56:51 -04:00
!./target/*/gn_root
2021-05-11 18:06:58 -04:00
!./target/*/*.zip
!./target/*/*.tar.gz
key : never_saved
2024-11-10 02:42:18 -05:00
restore-keys : '25-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-'
2021-04-10 02:46:27 -04:00
- name : Apply and update mtime cache
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (!startsWith(github.ref, ' 'refs/tags/' '))'
2021-04-10 02:46:27 -04:00
uses : ./.github/mtime_cache
with :
cache-path : ./target
2020-11-05 09:53:21 -05:00
- name : test_format.js
2024-01-31 08:59:47 -05:00
if : '!(matrix.skip) && (matrix.job == ' 'lint' ' && matrix.os == ' 'linux' ')'
2024-09-09 21:10:20 -04:00
run : deno run --allow-write --allow-read --allow-run --allow-net ./tools/format.js --check
2023-03-13 14:59:13 -04:00
- name : Lint PR title
2024-01-31 08:59:47 -05:00
if : '!(matrix.skip) && (matrix.job == ' 'lint' ' && github.event_name == ' 'pull_request' ' && matrix.os == ' 'linux' ')'
2023-03-14 23:55:04 -04:00
env :
PR_TITLE : '${{ github.event.pull_request.title }}'
run : deno run ./tools/verify_pr_title.js "$PR_TITLE"
2021-03-05 07:36:00 -05:00
- name : lint.js
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.job == ' 'lint' ')'
2024-09-09 21:10:20 -04:00
run : deno run --allow-write --allow-read --allow-run --allow-net ./tools/lint.js
2024-04-26 12:04:29 -04:00
- name : jsdoc_checker.js
if : '!(matrix.skip) && (matrix.job == ' 'lint' ')'
run : deno run --allow-read --allow-env --allow-sys ./tools/jsdoc_checker.js
2023-05-15 08:22:53 -04:00
- name : node_compat/setup.ts --check
2024-01-31 08:59:47 -05:00
if : '!(matrix.skip) && (matrix.job == ' 'lint' ' && matrix.os == ' 'linux' ')'
2024-04-02 18:24:55 -04:00
run : deno run --allow-write --allow-read --allow-run=git ./tests/node_compat/runner/setup.ts --check
2020-03-18 09:59:10 -04:00
- name : Build debug
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.job == ' 'test' ' && matrix.profile == ' 'debug' ')'
2023-06-07 17:57:36 -04:00
run : |-
df -h
cargo build --locked --all-targets
df -h
2021-09-22 11:15:04 -04:00
env :
CARGO_PROFILE_DEV_DEBUG : 0
2021-05-11 18:06:58 -04:00
- name : Build release
2023-01-10 19:16:11 -05:00
if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && ((matrix.job == 'test' || matrix.job == 'bench') &&
2022-03-07 21:07:10 -05:00
matrix.profile == 'release' && (matrix.use_sysroot ||
2023-11-19 18:11:20 -05:00
github.repository == 'denoland/deno'))
2023-06-07 22:04:07 -04:00
run : |-
df -h
cargo build --release --locked --all-targets
df -h
2024-05-15 11:18:17 -04:00
- name : Check deno binary
if : '!(matrix.skip) && (matrix.job == ' 'test' ')'
run : 'target/${{ matrix.profile }}/deno eval "console.log(1+2)" | grep 3'
env :
NO_COLOR : 1
- name : Check deno binary (in sysroot)
if : '!(matrix.skip) && (matrix.job == ' 'test' ' && matrix.use_sysroot)'
run : 'sudo chroot /sysroot "$(pwd)/target/${{ matrix.profile }}/deno" --version'
2022-10-18 22:33:28 -04:00
- name : Upload PR artifact (linux)
2023-01-10 19:16:11 -05:00
if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && (matrix.job == 'test' &&
2022-10-18 22:33:28 -04:00
matrix.profile == 'release' && (matrix.use_sysroot ||
(github.repository == 'denoland/deno' &&
(github.ref == 'refs/heads/main' ||
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/')))))
2024-02-07 18:17:21 -05:00
uses : actions/upload-artifact@v4
2022-10-18 22:33:28 -04:00
with :
2024-02-07 18:17:21 -05:00
name : 'deno-${{ matrix.os }}-${{ matrix.arch }}-${{ github.event.number }}'
2022-10-18 22:33:28 -04:00
path : target/release/deno
2019-10-03 13:20:59 -04:00
- name : Pre-release (linux)
2023-01-10 19:16:11 -05:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.os == 'linux' &&
2021-08-14 07:28:22 -04:00
matrix.job == 'test' &&
2022-03-07 21:07:10 -05:00
matrix.profile == 'release' &&
2023-04-08 09:27:21 -04:00
github.repository == 'denoland/deno')
2023-01-10 19:16:11 -05:00
run : |-
2020-03-22 19:21:31 -04:00
cd target/release
2024-01-31 08:59:47 -05:00
zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno
2024-10-14 08:46:26 -04:00
shasum -a 256 deno-${{ matrix.arch }}-unknown-linux-gnu.zip > deno-${{ matrix.arch }}-unknown-linux-gnu.zip.sha256sum
2024-02-21 07:15:50 -05:00
strip denort
2024-02-13 11:22:30 -05:00
zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort
2024-10-14 08:46:26 -04:00
shasum -a 256 denort-${{ matrix.arch }}-unknown-linux-gnu.zip > denort-${{ matrix.arch }}-unknown-linux-gnu.zip.sha256sum
2020-04-02 11:56:09 -04:00
./deno types > lib.deno.d.ts
2024-01-31 08:59:47 -05:00
- name : Pre-release (mac)
2023-11-19 18:11:20 -05:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.os == 'macos' &&
2023-11-19 18:11:20 -05:00
matrix.job == 'test' &&
matrix.profile == 'release' &&
github.repository == 'denoland/deno')
2023-11-23 17:30:26 -05:00
env :
APPLE_CODESIGN_KEY : '${{ secrets.APPLE_CODESIGN_KEY }}'
APPLE_CODESIGN_PASSWORD : '${{ secrets.APPLE_CODESIGN_PASSWORD }}'
2023-11-19 18:11:20 -05:00
run : |-
2023-11-23 17:30:26 -05:00
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
2023-11-19 18:11:20 -05:00
cd target/release
2024-01-31 08:59:47 -05:00
zip -r deno-${{ matrix.arch }}-apple-darwin.zip deno
2024-10-14 08:46:26 -04:00
shasum -a 256 deno-${{ matrix.arch }}-apple-darwin.zip > deno-${{ matrix.arch }}-apple-darwin.zip.sha256sum
2024-02-21 07:15:50 -05:00
strip denort
2024-02-13 11:22:30 -05:00
zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort
2024-10-14 08:46:26 -04:00
shasum -a 256 denort-${{ matrix.arch }}-apple-darwin.zip > denort-${{ matrix.arch }}-apple-darwin.zip.sha256sum
2019-10-03 13:20:59 -04:00
- name : Pre-release (windows)
2023-01-10 19:16:11 -05:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.os == 'windows' &&
2021-08-14 07:28:22 -04:00
matrix.job == 'test' &&
2021-09-22 11:15:04 -04:00
matrix.profile == 'release' &&
2023-11-19 18:11:20 -05:00
github.repository == 'denoland/deno')
2023-03-24 13:47:50 -04:00
shell : pwsh
2024-02-13 11:22:30 -05:00
run : |-
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip
2024-10-14 08:46:26 -04:00
Get-FileHash target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip.sha256sum
2024-02-13 11:22:30 -05:00
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip
2024-10-14 08:46:26 -04:00
Get-FileHash target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip.sha256sum
2024-01-30 14:50:54 -05:00
- name : Upload canary to dl.deno.land
2023-01-10 19:16:11 -05:00
if : |-
2024-01-30 14:50:54 -05:00
!(matrix.skip) && (matrix.job == 'test' &&
2021-04-23 12:54:23 -04:00
matrix.profile == 'release' &&
2020-11-23 12:06:47 -05:00
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
github.ref == 'refs/heads/main')
2024-01-30 14:50:54 -05:00
run : |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
2024-09-30 11:44:42 -04:00
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/
2024-09-19 09:54:59 -04:00
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
2023-05-01 08:37:32 -04:00
- name : Autobahn testsuite
if : |-
2024-02-07 11:06:33 -05:00
!(matrix.skip) && ((matrix.os == 'linux' && matrix.arch != 'aarch64') &&
2024-01-31 08:59:47 -05:00
matrix.job == 'test' &&
matrix.profile == 'release' &&
!startsWith(github.ref, 'refs/tags/'))
2024-09-09 21:10:20 -04:00
run : target/release/deno run -A --config tests/config/deno.json ext/websocket/autobahn/fuzzingclient.js
2024-01-31 08:59:47 -05:00
- name : 'Test (full, debug)'
2023-01-10 19:16:11 -05:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.job == 'test' &&
matrix.profile == 'debug' &&
!startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'linux')
2021-09-22 11:15:04 -04:00
run : cargo test --locked
2023-03-15 21:47:15 -04:00
env :
CARGO_PROFILE_DEV_DEBUG : 0
2024-01-31 08:59:47 -05:00
- name : 'Test (fast, debug)'
2023-03-15 21:47:15 -04:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.job == 'test' &&
matrix.profile == 'debug' &&
(startsWith(github.ref, 'refs/tags/') || matrix.os != 'linux'))
2023-01-12 19:56:19 -05:00
run : |-
cargo test --locked --lib
2024-02-09 15:33:05 -05:00
cargo test --locked --tests
2021-09-22 11:15:04 -04:00
env :
CARGO_PROFILE_DEV_DEBUG : 0
2024-01-31 08:59:47 -05:00
- name : Test (release)
2023-01-10 19:16:11 -05:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.job == 'test' &&
matrix.profile == 'release' &&
2022-03-07 21:07:10 -05:00
(matrix.use_sysroot || (
2021-09-22 11:15:04 -04:00
github.repository == 'denoland/deno' &&
2023-11-19 18:11:20 -05:00
!startsWith(github.ref, 'refs/tags/'))))
2021-05-11 18:06:58 -04:00
run : cargo test --release --locked
- name : Configure hosts file for WPT
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.wpt)'
2021-01-27 09:06:18 -05:00
run : ./wpt make-hosts-file | sudo tee -a /etc/hosts
2024-02-15 22:32:28 -05:00
working-directory : tests/wpt/suite/
2021-05-11 18:06:58 -04:00
- name : Run web platform tests (debug)
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.wpt && matrix.profile == ' 'debug' ')'
2021-05-11 18:06:58 -04:00
env :
DENO_BIN : ./target/debug/deno
2023-01-10 19:16:11 -05:00
run : |-
2024-09-09 21:10:20 -04:00
deno run -A --lock=tools/deno.lock.json --config tests/config/deno.json\
2024-03-06 16:59:30 -05:00
./tests/wpt/wpt.ts setup
2024-09-09 21:10:20 -04:00
deno run -A --lock=tools/deno.lock.json --config tests/config/deno.json\
2024-03-06 16:59:30 -05:00
./tests/wpt/wpt.ts run --quiet --binary="$DENO_BIN"
2021-01-27 09:06:18 -05:00
- name : Run web platform tests (release)
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.wpt && matrix.profile == ' 'release' ')'
2021-05-11 18:06:58 -04:00
env :
DENO_BIN : ./target/release/deno
2023-01-10 19:16:11 -05:00
run : |-
2024-09-09 21:10:20 -04:00
deno run -A --lock=tools/deno.lock.json --config tests/config/deno.json\
2024-03-06 16:59:30 -05:00
./tests/wpt/wpt.ts setup
2024-09-09 21:10:20 -04:00
deno run -A --lock=tools/deno.lock.json --config tests/config/deno.json\
2024-05-01 11:15:29 -04:00
./tests/wpt/wpt.ts run --quiet --release \
2022-07-11 11:30:32 -04:00
--binary="$DENO_BIN" \
--json=wpt.json \
--wptreport=wptreport.json
2021-06-02 19:12:28 -04:00
- name : Upload wpt results to dl.deno.land
2022-03-16 09:35:45 -04:00
continue-on-error : true
2023-01-10 19:16:11 -05:00
if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && (matrix.wpt &&
2024-01-31 08:59:47 -05:00
matrix.os == 'linux' &&
2021-06-02 19:12:28 -04:00
matrix.profile == 'release' &&
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/'))
2023-01-10 19:16:11 -05:00
run : |-
2021-05-11 18:06:58 -04:00
gzip ./wptreport.json
2021-11-09 14:52:07 -05:00
gsutil -h "Cache-Control: public, max-age=3600" cp ./wpt.json gs://dl.deno.land/wpt/$(git rev-parse HEAD).json
gsutil -h "Cache-Control: public, max-age=3600" cp ./wptreport.json.gz gs://dl.deno.land/wpt/$(git rev-parse HEAD)-wptreport.json.gz
2021-06-02 19:12:28 -04:00
echo $(git rev-parse HEAD) > wpt-latest.txt
2021-11-09 14:52:07 -05:00
gsutil -h "Cache-Control: no-cache" cp wpt-latest.txt gs://dl.deno.land/wpt-latest.txt
2021-06-07 11:41:33 -04:00
- name : Upload wpt results to wpt.fyi
2022-03-16 09:35:45 -04:00
continue-on-error : true
2023-01-10 19:16:11 -05:00
if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && (matrix.wpt &&
2024-01-31 08:59:47 -05:00
matrix.os == 'linux' &&
2021-06-07 11:41:33 -04:00
matrix.profile == 'release' &&
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/'))
2021-06-07 11:41:33 -04:00
env :
2022-01-02 07:41:59 -05:00
WPT_FYI_USER : deno
2023-01-10 19:16:11 -05:00
WPT_FYI_PW : '${{ secrets.WPT_FYI_PW }}'
GITHUB_TOKEN : '${{ secrets.DENOBOT_PAT }}'
run : |-
2022-04-13 12:51:16 -04:00
./target/release/deno run --allow-all --lock=tools/deno.lock.json \
2021-05-11 18:06:58 -04:00
./tools/upload_wptfyi.js $(git rev-parse HEAD) --ghstatus
- name : Run benchmarks
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.job == ' 'bench' ' && !startsWith(github.ref, ' 'refs/tags/' '))'
2021-05-11 18:06:58 -04:00
run : cargo bench --locked
2020-12-02 14:06:19 -05:00
- name : Post Benchmarks
2023-01-10 19:16:11 -05:00
if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && (matrix.job == 'bench' &&
2020-12-02 14:06:19 -05:00
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/'))
2020-12-02 14:06:19 -05:00
env :
2023-01-10 19:16:11 -05:00
DENOBOT_PAT : '${{ secrets.DENOBOT_PAT }}'
run : |-
2021-06-23 17:54:25 -04:00
git clone --depth 1 --branch gh-pages \
2021-05-11 18:06:58 -04:00
https://${DENOBOT_PAT}@github.com/denoland/benchmark_data.git \
gh-pages
2024-09-09 21:10:20 -04:00
./target/release/deno run --allow-all ./tools/build_benchmark_jsons.js --release
2020-12-02 14:06:19 -05:00
cd gh-pages
git config user.email "propelml@gmail.com"
git config user.name "denobot"
git add .
git commit --message "Update benchmarks"
git push origin gh-pages
2021-05-11 18:06:58 -04:00
- name : Build product size info
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.job != ' 'lint' ' && matrix.profile != ' 'debug' ' && github.repository == ' 'denoland/deno' ' && (github.ref == ' 'refs/heads/main' ' || startsWith(github.ref, ' 'refs/tags/' ')))'
2023-01-10 19:16:11 -05:00
run : |-
2021-05-11 18:06:58 -04:00
du -hd1 "./target/${{ matrix.profile }}"
du -ha "./target/${{ matrix.profile }}/deno"
2024-02-13 11:22:30 -05:00
du -ha "./target/${{ matrix.profile }}/denort"
2020-12-02 14:06:19 -05:00
- name : Worker info
2023-11-19 18:11:20 -05:00
if : '!(matrix.skip) && (matrix.job == ' 'bench' ')'
2023-01-10 19:16:11 -05:00
run : |-
2020-12-02 14:06:19 -05:00
cat /proc/cpuinfo
cat /proc/meminfo
2021-01-14 11:08:30 -05:00
- name : Upload release to dl.deno.land (unix)
2023-01-10 19:16:11 -05:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.os != 'windows' &&
2021-08-14 07:28:22 -04:00
matrix.job == 'test' &&
2021-04-23 12:54:23 -04:00
matrix.profile == 'release' &&
2021-01-14 11:08:30 -05:00
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/'))
2024-09-30 11:44:42 -04:00
run : |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
2021-01-14 11:08:30 -05:00
- name : Upload release to dl.deno.land (windows)
2023-01-10 19:16:11 -05:00
if : |-
2024-01-31 08:59:47 -05:00
!(matrix.skip) && (matrix.os == 'windows' &&
2021-08-14 07:28:22 -04:00
matrix.job == 'test' &&
2021-04-23 12:54:23 -04:00
matrix.profile == 'release' &&
2021-01-14 11:08:30 -05:00
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/'))
2021-01-14 11:08:30 -05:00
env :
2023-01-10 19:16:11 -05:00
CLOUDSDK_PYTHON : '${{env.pythonLocation}}\python.exe'
2024-09-30 11:44:42 -04:00
run : |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
2022-04-02 11:25:12 -04:00
- name : Create release notes
2023-01-10 19:16:11 -05:00
if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && (matrix.job == 'test' &&
2022-04-02 11:25:12 -04:00
matrix.profile == 'release' &&
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/'))
2023-01-10 19:16:11 -05:00
run : |-
2022-04-02 11:25:12 -04:00
export PATH=$PATH:$(pwd)/target/release
./tools/release/05_create_release_notes.ts
2021-01-14 11:08:30 -05:00
- name : Upload release to GitHub
2022-12-13 09:59:21 -05:00
uses : softprops/action-gh-release@v0.1.15
2023-01-10 19:16:11 -05:00
if : |-
2023-11-19 18:11:20 -05:00
!(matrix.skip) && (matrix.job == 'test' &&
2021-04-23 12:54:23 -04:00
matrix.profile == 'release' &&
2020-05-08 13:28:49 -04:00
github.repository == 'denoland/deno' &&
2023-04-08 09:27:21 -04:00
startsWith(github.ref, 'refs/tags/'))
2019-10-03 13:20:59 -04:00
env :
2023-01-10 19:16:11 -05:00
GITHUB_TOKEN : '${{ secrets.GITHUB_TOKEN }}'
2019-10-03 13:20:59 -04:00
with :
2023-01-10 19:16:11 -05:00
files : |-
2020-03-22 19:21:31 -04:00
target/release/deno-x86_64-pc-windows-msvc.zip
2024-10-14 08:46:26 -04:00
target/release/deno-x86_64-pc-windows-msvc.zip.sha256sum
2024-02-13 11:22:30 -05:00
target/release/denort-x86_64-pc-windows-msvc.zip
2024-10-14 08:46:26 -04:00
target/release/denort-x86_64-pc-windows-msvc.zip.sha256sum
2020-03-22 19:21:31 -04:00
target/release/deno-x86_64-unknown-linux-gnu.zip
2024-10-14 08:46:26 -04:00
target/release/deno-x86_64-unknown-linux-gnu.zip.sha256sum
2024-02-13 11:22:30 -05:00
target/release/denort-x86_64-unknown-linux-gnu.zip
2024-10-14 08:46:26 -04:00
target/release/denort-x86_64-unknown-linux-gnu.zip.sha256sum
2020-03-22 19:21:31 -04:00
target/release/deno-x86_64-apple-darwin.zip
2024-10-14 08:46:26 -04:00
target/release/deno-x86_64-apple-darwin.zip.sha256sum
2024-02-13 11:22:30 -05:00
target/release/denort-x86_64-apple-darwin.zip
2024-10-14 08:46:26 -04:00
target/release/denort-x86_64-apple-darwin.zip.sha256sum
2024-02-08 13:51:37 -05:00
target/release/deno-aarch64-unknown-linux-gnu.zip
2024-10-14 08:46:26 -04:00
target/release/deno-aarch64-unknown-linux-gnu.zip.sha256sum
2024-02-13 11:22:30 -05:00
target/release/denort-aarch64-unknown-linux-gnu.zip
2024-10-14 08:46:26 -04:00
target/release/denort-aarch64-unknown-linux-gnu.zip.sha256sum
2023-11-19 18:11:20 -05:00
target/release/deno-aarch64-apple-darwin.zip
2024-10-14 08:46:26 -04:00
target/release/deno-aarch64-apple-darwin.zip.sha256sum
2024-02-13 11:22:30 -05:00
target/release/denort-aarch64-apple-darwin.zip
2024-10-14 08:46:26 -04:00
target/release/denort-aarch64-apple-darwin.zip.sha256sum
2019-10-25 15:29:17 -04:00
target/release/deno_src.tar.gz
2020-04-02 11:56:09 -04:00
target/release/lib.deno.d.ts
2022-04-02 11:25:12 -04:00
body_path : target/release/release-notes.md
2019-10-03 13:20:59 -04:00
draft : true
2023-01-11 16:21:02 -05:00
- name : Save cache build output (main)
2024-02-07 11:06:33 -05:00
uses : actions/cache/save@v4
2024-01-31 12:32:37 -05:00
if : '!(matrix.skip) && ((matrix.job == ' 'test' ' || matrix.job == ' 'lint' ') && github.ref == ' 'refs/heads/main' ')'
2023-01-11 16:21:02 -05:00
with :
path : |-
./target
!./target/*/gn_out
!./target/*/*.zip
2024-09-30 11:44:42 -04:00
!./target/*/*.sha256sum
2023-01-11 16:21:02 -05:00
!./target/*/*.tar.gz
2024-11-10 02:42:18 -05:00
key : '25-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
2021-07-20 18:10:56 -04:00
publish-canary :
name : publish canary
2024-11-01 06:43:02 -04:00
runs-on : ubuntu-24.04
2023-01-10 19:16:11 -05:00
needs :
- build
2021-12-07 08:49:20 -05:00
if : github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'
2021-07-20 18:10:56 -04:00
steps :
2023-01-12 10:19:35 -05:00
- name : Authenticate with Google Cloud
2024-03-20 13:40:29 -04:00
uses : google-github-actions/auth@v2
2023-01-12 10:19:35 -05:00
with :
project_id : denoland
credentials_json : '${{ secrets.GCP_SA_KEY }}'
export_environment_variables : true
create_credentials_file : true
2021-07-20 18:10:56 -04:00
- name : Setup gcloud
2024-03-20 13:40:29 -04:00
uses : google-github-actions/setup-gcloud@v2
2021-07-20 18:10:56 -04:00
with :
project_id : denoland
- name : Upload canary version file to dl.deno.land
2023-01-10 19:16:11 -05:00
run : |-
2024-09-19 09:54:59 -04:00
echo ${{ github.sha }} > canary-latest.txt
gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-latest.txt