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:
|
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
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 5
|
|
|
|
submodules: false
|
|
|
|
if: github.event.pull_request.draft == true
|
|
|
|
- id: check
|
|
|
|
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 'skip_build=true' >> $GITHUB_OUTPUT)
|
|
|
|
if: github.event.pull_request.draft == true
|
2019-09-18 17:23:27 -04:00
|
|
|
build:
|
2023-04-13 05:44:39 -04:00
|
|
|
name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os_display_name }}'
|
2023-04-08 09:27:21 -04:00
|
|
|
needs:
|
|
|
|
- pre_build
|
|
|
|
if: '${{ needs.pre_build.outputs.skip_build != ''true'' }}'
|
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
|
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:
|
2022-07-21 16:53:52 -04:00
|
|
|
- os: macos-12
|
2021-09-22 11:15:04 -04:00
|
|
|
job: test
|
2023-03-15 21:47:15 -04:00
|
|
|
profile: debug
|
2023-04-13 05:44:39 -04:00
|
|
|
os_display_name: macos-x86_64
|
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-04-13 05:44:39 -04:00
|
|
|
runner: '${{ github.event_name == ''pull_request'' && ''ubuntu-22.04'' || ''macos-12'' }}'
|
|
|
|
os_display_name: macos-x86_64
|
|
|
|
- os: windows-2022
|
2021-09-22 11:15:04 -04:00
|
|
|
job: test
|
2023-03-15 21:47:15 -04:00
|
|
|
profile: debug
|
2023-04-13 05:44:39 -04:00
|
|
|
os_display_name: windows-x86_64
|
2023-06-08 15:27:31 -04:00
|
|
|
- os: '${{ 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-06-08 15:27:31 -04:00
|
|
|
runner: '${{ github.event_name == ''pull_request'' && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
2023-04-13 05:44:39 -04:00
|
|
|
os_display_name: windows-x86_64
|
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-04-13 05:44:39 -04:00
|
|
|
os_display_name: ubuntu-x86_64
|
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-04-13 05:44:39 -04:00
|
|
|
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: 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-04-13 05:44:39 -04:00
|
|
|
os_display_name: ubuntu-x86_64
|
|
|
|
- os: ubuntu-22.04
|
2021-08-14 07:28:22 -04:00
|
|
|
job: lint
|
2021-04-23 12:54:23 -04:00
|
|
|
profile: debug
|
2023-04-13 05:44:39 -04:00
|
|
|
os_display_name: ubuntu-x86_64
|
2023-08-01 16:08:41 -04:00
|
|
|
- os: macos-12
|
|
|
|
job: lint
|
|
|
|
profile: debug
|
|
|
|
os_display_name: macos-x86_64
|
|
|
|
- os: windows-2022
|
|
|
|
job: lint
|
|
|
|
profile: debug
|
|
|
|
os_display_name: windows-x86_64
|
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:
|
2023-06-28 15:41:47 -04:00
|
|
|
- name: Reconfigure Windows Storage
|
2023-06-28 16:44:39 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (startsWith(matrix.os, ''windows'') && !endsWith(matrix.os, ''-xl''))'
|
2023-06-28 15:41:47 -04:00
|
|
|
shell: pwsh
|
|
|
|
run: |-
|
|
|
|
New-Item -ItemType "directory" -Path "$env:TEMP/__target__"
|
|
|
|
New-Item -ItemType Junction -Target "$env:TEMP/__target__" -Path "D:/a/deno/deno"
|
2019-09-18 17:23:27 -04:00
|
|
|
- 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 08:23:08 -05:00
|
|
|
- name: Clone submodule ./test_util/std
|
|
|
|
run: git submodule update --init --recursive --depth=1 -- ./test_util/std
|
2023-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.wpt)'
|
2023-05-15 08:22:53 -04:00
|
|
|
- name: Clone submodule ./tools/node_compat/node
|
|
|
|
run: git submodule update --init --recursive --depth=1 -- ./tools/node_compat/node
|
2023-08-01 16:08:41 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
2023-01-10 19:16:11 -05:00
|
|
|
- name: 'Create source tarballs (release, linux)'
|
|
|
|
if: |-
|
2023-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
2023-08-20 11:43:50 -04:00
|
|
|
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' || matrix.job == ''test'' || matrix.job == ''bench'')'
|
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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job != ''lint'')'
|
2021-01-02 23:19:46 -05:00
|
|
|
- name: Remove unused versions of Python
|
2023-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''bench'')'
|
2023-01-12 10:49:46 -05:00
|
|
|
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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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
|
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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04: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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04: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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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
|
2023-06-08 11:16:24 -04:00
|
|
|
# Remove older clang before we install
|
2023-06-29 17:25:48 -04:00
|
|
|
sudo apt-get remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*'
|
2022-03-07 21:07:10 -05:00
|
|
|
|
2023-06-29 17:25:48 -04:00
|
|
|
# Install clang-XXX, lld-XXX, and debootstrap.
|
|
|
|
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" |
|
|
|
|
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-16.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
|
2023-06-29 17:25:48 -04:00
|
|
|
sudo apt-get install --no-install-recommends debootstrap clang-16 lld-16 clang-tools-16 clang-format-16 clang-tidy-16 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends debootstrap clang-16 lld-16 clang-tools-16 clang-format-16 clang-tidy-16
|
2023-06-08 11:16:24 -04:00
|
|
|
# Fix alternatives
|
|
|
|
(yes '' | sudo update-alternatives --force --all) || true
|
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-08-19 00:26:12 -04:00
|
|
|
wget https://github.com/denoland/deno_third_party/raw/master/prebuilt/linux64/libdl/libdl.a
|
|
|
|
wget https://github.com/denoland/deno_third_party/raw/master/prebuilt/linux64/libdl/libdl.so.2
|
2023-03-14 12:42:33 -04:00
|
|
|
|
|
|
|
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
|
2023-06-29 17:25:48 -04:00
|
|
|
-C linker=clang-16
|
|
|
|
-C link-arg=-fuse-ld=lld-16
|
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
|
2023-06-09 07:52:51 -04:00
|
|
|
--cfg tokio_unstable
|
2022-03-07 21:07:10 -05:00
|
|
|
${{ env.RUSTFLAGS }}
|
|
|
|
__1
|
|
|
|
RUSTDOCFLAGS<<__1
|
|
|
|
-C linker-plugin-lto=true
|
2023-06-29 17:25:48 -04:00
|
|
|
-C linker=clang-16
|
|
|
|
-C link-arg=-fuse-ld=lld-16
|
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
|
2023-06-29 17:25:48 -04:00
|
|
|
CC=clang-16
|
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
|
2023-01-10 19:16:11 -05:00
|
|
|
run: |-
|
2019-09-18 17:23:27 -04:00
|
|
|
python --version
|
|
|
|
rustc --version
|
|
|
|
cargo --version
|
2023-06-08 11:16:24 -04:00
|
|
|
which dpkg && dpkg -l
|
2023-08-01 16:08:41 -04:00
|
|
|
if [[ "${{ matrix.job }}" == "lint" ]] || [[ "${{ matrix.job }}" == "test" ]]; then
|
2021-05-11 18:06:58 -04:00
|
|
|
deno --version
|
|
|
|
fi
|
2023-01-12 10:49:46 -05:00
|
|
|
if [ "${{ matrix.job }}" == "bench" ]
|
|
|
|
then
|
|
|
|
node -v
|
2023-08-19 06:52:21 -04:00
|
|
|
./tools/install_prebuilt.js wrk hyperfine
|
2023-01-12 10:49:46 -05:00
|
|
|
fi
|
2023-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
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
|
2023-08-21 08:38:38 -04:00
|
|
|
key: '49-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
|
|
|
|
restore-keys: '49-cargo-home-${{ matrix.os }}'
|
2023-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
|
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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-08-21 08:38:38 -04:00
|
|
|
restore-keys: '49-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
|
2021-04-10 02:46:27 -04:00
|
|
|
- name: Apply and update mtime cache
|
2023-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (!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
|
2023-08-01 16:08:41 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
2023-08-19 00:26:12 -04:00
|
|
|
run: deno run --unstable --allow-write --allow-read --allow-run --allow-net ./tools/format.js --check
|
2023-03-13 14:59:13 -04:00
|
|
|
- name: Lint PR title
|
2023-08-01 16:08:41 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && github.event_name == ''pull_request'' && startsWith(matrix.os, ''ubuntu''))'
|
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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'')'
|
2023-08-19 00:26:12 -04:00
|
|
|
run: deno run --unstable --allow-write --allow-read --allow-run --allow-net ./tools/lint.js
|
2023-05-15 08:22:53 -04:00
|
|
|
- name: node_compat/setup.ts --check
|
2023-08-01 16:08:41 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''lint'' && startsWith(matrix.os, ''ubuntu''))'
|
2023-05-15 08:22:53 -04:00
|
|
|
run: deno run --allow-write --allow-read --allow-run=git ./tools/node_compat/setup.ts --check
|
2020-03-18 09:59:10 -04:00
|
|
|
- name: Build debug
|
2023-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && ((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-04-08 09:27:21 -04:00
|
|
|
startsWith(github.ref, 'refs/tags/')))))
|
2023-06-07 22:04:07 -04:00
|
|
|
run: |-
|
|
|
|
df -h
|
|
|
|
cargo build --release --locked --all-targets
|
|
|
|
df -h
|
2022-10-18 22:33:28 -04:00
|
|
|
- name: Upload PR artifact (linux)
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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/')))))
|
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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-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
|
|
|
|
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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-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: |-
|
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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')))
|
2023-03-24 13:47:50 -04:00
|
|
|
shell: pwsh
|
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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04: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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04: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'
|
|
|
|
run: 'gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/'
|
2023-05-01 08:37:32 -04:00
|
|
|
- name: Autobahn testsuite
|
|
|
|
if: |-
|
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'release' &&
|
|
|
|
!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu'))
|
|
|
|
run: target/release/deno run -A --unstable ext/websocket/autobahn/fuzzingclient.js
|
2020-12-02 14:06:19 -05:00
|
|
|
- name: Test debug
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'debug' &&
|
|
|
|
!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu'))
|
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
|
|
|
|
- name: Test debug (fast)
|
|
|
|
if: |-
|
2023-06-29 17:07:05 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.job == 'test' && matrix.profile == 'debug' &&
|
2023-04-08 09:27:21 -04:00
|
|
|
!startsWith(matrix.os, 'ubuntu'))
|
2023-01-12 19:56:19 -05:00
|
|
|
run: |-
|
|
|
|
cargo test --locked --lib
|
|
|
|
cargo test --locked --test '*'
|
2021-09-22 11:15:04 -04:00
|
|
|
env:
|
|
|
|
CARGO_PROFILE_DEV_DEBUG: 0
|
2023-06-29 17:07:05 -04:00
|
|
|
- name: Test examples debug
|
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.job == ''test'' && matrix.profile == ''debug'')'
|
|
|
|
run: |-
|
|
|
|
cargo run -p deno_runtime --example extension_with_esm
|
|
|
|
cargo run -p deno_runtime --example extension_with_esm --features include_js_files_for_snapshotting
|
|
|
|
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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04: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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (matrix.profile == ''release'' && startsWith(github.ref, ''refs/tags/''))'
|
2021-10-20 16:32:31 -04:00
|
|
|
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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.wpt &&
|
2023-01-12 11:22:38 -05:00
|
|
|
runner.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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (matrix.wpt &&
|
2023-01-12 11:22:38 -05:00
|
|
|
runner.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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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
|
|
|
|
./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-04-08 09:27:21 -04:00
|
|
|
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/'')))'
|
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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04: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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-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'
|
|
|
|
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
|
2023-01-10 19:16:11 -05:00
|
|
|
if: |-
|
2023-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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-04-08 09:27:21 -04:00
|
|
|
!(github.event_name == 'pull_request' && matrix.skip_pr) && (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
|
|
|
|
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-04-08 09:27:21 -04:00
|
|
|
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && ((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
|
|
|
|
!./target/*/*.tar.gz
|
2023-08-21 08:38:38 -04:00
|
|
|
key: '49-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ 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
|