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
|
|
|
|
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:
|
|
|
|
build:
|
2023-01-10 19:16:11 -05:00
|
|
|
name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}'
|
2023-01-13 14:06:30 -05:00
|
|
|
runs-on: '${{ matrix.runner || matrix.os }}'
|
2022-11-22 15:03:36 -05:00
|
|
|
timeout-minutes: 120
|
2019-09-18 17:23:27 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-09-26 10:13:59 -04:00
|
|
|
include:
|
2022-07-21 16:53:52 -04:00
|
|
|
- os: macos-12
|
2021-09-22 11:15:04 -04:00
|
|
|
job: test
|
|
|
|
profile: fastci
|
2022-07-21 16:53:52 -04:00
|
|
|
- os: macos-12
|
2021-08-14 07:28:22 -04:00
|
|
|
job: test
|
2021-04-23 12:54:23 -04:00
|
|
|
profile: release
|
2023-01-11 19:49:18 -05:00
|
|
|
skip_pr: true
|
2023-01-12 10:19:35 -05:00
|
|
|
- os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
2021-09-22 11:15:04 -04:00
|
|
|
job: test
|
|
|
|
profile: fastci
|
2023-01-12 10:19:35 -05:00
|
|
|
- os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
2023-01-13 14:06:30 -05:00
|
|
|
runner: '${{ github.event_name == ''pull_request'' && ''windows-2022'' || (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-01-11 19:49:18 -05:00
|
|
|
skip_pr: true
|
2023-03-14 12:42:33 -04:00
|
|
|
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.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/'') }}'
|
2023-03-14 12:42:33 -04:00
|
|
|
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.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-01-12 15:45:41 -05:00
|
|
|
skip_pr: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-bench'') }}'
|
2023-03-14 12:42:33 -04:00
|
|
|
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.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
|
2023-01-12 11:22:38 -05:00
|
|
|
wpt: '${{ github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'') }}'
|
2023-03-14 12:42:33 -04:00
|
|
|
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
|
2021-08-14 07:28:22 -04:00
|
|
|
job: lint
|
2021-04-23 12:54:23 -04:00
|
|
|
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
|
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-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
2019-09-18 17:23:27 -04:00
|
|
|
- name: Clone repository
|
2022-03-24 00:36:33 -04:00
|
|
|
uses: actions/checkout@v3
|
2019-09-18 17:23:27 -04:00
|
|
|
with:
|
2021-04-10 02:21:27 -04:00
|
|
|
fetch-depth: 5
|
2023-01-11 08:23:08 -05:00
|
|
|
submodules: false
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
2023-01-11 13:44:11 -05:00
|
|
|
- name: Cancel if draft PR
|
|
|
|
id: exit_early
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (github.event.pull_request.draft == true)'
|
2023-01-11 13:44:11 -05:00
|
|
|
shell: bash
|
|
|
|
run: |-
|
|
|
|
GIT_MESSAGE=$(git log --format=%s -n 1 ${{github.event.after}})
|
|
|
|
echo Commit message: $GIT_MESSAGE
|
|
|
|
echo $GIT_MESSAGE | grep '\[ci\]' || (echo 'Exiting due to draft PR. Commit with [ci] to bypass.' ; echo 'EXIT_EARLY=true' >> $GITHUB_OUTPUT)
|
2023-01-11 08:23:08 -05:00
|
|
|
- name: Clone submodule ./test_util/std
|
|
|
|
run: git submodule update --init --recursive --depth=1 -- ./test_util/std
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
|
2023-03-14 12:42:33 -04:00
|
|
|
- name: Clone submodule ./third_party
|
|
|
|
run: git submodule update --init --recursive --depth=1 -- ./third_party
|
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
|
2023-01-11 08:23:08 -05:00
|
|
|
- name: Clone submodule ./test_util/wpt
|
|
|
|
run: git submodule update --init --recursive --depth=1 -- ./test_util/wpt
|
2023-01-12 11:22:38 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.wpt))'
|
2023-01-10 19:16:11 -05:00
|
|
|
- name: 'Create source tarballs (release, linux)'
|
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (startsWith(matrix.os, 'ubuntu') &&
|
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-01-11 19:49:18 -05: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-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
|
|
|
|
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''lint'' || matrix.job == ''test''))'
|
2023-01-11 08:23:08 -05:00
|
|
|
name: Install Deno
|
2022-03-30 16:37:00 -04:00
|
|
|
uses: denoland/setup-deno@v1
|
|
|
|
with:
|
2022-05-18 16:00:11 -04:00
|
|
|
deno-version: v1.x
|
2021-01-02 23:19:46 -05:00
|
|
|
- name: Install Python
|
2022-11-06 10:56:21 -05:00
|
|
|
uses: actions/setup-python@v4
|
2021-01-02 23:19:46 -05:00
|
|
|
with:
|
2023-01-26 06:22:32 -05:00
|
|
|
python-version: 3.11
|
2023-01-12 12:07:37 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job != ''lint''))'
|
2021-01-02 23:19:46 -05:00
|
|
|
- name: Remove unused versions of Python
|
2023-01-12 12:07:37 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job != ''lint'' && (startsWith(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" }
|
2023-01-12 10:49:46 -05:00
|
|
|
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''bench''))'
|
|
|
|
name: Install Node
|
2023-01-11 08:23:08 -05:00
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-01-11 18:30:38 -05:00
|
|
|
node-version: 18
|
2023-01-12 12:53:47 -05:00
|
|
|
- if: |-
|
2023-01-12 10:19:35 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.profile == 'release' &&
|
|
|
|
matrix.job == 'test' &&
|
|
|
|
github.repository == 'denoland/deno' &&
|
|
|
|
(github.ref == 'refs/heads/main' ||
|
|
|
|
startsWith(github.ref, 'refs/tags/'))))
|
2023-01-12 12:53:47 -05:00
|
|
|
name: Authenticate with Google Cloud
|
2023-01-12 10:19:35 -05:00
|
|
|
uses: google-github-actions/auth@v1
|
|
|
|
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: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.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-01-11 19:49:18 -05:00
|
|
|
startsWith(github.ref, 'refs/tags/'))))
|
2023-01-12 10:19:35 -05:00
|
|
|
uses: google-github-actions/setup-gcloud@v1
|
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: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.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-01-11 19:49:18 -05:00
|
|
|
startsWith(github.ref, 'refs/tags/'))))
|
2023-01-12 10:19:35 -05:00
|
|
|
uses: google-github-actions/setup-gcloud@v1
|
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-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.job == 'test' &&
|
2021-06-29 17:01:34 -04:00
|
|
|
matrix.profile == 'release' &&
|
|
|
|
github.repository == 'denoland/deno' &&
|
2023-01-11 19:49:18 -05:00
|
|
|
github.ref == 'refs/heads/main'))
|
2021-06-29 17:01:34 -04:00
|
|
|
shell: bash
|
|
|
|
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
|
2023-01-11 19:49:18 -05:00
|
|
|
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (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: |-
|
2021-07-06 09:50:19 -04:00
|
|
|
# Avoid running man-db triggers, which sometimes takes several minutes
|
|
|
|
# to complete.
|
2021-11-10 19:29:24 -05:00
|
|
|
sudo apt-get remove --purge -y man-db
|
2022-03-07 21:07:10 -05:00
|
|
|
|
2022-11-17 20:59:10 -05:00
|
|
|
# Install clang-15, lld-15, and debootstrap.
|
2023-03-14 12:42:33 -04:00
|
|
|
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" |
|
|
|
|
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-15.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
|
|
|
|
sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15
|
2021-05-11 18:06:58 -04:00
|
|
|
|
2022-03-07 21:07:10 -05:00
|
|
|
# Create ubuntu-16.04 sysroot environment, which is used to avoid
|
|
|
|
# depending on a very recent version of glibc.
|
|
|
|
# `libc6-dev` is required for building any C source files.
|
2021-08-06 17:28:10 -04:00
|
|
|
# `file` and `make` are needed to build libffi-sys.
|
|
|
|
# `curl` is needed to build rusty_v8.
|
2022-03-07 21:07:10 -05:00
|
|
|
sudo debootstrap \
|
|
|
|
--include=ca-certificates,curl,file,libc6-dev,make \
|
|
|
|
--no-merged-usr --variant=minbase xenial /sysroot \
|
2021-08-06 17:28:10 -04:00
|
|
|
http://azure.archive.ubuntu.com/ubuntu
|
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
|
|
|
|
|
2023-03-14 12:42:33 -04:00
|
|
|
cp third_party/prebuilt/linux64/libdl/libdl.so.2 .
|
|
|
|
cp third_party/prebuilt/linux64/libdl/libdl.a .
|
|
|
|
|
|
|
|
sudo ln -s libdl.so.2 /sysroot/lib/x86_64-linux-gnu/libdl.so
|
|
|
|
sudo ln -s libdl.a /sysroot/lib/x86_64-linux-gnu/libdl.a
|
|
|
|
|
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.
|
|
|
|
cat >> $GITHUB_ENV << __0
|
|
|
|
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
|
2022-11-17 20:59:10 -05:00
|
|
|
-C linker=clang-15
|
|
|
|
-C link-arg=-fuse-ld=lld-15
|
2022-03-07 21:07:10 -05:00
|
|
|
-C link-arg=--sysroot=/sysroot
|
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
|
|
|
|
${{ env.RUSTFLAGS }}
|
|
|
|
__1
|
|
|
|
RUSTDOCFLAGS<<__1
|
|
|
|
-C linker-plugin-lto=true
|
2022-11-17 20:59:10 -05:00
|
|
|
-C linker=clang-15
|
|
|
|
-C link-arg=-fuse-ld=lld-15
|
2022-03-07 21:07:10 -05:00
|
|
|
-C link-arg=--sysroot=/sysroot
|
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
|
|
|
|
${{ env.RUSTFLAGS }}
|
|
|
|
__1
|
2022-11-17 20:59:10 -05:00
|
|
|
CC=clang-15
|
2022-03-07 21:07:10 -05:00
|
|
|
CFLAGS=-flto=thin --sysroot=/sysroot
|
|
|
|
__0
|
2019-09-18 17:23:27 -04:00
|
|
|
- name: Log versions
|
2021-05-11 18:06:58 -04:00
|
|
|
shell: bash
|
2023-01-10 19:16:11 -05:00
|
|
|
run: |-
|
2019-09-18 17:23:27 -04:00
|
|
|
python --version
|
|
|
|
rustc --version
|
|
|
|
cargo --version
|
2021-08-14 07:28:22 -04:00
|
|
|
if [ "${{ matrix.job }}" == "lint" ]
|
2021-05-11 18:06:58 -04:00
|
|
|
then
|
|
|
|
deno --version
|
|
|
|
fi
|
2023-01-12 10:49:46 -05:00
|
|
|
if [ "${{ matrix.job }}" == "bench" ]
|
|
|
|
then
|
|
|
|
node -v
|
|
|
|
fi
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
|
2021-04-22 07:17:00 -04:00
|
|
|
- name: Cache Cargo home
|
2022-11-06 10:56:21 -05:00
|
|
|
uses: actions/cache@v3
|
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
|
|
|
|
~/.cargo/git/db
|
2023-03-14 12:42:33 -04:00
|
|
|
key: '20-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
|
2023-01-11 16:21:02 -05:00
|
|
|
- name: Restore cache build output (PR)
|
2023-01-04 01:05:38 -05:00
|
|
|
uses: actions/cache/restore@v3
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (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
|
|
|
|
!./target/*/*.zip
|
|
|
|
!./target/*/*.tar.gz
|
|
|
|
key: never_saved
|
2023-01-27 10:43:16 -05:00
|
|
|
restore-keys: '19-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-'
|
2021-04-10 02:46:27 -04:00
|
|
|
- name: Apply and update mtime cache
|
2023-01-12 12:07:37 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (!startsWith(github.ref, ''refs/tags/'')))'
|
2021-04-10 02:46:27 -04:00
|
|
|
uses: ./.github/mtime_cache
|
|
|
|
with:
|
|
|
|
cache-path: ./target
|
2021-06-23 11:02:54 -04:00
|
|
|
- name: Shallow clone crates.io index
|
|
|
|
shell: bash
|
2023-01-10 19:16:11 -05:00
|
|
|
run: |-
|
2021-06-23 11:02:54 -04:00
|
|
|
if [ ! -d ~/.cargo/registry/index/github.com-1ecc6299db9ec823/.git ]
|
|
|
|
then
|
|
|
|
git clone --depth 1 --no-checkout \
|
|
|
|
https://github.com/rust-lang/crates.io-index \
|
|
|
|
~/.cargo/registry/index/github.com-1ecc6299db9ec823
|
|
|
|
fi
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
|
2020-11-05 09:53:21 -05:00
|
|
|
- name: test_format.js
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''lint''))'
|
2020-11-05 09:53:21 -05:00
|
|
|
run: deno run --unstable --allow-write --allow-read --allow-run ./tools/format.js --check
|
2023-03-13 14:59:13 -04:00
|
|
|
- name: Lint PR title
|
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''lint'' && github.event_name == ''pull_request''))'
|
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-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''lint''))'
|
2021-03-05 07:36:00 -05:00
|
|
|
run: deno run --unstable --allow-write --allow-read --allow-run ./tools/lint.js
|
2020-03-18 09:59:10 -04:00
|
|
|
- name: Build debug
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && ((matrix.job == 'test' || matrix.job == 'bench') &&
|
|
|
|
matrix.profile == 'debug'))
|
2021-04-28 21:33:46 -04:00
|
|
|
run: cargo build --locked --all-targets
|
2021-09-22 11:15:04 -04:00
|
|
|
- name: Build fastci
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && ((matrix.job == ''test'' && matrix.profile == ''fastci'')))'
|
2021-09-22 11:15:04 -04:00
|
|
|
run: cargo build --locked --all-targets
|
|
|
|
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-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && ((matrix.job == 'test' || matrix.job == 'bench') &&
|
2022-03-07 21:07:10 -05:00
|
|
|
matrix.profile == 'release' && (matrix.use_sysroot ||
|
|
|
|
(github.repository == 'denoland/deno' &&
|
|
|
|
(github.ref == 'refs/heads/main' ||
|
2023-01-11 19:49:18 -05:00
|
|
|
startsWith(github.ref, 'refs/tags/'))))))
|
2021-05-11 18:06:58 -04:00
|
|
|
run: cargo build --release --locked --all-targets
|
2022-10-18 22:33:28 -04:00
|
|
|
- name: Upload PR artifact (linux)
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (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-01-11 19:49:18 -05:00
|
|
|
startsWith(github.ref, 'refs/tags/'))))))
|
2022-10-18 22:33:28 -04:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-01-10 19:16:11 -05:00
|
|
|
name: 'deno-${{ 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: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (startsWith(matrix.os, 'ubuntu') &&
|
2021-08-14 07:28:22 -04:00
|
|
|
matrix.job == 'test' &&
|
2022-03-07 21:07:10 -05:00
|
|
|
matrix.profile == 'release' &&
|
2023-01-11 19:49:18 -05: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
|
|
|
|
zip -r deno-x86_64-unknown-linux-gnu.zip deno
|
2020-04-02 11:56:09 -04:00
|
|
|
./deno types > lib.deno.d.ts
|
2019-10-03 13:20:59 -04:00
|
|
|
- name: Pre-release (mac)
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (startsWith(matrix.os, 'macOS') &&
|
2021-08-14 07:28:22 -04:00
|
|
|
matrix.job == 'test' &&
|
2021-09-22 11:15:04 -04:00
|
|
|
matrix.profile == 'release' &&
|
|
|
|
github.repository == 'denoland/deno' &&
|
2023-01-11 19:49:18 -05:00
|
|
|
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))))
|
2023-01-10 19:16:11 -05:00
|
|
|
run: |-
|
2020-03-22 19:21:31 -04:00
|
|
|
cd target/release
|
|
|
|
zip -r deno-x86_64-apple-darwin.zip deno
|
2019-10-03 13:20:59 -04:00
|
|
|
- name: Pre-release (windows)
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (startsWith(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' &&
|
|
|
|
github.repository == 'denoland/deno' &&
|
2023-01-11 19:49:18 -05:00
|
|
|
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))))
|
2023-01-10 19:16:11 -05:00
|
|
|
run: Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-x86_64-pc-windows-msvc.zip
|
2021-01-14 11:08:30 -05:00
|
|
|
- name: Upload canary to dl.deno.land (unix)
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.os != 'Windows' &&
|
2021-08-14 07:28:22 -04:00
|
|
|
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-01-11 19:49:18 -05:00
|
|
|
github.ref == 'refs/heads/main'))
|
2023-01-10 19:16:11 -05:00
|
|
|
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/'
|
2021-01-14 11:08:30 -05:00
|
|
|
- name: Upload canary to dl.deno.land (windows)
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.os == 'Windows' &&
|
2021-08-14 07:28:22 -04:00
|
|
|
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-01-11 19:49:18 -05:00
|
|
|
github.ref == 'refs/heads/main'))
|
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
|
|
|
shell: bash
|
2023-01-10 19:16:11 -05:00
|
|
|
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/'
|
2020-12-02 14:06:19 -05:00
|
|
|
- name: Test debug
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.job == 'test' && matrix.profile == 'debug' &&
|
|
|
|
!startsWith(github.ref, 'refs/tags/')))
|
2021-09-22 11:15:04 -04:00
|
|
|
run: cargo test --locked
|
2023-01-12 19:56:19 -05:00
|
|
|
- name: Test fastci
|
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''test'' && matrix.profile == ''fastci''))'
|
|
|
|
run: |-
|
|
|
|
cargo test --locked --lib
|
|
|
|
cargo test --locked --test '*'
|
2021-09-22 11:15:04 -04:00
|
|
|
env:
|
|
|
|
CARGO_PROFILE_DEV_DEBUG: 0
|
2021-05-11 18:06:58 -04:00
|
|
|
- name: Test release
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (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-01-11 19:49:18 -05:00
|
|
|
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')))))
|
2021-05-11 18:06:58 -04:00
|
|
|
run: cargo test --release --locked
|
2022-03-07 21:07:10 -05:00
|
|
|
- name: Check deno binary
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.profile == ''release'' && startsWith(github.ref, ''refs/tags/'')))'
|
2021-10-20 16:32:31 -04:00
|
|
|
shell: bash
|
|
|
|
run: target/release/deno eval "console.log(1+2)" | grep 3
|
|
|
|
env:
|
|
|
|
NO_COLOR: 1
|
2022-03-07 21:07:10 -05:00
|
|
|
- name: Check deno binary (in sysroot)
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.profile == ''release'' && matrix.use_sysroot))'
|
2022-03-07 21:07:10 -05:00
|
|
|
run: sudo chroot /sysroot "$(pwd)/target/release/deno" --version
|
2021-05-11 18:06:58 -04:00
|
|
|
- name: Configure hosts file for WPT
|
2023-01-12 11:22:38 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.wpt))'
|
2021-01-27 09:06:18 -05:00
|
|
|
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
|
|
|
|
working-directory: test_util/wpt/
|
2021-05-11 18:06:58 -04:00
|
|
|
- name: Run web platform tests (debug)
|
2023-01-12 11:22:38 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (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: |-
|
2022-07-11 11:30:32 -04:00
|
|
|
deno run --allow-env --allow-net --allow-read --allow-run \
|
|
|
|
--allow-write --unstable \
|
|
|
|
--lock=tools/deno.lock.json \
|
|
|
|
./tools/wpt.ts setup
|
|
|
|
deno run --allow-env --allow-net --allow-read --allow-run \
|
|
|
|
--allow-write --unstable \
|
|
|
|
--lock=tools/deno.lock.json \
|
|
|
|
./tools/wpt.ts run --quiet --binary="$DENO_BIN"
|
2021-01-27 09:06:18 -05:00
|
|
|
- name: Run web platform tests (release)
|
2023-01-12 11:22:38 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (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: |-
|
2022-07-11 11:30:32 -04:00
|
|
|
deno run --allow-env --allow-net --allow-read --allow-run \
|
|
|
|
--allow-write --unstable \
|
|
|
|
--lock=tools/deno.lock.json \
|
|
|
|
./tools/wpt.ts setup
|
|
|
|
deno run --allow-env --allow-net --allow-read --allow-run \
|
|
|
|
--allow-write --unstable \
|
|
|
|
--lock=tools/deno.lock.json \
|
|
|
|
./tools/wpt.ts run --quiet --release \
|
|
|
|
--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-01-12 11:22:38 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.wpt &&
|
|
|
|
runner.os == 'Linux' &&
|
2021-06-02 19:12:28 -04:00
|
|
|
matrix.profile == 'release' &&
|
|
|
|
github.repository == 'denoland/deno' &&
|
2023-01-11 19:49:18 -05: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-01-12 11:22:38 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.wpt &&
|
|
|
|
runner.os == 'Linux' &&
|
2021-06-07 11:41:33 -04:00
|
|
|
matrix.profile == 'release' &&
|
|
|
|
github.repository == 'denoland/deno' &&
|
2023-01-11 19:49:18 -05: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-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (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-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.job == 'bench' &&
|
2020-12-02 14:06:19 -05:00
|
|
|
github.repository == 'denoland/deno' &&
|
2023-01-11 19:49:18 -05: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
|
|
|
|
./target/release/deno run --allow-all --unstable \
|
|
|
|
./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-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job != ''lint'' && matrix.profile != ''fastci'' && 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"
|
2020-12-02 14:06:19 -05:00
|
|
|
- name: Worker info
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (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: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.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-01-11 19:49:18 -05:00
|
|
|
startsWith(github.ref, 'refs/tags/')))
|
2023-01-10 19:16:11 -05:00
|
|
|
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip 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: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.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-01-11 19:49:18 -05: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'
|
2021-01-14 11:08:30 -05:00
|
|
|
shell: bash
|
2023-01-10 19:16:11 -05:00
|
|
|
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/'
|
2022-04-02 11:25:12 -04:00
|
|
|
- name: Create release notes
|
|
|
|
shell: bash
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.job == 'test' &&
|
2022-04-02 11:25:12 -04:00
|
|
|
matrix.profile == 'release' &&
|
|
|
|
github.repository == 'denoland/deno' &&
|
2023-01-11 19:49:18 -05: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-01-11 19:49:18 -05:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (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-01-11 19:49:18 -05: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
|
|
|
|
target/release/deno-x86_64-unknown-linux-gnu.zip
|
|
|
|
target/release/deno-x86_64-apple-darwin.zip
|
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)
|
|
|
|
uses: actions/cache/save@v3
|
2023-01-11 19:49:18 -05:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && ((matrix.profile == ''release'' || matrix.profile == ''fastci'') && github.ref == ''refs/heads/main''))'
|
2023-01-11 16:21:02 -05:00
|
|
|
with:
|
|
|
|
path: |-
|
|
|
|
./target
|
|
|
|
!./target/*/gn_out
|
|
|
|
!./target/*/*.zip
|
|
|
|
!./target/*/*.tar.gz
|
|
|
|
key: '18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}'
|
2021-07-20 18:10:56 -04:00
|
|
|
publish-canary:
|
|
|
|
name: publish canary
|
2023-03-14 12:42:33 -04:00
|
|
|
runs-on: ubuntu-22.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
|
|
|
|
uses: google-github-actions/auth@v1
|
|
|
|
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
|
2023-01-12 10:19:35 -05:00
|
|
|
uses: google-github-actions/setup-gcloud@v1
|
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: |-
|
2021-07-21 12:39:20 -04:00
|
|
|
echo ${{ github.sha }} > canary-latest.txt
|
2022-07-11 11:30:32 -04:00
|
|
|
gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-latest.txt
|