Skip to content

fix(runtime): display proper error when throwing in event handlers (#… #75787

fix(runtime): display proper error when throwing in event handlers (#…

fix(runtime): display proper error when throwing in event handlers (#… #75787

Workflow file for this run

# GENERATED BY ./ci.generate.ts -- DO NOT DIRECTLY EDIT
name: ci
on:
push:
branches:
- main
tags:
- '*'
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
permissions:
contents: write
id-token: write
concurrency:
group: '${{ github.workflow }}-${{ !contains(github.event.pull_request.labels.*.name, ''ci-test-flaky'') && github.head_ref || github.run_id }}'
cancel-in-progress: true
jobs:
pre_build:
name: pre-build
runs-on: ubuntu-latest
outputs:
skip_build: '${{ steps.check.outputs.skip_build }}'
skip_deno_core_test: '${{ steps.deno_core_changes.outputs.skip_deno_core_test }}'
steps:
- name: Configure git
if: github.event_name == 'pull_request'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: github.event_name == 'pull_request'
with:
fetch-depth: 5
submodules: false
- name: Install Deno
uses: denoland/setup-deno@v2
if: github.event_name == 'pull_request'
with:
deno-version: v2.x
- id: check
if: 'github.event_name == ''pull_request'' && github.event.pull_request.draft == true && !contains(github.event.pull_request.labels.*.name, ''ci-draft'')'
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 or add the ci-draft label.' ; echo 'skip_build=true' >> $GITHUB_OUTPUT)
- id: deno_core_changes
if: github.event_name == 'pull_request'
run: |-
git fetch --depth=1 origin ${{ github.event.pull_request.base.sha }}
deno run -A tools/check_deno_core_changes.js ${{ github.event.pull_request.base.sha }}
bench:
name: bench release linux-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: ubuntu-24.04
timeout-minutes: 240
defaults:
run:
shell: bash
steps:
- name: Configure git
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
with:
fetch-depth: 5
submodules: false
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-linux-x86_64-bench-
- name: Install Node
uses: actions/setup-node@v6
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
- name: Clone submodule ./tests/bench/testdata/lsp_benchdata
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/bench/testdata/lsp_benchdata
- name: Clone submodule ./tests/util/std
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Set up incremental LTO and sysroot build
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
run: |-
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
# Remove older clang before we install
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'clang-19*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'llvm-17*' 'llvm-18*' 'llvm-19*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' 'lld-19*' > /dev/null 2> /dev/null
# Install clang-XXX, lld-XXX, and debootstrap.
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-noble-21.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21 || (echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21)
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
clang-21 -c -o /tmp/memfd_create_shim.o tools/memfd_create_shim.c -fPIC
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20250207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
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
cd
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
# 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 "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-21
CFLAGS=$CFLAGS
" > $GITHUB_ENV
- name: Install Deno
uses: denoland/setup-deno@v2
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
with:
deno-version: v2.x
- name: Install benchmark tools
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: ./tools/install_prebuilt.js wrk hyperfine
- name: Build deno
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
run: cargo build --release -p deno
- name: Run benchmarks
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
run: cargo bench -p bench_tests --bench deno_bench --locked
- name: Post benchmarks
if: '!startsWith(github.ref, ''refs/tags/'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
env:
DENOBOT_PAT: '${{ secrets.DENOBOT_PAT }}'
run: |-
git clone --depth 1 --branch gh-pages \
https://${DENOBOT_PAT}@github.com/denoland/benchmark_data.git \
gh-pages
./target/release/deno run --allow-all ./tools/build_benchmark_jsons.js --release
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
- name: Worker info
if: '(contains(github.event.pull_request.labels.*.name, ''ci-bench'') || github.ref == ''refs/heads/main'') && !startsWith(github.ref, ''refs/tags/'')'
run: |-
cat /proc/cpuinfo
cat /proc/meminfo
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-x86_64-bench-${{ github.sha }}'
build-debug-macos-x86_64:
name: build debug macos-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: macos-15-intel
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Remove macOS cURL --ipv4 flag
run: |-
curl --version
which curl
cat /etc/hosts
rm ~/.curlrc || true
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-macos-x86_64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: 'github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-macos-x86_64-debug-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
- name: Build debug
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo build --locked --bin deno --bin denort --bin test_server --features=panic-trace
- name: Log versions
run: |-
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'
- name: Check deno binary
env:
NO_COLOR: 1
run: target/debug/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact debug-macos-x86_64-deno
uses: actions/upload-artifact@v6
with:
name: debug-macos-x86_64-deno
path: target/debug/deno
retention-days: 3
- name: Upload artifact debug-macos-x86_64-denort
uses: actions/upload-artifact@v6
with:
name: debug-macos-x86_64-denort
path: target/debug/denort
retention-days: 3
- name: Upload artifact debug-macos-x86_64-test-server
uses: actions/upload-artifact@v6
with:
name: debug-macos-x86_64-test-server
path: target/debug/test_server
retention-days: 3
- name: Cache cargo home
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-macos-x86_64-build-main-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-macos-x86_64-debug-build-main-${{ github.sha }}'
test-debug-macos-x86_64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}debug macos-x86_64'
needs:
- build-debug-macos-x86_64
runs-on: macos-15-intel
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-macos-x86_64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-macos-x86_64-debug-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Download artifact debug-macos-x86_64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: debug-macos-x86_64-deno
path: target/debug
- name: Set target/debug/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: chmod +x target/debug/deno
- name: Download artifact debug-macos-x86_64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: debug-macos-x86_64-denort
path: target/debug
- name: Set target/debug/denort permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
run: chmod +x target/debug/denort
- name: Download artifact debug-macos-x86_64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: debug-macos-x86_64-test-server
path: target/debug
- name: Set target/debug/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
run: chmod +x target/debug/test_server
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build -p test_ffi
- name: Test (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }}'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-macos-x86_64-debug-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-macos-x86_64-test-${{ matrix.test_crate }}-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-macos-x86_64-debug-test-${{ matrix.test_crate }}-${{ github.sha }}'
build-release-macos-x86_64:
name: build release macos-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''macos-15-intel'' }}'
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Remove macOS cURL --ipv4 flag
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
curl --version
which curl
cat /etc/hosts
rm ~/.curlrc || true
- if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
- name: Install Deno
uses: denoland/setup-deno@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
with:
deno-version: v2.x
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-macos-x86_64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-macos-x86_64-release-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
- name: Configure canary build
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && !startsWith(github.ref, ''refs/tags/'')'
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
- name: Build release
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
run: |-
df -h
cargo build --release --locked --bin deno --bin denort --bin test_server --features=panic-trace
df -h
- name: Generate symcache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
NO_COLOR: 1
run: |-
target/release/deno -A tools/release/create_symcache.ts ./deno.symcache
du -h deno.symcache
du -h target/release/deno
- name: Install rust-codesign
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: ./tools/install_prebuilt.js rcodesign
- name: Pre-release (mac)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
APPLE_CODESIGN_KEY: '${{ secrets.APPLE_CODESIGN_KEY }}'
APPLE_CODESIGN_PASSWORD: '${{ secrets.APPLE_CODESIGN_PASSWORD }}'
run: |-
target/release/deno -A tools/release/create_symcache.ts target/release/deno-x86_64-apple-darwin.symcache
strip -x -S target/release/deno
echo "Key is $(echo $APPLE_CODESIGN_KEY | base64 -d | wc -c) bytes"
rcodesign sign target/release/deno --code-signature-flags=runtime --p12-password="$APPLE_CODESIGN_PASSWORD" --p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) --entitlements-xml-file=cli/entitlements.plist
cd target/release
zip -r deno-x86_64-apple-darwin.zip deno
shasum -a 256 deno-x86_64-apple-darwin.zip > deno-x86_64-apple-darwin.zip.sha256sum
strip -x -S ./denort
zip -r denort-x86_64-apple-darwin.zip denort
shasum -a 256 denort-x86_64-apple-darwin.zip > denort-x86_64-apple-darwin.zip.sha256sum
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Setup gcloud (unix)
uses: google-github-actions/setup-gcloud@v3
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
- name: Log versions
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
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'
- name: Upload canary to dl.deno.land
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/canary/$(git rev-parse HEAD)/
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.symcache"
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
aws s3 cp canary-latest.txt s3://dl-deno-land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt
rm canary-latest.txt gha-creds-*.json
- name: Build product size info
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
run: |-
du -hd1 "./target/release"
du -ha "./target/release/deno"
du -ha "./target/release/denort"
- name: Check deno binary
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
env:
NO_COLOR: 1
run: target/release/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact release-macos-x86_64-deno
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-macos-x86_64-deno
path: target/release/deno
retention-days: 3
- name: Upload artifact release-macos-x86_64-denort
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-macos-x86_64-denort
path: target/release/denort
retention-days: 3
- name: Upload artifact release-macos-x86_64-test-server
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-macos-x86_64-test-server
path: target/release/test_server
retention-days: 3
- name: Upload release to dl.deno.land (unix)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
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/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.symcache"
- name: Create release notes
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
run: |-
export PATH=$PATH:$(pwd)/target/release
./tools/release/05_create_release_notes.ts
- name: Upload release to GitHub
uses: softprops/action-gh-release@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
files: |-
target/release/deno-x86_64-pc-windows-msvc.zip
target/release/deno-x86_64-pc-windows-msvc.zip.sha256sum
target/release/denort-x86_64-pc-windows-msvc.zip
target/release/denort-x86_64-pc-windows-msvc.zip.sha256sum
target/release/deno-aarch64-pc-windows-msvc.zip
target/release/deno-aarch64-pc-windows-msvc.zip.sha256sum
target/release/denort-aarch64-pc-windows-msvc.zip
target/release/denort-aarch64-pc-windows-msvc.zip.sha256sum
target/release/deno-x86_64-unknown-linux-gnu.zip
target/release/deno-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/denort-x86_64-unknown-linux-gnu.zip
target/release/denort-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/deno-x86_64-apple-darwin.zip
target/release/deno-x86_64-apple-darwin.zip.sha256sum
target/release/denort-x86_64-apple-darwin.zip
target/release/denort-x86_64-apple-darwin.zip.sha256sum
target/release/deno-aarch64-unknown-linux-gnu.zip
target/release/deno-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/denort-aarch64-unknown-linux-gnu.zip
target/release/denort-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/deno-aarch64-apple-darwin.zip
target/release/deno-aarch64-apple-darwin.zip.sha256sum
target/release/denort-aarch64-apple-darwin.zip
target/release/denort-aarch64-apple-darwin.zip.sha256sum
target/release/deno_src.tar.gz
target/release/lib.deno.d.ts
body_path: target/release/release-notes.md
draft: true
test-release-macos-x86_64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}release macos-x86_64'
needs:
- build-release-macos-x86_64
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''macos-15-intel'' }}'
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-macos-x86_64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-macos-x86_64-release-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Download artifact release-macos-x86_64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: release-macos-x86_64-deno
path: target/release
- name: Set target/release/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: chmod +x target/release/deno
- name: Download artifact release-macos-x86_64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: release-macos-x86_64-denort
path: target/release
- name: Set target/release/denort permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
run: chmod +x target/release/denort
- name: Download artifact release-macos-x86_64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: release-macos-x86_64-test-server
path: target/release
- name: Set target/release/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
run: chmod +x target/release/test_server
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build --release -p test_ffi
- name: Test (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }} --release'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-macos-x86_64-release-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
build-debug-macos-aarch64:
name: build debug macos-aarch64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: macos-14
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Remove macOS cURL --ipv4 flag
run: |-
curl --version
which curl
cat /etc/hosts
rm ~/.curlrc || true
- env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
- name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install macOS aarch64 lld
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: ./tools/install_prebuilt.js ld64.lld
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-macos-aarch64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: 'github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-macos-aarch64-debug-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
- name: Build debug
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo build --locked --bin deno --bin denort --bin test_server --features=panic-trace
- name: Log versions
run: |-
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'
- name: Check deno binary
env:
NO_COLOR: 1
run: target/debug/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact debug-macos-aarch64-deno
uses: actions/upload-artifact@v6
with:
name: debug-macos-aarch64-deno
path: target/debug/deno
retention-days: 3
- name: Upload artifact debug-macos-aarch64-denort
uses: actions/upload-artifact@v6
with:
name: debug-macos-aarch64-denort
path: target/debug/denort
retention-days: 3
- name: Upload artifact debug-macos-aarch64-test-server
uses: actions/upload-artifact@v6
with:
name: debug-macos-aarch64-test-server
path: target/debug/test_server
retention-days: 3
- name: Cache cargo home
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-macos-aarch64-build-main-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-macos-aarch64-debug-build-main-${{ github.sha }}'
test-debug-macos-aarch64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}debug macos-aarch64'
needs:
- build-debug-macos-aarch64
runs-on: macos-14
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-macos-aarch64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-macos-aarch64-debug-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Install Deno
uses: denoland/setup-deno@v2
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
deno-version: v2.x
- if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
- name: Install macOS aarch64 lld
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: ./tools/install_prebuilt.js ld64.lld
- name: Download artifact debug-macos-aarch64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: debug-macos-aarch64-deno
path: target/debug
- name: Set target/debug/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: chmod +x target/debug/deno
- name: Download artifact debug-macos-aarch64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: debug-macos-aarch64-denort
path: target/debug
- name: Set target/debug/denort permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
run: chmod +x target/debug/denort
- name: Download artifact debug-macos-aarch64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: debug-macos-aarch64-test-server
path: target/debug
- name: Set target/debug/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
run: chmod +x target/debug/test_server
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build -p test_ffi
- name: Test (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }}'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-macos-aarch64-debug-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-macos-aarch64-test-${{ matrix.test_crate }}-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-macos-aarch64-debug-test-${{ matrix.test_crate }}-${{ github.sha }}'
test-libs-debug-macos-aarch64:
name: test libs debug macos-aarch64
needs:
- build-debug-macos-aarch64
runs-on: macos-14
timeout-minutes: 30
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
fetch-depth: 5
submodules: false
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-macos-aarch64-test-libs-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-macos-aarch64-debug-test-libs-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'')'
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Install Deno
uses: denoland/setup-deno@v2
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
deno-version: v2.x
- if: '!startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
- name: Install macOS aarch64 lld
if: '!startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: ./tools/install_prebuilt.js ld64.lld
- name: Download artifact debug-macos-aarch64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
name: debug-macos-aarch64-deno
path: target/debug
- name: Set target/debug/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'')'
run: chmod +x target/debug/deno
- name: Download artifact debug-macos-aarch64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
name: debug-macos-aarch64-test-server
path: target/debug
- name: Set target/debug/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'')'
run: chmod +x target/debug/test_server
- name: Test libs
if: '!startsWith(github.ref, ''refs/tags/'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo test --locked --lib -p deno -p denort -p node_shim -p deno_lib -p deno_snapshots -p deno_bundle_runtime -p deno_cache -p deno_cron -p deno_crypto -p deno_fetch -p deno_ffi -p deno_fs -p deno_http -p deno_image -p deno_io -p deno_kv -p deno_napi -p napi_sym -p deno_net -p deno_node -p deno_node_crypto -p deno_node_sqlite -p denort_helper -p deno_signals -p deno_telemetry -p deno_url -p deno_web -p deno_webgpu -p deno_webidl -p deno_websocket -p deno_webstorage -p deno_cache_dir -p deno_config -p deno_crypto_provider -p deno_dotenv -p eszip -p deno_inspector_server -p deno_lockfile -p deno_maybe_sync -p napi_sys -p node_resolver -p deno_npm -p deno_npm_cache -p deno_npm_installer -p deno_package_json -p deno_resolver -p deno_typescript_go_client_rust -p deno_runtime -p deno_features -p deno_permissions -p deno_subprocess_windows
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-macos-aarch64-test-libs-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-macos-aarch64-debug-test-libs-${{ github.sha }}'
build-release-macos-aarch64:
name: build release macos-aarch64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''macos-14'' }}'
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Remove macOS cURL --ipv4 flag
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
curl --version
which curl
cat /etc/hosts
rm ~/.curlrc || true
- if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
- name: Install Deno
uses: denoland/setup-deno@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
deno-version: v2.x
- name: Install macOS aarch64 lld
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: ./tools/install_prebuilt.js ld64.lld
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-macos-aarch64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-macos-aarch64-release-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
- name: Configure canary build
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && !startsWith(github.ref, ''refs/tags/'')'
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
- name: Build release
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
run: |-
df -h
cargo build --release --locked --bin deno --bin denort --bin test_server --features=panic-trace
df -h
- name: Generate symcache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
NO_COLOR: 1
run: |-
target/release/deno -A tools/release/create_symcache.ts ./deno.symcache
du -h deno.symcache
du -h target/release/deno
- name: Install rust-codesign
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: ./tools/install_prebuilt.js rcodesign
- name: Pre-release (mac)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
APPLE_CODESIGN_KEY: '${{ secrets.APPLE_CODESIGN_KEY }}'
APPLE_CODESIGN_PASSWORD: '${{ secrets.APPLE_CODESIGN_PASSWORD }}'
run: |-
target/release/deno -A tools/release/create_symcache.ts target/release/deno-aarch64-apple-darwin.symcache
strip -x -S target/release/deno
echo "Key is $(echo $APPLE_CODESIGN_KEY | base64 -d | wc -c) bytes"
rcodesign sign target/release/deno --code-signature-flags=runtime --p12-password="$APPLE_CODESIGN_PASSWORD" --p12-file=<(echo $APPLE_CODESIGN_KEY | base64 -d) --entitlements-xml-file=cli/entitlements.plist
cd target/release
zip -r deno-aarch64-apple-darwin.zip deno
shasum -a 256 deno-aarch64-apple-darwin.zip > deno-aarch64-apple-darwin.zip.sha256sum
strip -x -S ./denort
zip -r denort-aarch64-apple-darwin.zip denort
shasum -a 256 denort-aarch64-apple-darwin.zip > denort-aarch64-apple-darwin.zip.sha256sum
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Setup gcloud (unix)
uses: google-github-actions/setup-gcloud@v3
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
- name: Log versions
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
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'
- name: Upload canary to dl.deno.land
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/canary/$(git rev-parse HEAD)/
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.symcache"
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
aws s3 cp canary-latest.txt s3://dl-deno-land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt
rm canary-latest.txt gha-creds-*.json
- name: Build product size info
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
run: |-
du -hd1 "./target/release"
du -ha "./target/release/deno"
du -ha "./target/release/denort"
- name: Check deno binary
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
env:
NO_COLOR: 1
run: target/release/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact release-macos-aarch64-deno
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-macos-aarch64-deno
path: target/release/deno
retention-days: 3
- name: Upload artifact release-macos-aarch64-denort
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-macos-aarch64-denort
path: target/release/denort
retention-days: 3
- name: Upload artifact release-macos-aarch64-test-server
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-macos-aarch64-test-server
path: target/release/test_server
retention-days: 3
- name: Upload release to dl.deno.land (unix)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
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/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.symcache"
- name: Create release notes
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
run: |-
export PATH=$PATH:$(pwd)/target/release
./tools/release/05_create_release_notes.ts
- name: Upload release to GitHub
uses: softprops/action-gh-release@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
files: |-
target/release/deno-x86_64-pc-windows-msvc.zip
target/release/deno-x86_64-pc-windows-msvc.zip.sha256sum
target/release/denort-x86_64-pc-windows-msvc.zip
target/release/denort-x86_64-pc-windows-msvc.zip.sha256sum
target/release/deno-aarch64-pc-windows-msvc.zip
target/release/deno-aarch64-pc-windows-msvc.zip.sha256sum
target/release/denort-aarch64-pc-windows-msvc.zip
target/release/denort-aarch64-pc-windows-msvc.zip.sha256sum
target/release/deno-x86_64-unknown-linux-gnu.zip
target/release/deno-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/denort-x86_64-unknown-linux-gnu.zip
target/release/denort-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/deno-x86_64-apple-darwin.zip
target/release/deno-x86_64-apple-darwin.zip.sha256sum
target/release/denort-x86_64-apple-darwin.zip
target/release/denort-x86_64-apple-darwin.zip.sha256sum
target/release/deno-aarch64-unknown-linux-gnu.zip
target/release/deno-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/denort-aarch64-unknown-linux-gnu.zip
target/release/denort-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/deno-aarch64-apple-darwin.zip
target/release/deno-aarch64-apple-darwin.zip.sha256sum
target/release/denort-aarch64-apple-darwin.zip
target/release/denort-aarch64-apple-darwin.zip.sha256sum
target/release/deno_src.tar.gz
target/release/lib.deno.d.ts
body_path: target/release/release-notes.md
draft: true
test-release-macos-aarch64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}release macos-aarch64'
needs:
- build-release-macos-aarch64
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''macos-14'' }}'
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-macos-aarch64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-macos-aarch64-release-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Install Deno
uses: denoland/setup-deno@v2
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
deno-version: v2.x
- if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: echo $GITHUB_WORKSPACE/third_party/prebuilt/mac >> $GITHUB_PATH
- name: Install macOS aarch64 lld
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: ./tools/install_prebuilt.js ld64.lld
- name: Download artifact release-macos-aarch64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: release-macos-aarch64-deno
path: target/release
- name: Set target/release/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: chmod +x target/release/deno
- name: Download artifact release-macos-aarch64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: release-macos-aarch64-denort
path: target/release
- name: Set target/release/denort permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
run: chmod +x target/release/denort
- name: Download artifact release-macos-aarch64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: release-macos-aarch64-test-server
path: target/release
- name: Set target/release/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
run: chmod +x target/release/test_server
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build --release -p test_ffi
- name: Test (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }} --release'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-macos-aarch64-release-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
build-debug-windows-x86_64:
name: build debug windows-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: windows-2022
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-windows-x86_64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: 'github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-windows-x86_64-debug-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
- name: Build debug
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo build --locked --bin deno --bin denort --bin test_server --features=panic-trace
- name: Log versions
run: |-
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'
- name: Check deno binary
env:
NO_COLOR: 1
run: target/debug/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact debug-windows-x86_64-deno
uses: actions/upload-artifact@v6
with:
name: debug-windows-x86_64-deno
path: target/debug/deno.exe
retention-days: 3
- name: Upload artifact debug-windows-x86_64-denort
uses: actions/upload-artifact@v6
with:
name: debug-windows-x86_64-denort
path: target/debug/denort.exe
retention-days: 3
- name: Upload artifact debug-windows-x86_64-test-server
uses: actions/upload-artifact@v6
with:
name: debug-windows-x86_64-test-server
path: target/debug/test_server.exe
retention-days: 3
- name: Cache cargo home
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-windows-x86_64-build-main-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-windows-x86_64-debug-build-main-${{ github.sha }}'
test-debug-windows-x86_64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}debug windows-x86_64'
needs:
- build-debug-windows-x86_64
runs-on: windows-2022
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-windows-x86_64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-windows-x86_64-debug-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Download artifact debug-windows-x86_64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: debug-windows-x86_64-deno
path: target/debug
- name: Download artifact debug-windows-x86_64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: debug-windows-x86_64-denort
path: target/debug
- name: Download artifact debug-windows-x86_64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: debug-windows-x86_64-test-server
path: target/debug
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build -p test_ffi
- name: Test (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }}'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-windows-x86_64-debug-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-windows-x86_64-test-${{ matrix.test_crate }}-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-windows-x86_64-debug-test-${{ matrix.test_crate }}-${{ github.sha }}'
test-libs-debug-windows-x86_64:
name: test libs debug windows-x86_64
needs:
- build-debug-windows-x86_64
runs-on: windows-2022
timeout-minutes: 30
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
fetch-depth: 5
submodules: false
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-windows-x86_64-test-libs-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-windows-x86_64-debug-test-libs-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'')'
- name: Download artifact debug-windows-x86_64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
name: debug-windows-x86_64-deno
path: target/debug
- name: Download artifact debug-windows-x86_64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
name: debug-windows-x86_64-test-server
path: target/debug
- name: Test libs
if: '!startsWith(github.ref, ''refs/tags/'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo test --locked --lib -p deno -p denort -p node_shim -p deno_lib -p deno_snapshots -p deno_bundle_runtime -p deno_cache -p deno_cron -p deno_crypto -p deno_fetch -p deno_ffi -p deno_fs -p deno_http -p deno_image -p deno_io -p deno_kv -p deno_napi -p napi_sym -p deno_net -p deno_node -p deno_node_crypto -p deno_node_sqlite -p denort_helper -p deno_signals -p deno_telemetry -p deno_url -p deno_web -p deno_webgpu -p deno_webidl -p deno_websocket -p deno_webstorage -p deno_cache_dir -p deno_config -p deno_crypto_provider -p deno_dotenv -p eszip -p deno_inspector_server -p deno_lockfile -p deno_maybe_sync -p napi_sys -p node_resolver -p deno_npm -p deno_npm_cache -p deno_npm_installer -p deno_package_json -p deno_resolver -p deno_typescript_go_client_rust -p deno_runtime -p deno_features -p deno_permissions -p deno_subprocess_windows
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-windows-x86_64-test-libs-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-windows-x86_64-debug-test-libs-${{ github.sha }}'
build-release-windows-x86_64:
name: build release windows-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: '${{ !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'' }}'
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-windows-x86_64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-windows-x86_64-release-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
- name: Configure canary build
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && !startsWith(github.ref, ''refs/tags/'')'
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
- name: Build release
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
run: |-
df -h
cargo build --release --locked --bin deno --bin denort --bin test_server --features=panic-trace
df -h
- name: Generate symcache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
NO_COLOR: 1
run: |-
target/release/deno -A tools/release/create_symcache.ts ./deno.symcache
du -h deno.symcache
du -h target/release/deno
- name: Authenticate with Azure (windows)
uses: azure/login@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
client-id: '${{ secrets.AZURE_CLIENT_ID }}'
tenant-id: '${{ secrets.AZURE_TENANT_ID }}'
subscription-id: '${{ secrets.AZURE_SUBSCRIPTION_ID }}'
enable-AzPSSession: true
- name: Code sign deno.exe (windows)
uses: Azure/artifact-signing-action@v0
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
endpoint: 'https://eus.codesigning.azure.net/'
trusted-signing-account-name: deno-cli-code-signing
certificate-profile-name: deno-cli-code-signing-cert
files-folder: target/release
files-folder-filter: deno.exe
file-digest: SHA256
timestamp-rfc3161: 'http://timestamp.acs.microsoft.com'
timestamp-digest: SHA256
exclude-environment-credential: true
exclude-workload-identity-credential: true
exclude-managed-identity-credential: true
exclude-shared-token-cache-credential: true
exclude-visual-studio-credential: true
exclude-visual-studio-code-credential: true
exclude-azure-cli-credential: false
- name: Verify signature (windows)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
shell: pwsh
run: |-
$SignTool = Get-ChildItem -Path "C:\Program Files*\Windows Kits\*\bin\*\x64\signtool.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
$SignToolPath = $SignTool.FullName
& $SignToolPath verify /pa /v target\release\deno.exe
- name: Pre-release (windows)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
shell: pwsh
run: |-
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-x86_64-pc-windows-msvc.zip
Get-FileHash target/release/deno-x86_64-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/deno-x86_64-pc-windows-msvc.zip.sha256sum
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-x86_64-pc-windows-msvc.zip
Get-FileHash target/release/denort-x86_64-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/denort-x86_64-pc-windows-msvc.zip.sha256sum
target/release/deno.exe -A tools/release/create_symcache.ts target/release/deno-x86_64-pc-windows-msvc.symcache
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Install Python
uses: actions/setup-python@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
python-version: 3.11
- name: Remove unused versions of Python
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
shell: pwsh
run: |-
$env:PATH -split ";" |
Where-Object { Test-Path "$_\python.exe" } |
Select-Object -Skip 1 |
ForEach-Object { Move-Item "$_" "$_.disabled" }
- name: Log versions
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
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'
- name: Setup gcloud (windows)
uses: google-github-actions/setup-gcloud@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
env:
CLOUDSDK_PYTHON: '${{env.pythonLocation}}\python.exe'
with:
project_id: denoland
- name: Upload canary to dl.deno.land
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/canary/$(git rev-parse HEAD)/
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.symcache"
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
aws s3 cp canary-latest.txt s3://dl-deno-land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt
rm canary-latest.txt gha-creds-*.json
- name: Build product size info
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
run: |-
du -hd1 "./target/release"
du -ha "./target/release/deno"
du -ha "./target/release/denort"
- name: Check deno binary
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
env:
NO_COLOR: 1
run: target/release/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact release-windows-x86_64-deno
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-windows-x86_64-deno
path: target/release/deno.exe
retention-days: 3
- name: Upload artifact release-windows-x86_64-denort
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-windows-x86_64-denort
path: target/release/denort.exe
retention-days: 3
- name: Upload artifact release-windows-x86_64-test-server
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-windows-x86_64-test-server
path: target/release/test_server.exe
retention-days: 3
- name: Upload release to dl.deno.land (windows)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
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/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.symcache"
- name: Create release notes
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
run: |-
export PATH=$PATH:$(pwd)/target/release
./tools/release/05_create_release_notes.ts
- name: Upload release to GitHub
uses: softprops/action-gh-release@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
files: |-
target/release/deno-x86_64-pc-windows-msvc.zip
target/release/deno-x86_64-pc-windows-msvc.zip.sha256sum
target/release/denort-x86_64-pc-windows-msvc.zip
target/release/denort-x86_64-pc-windows-msvc.zip.sha256sum
target/release/deno-aarch64-pc-windows-msvc.zip
target/release/deno-aarch64-pc-windows-msvc.zip.sha256sum
target/release/denort-aarch64-pc-windows-msvc.zip
target/release/denort-aarch64-pc-windows-msvc.zip.sha256sum
target/release/deno-x86_64-unknown-linux-gnu.zip
target/release/deno-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/denort-x86_64-unknown-linux-gnu.zip
target/release/denort-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/deno-x86_64-apple-darwin.zip
target/release/deno-x86_64-apple-darwin.zip.sha256sum
target/release/denort-x86_64-apple-darwin.zip
target/release/denort-x86_64-apple-darwin.zip.sha256sum
target/release/deno-aarch64-unknown-linux-gnu.zip
target/release/deno-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/denort-aarch64-unknown-linux-gnu.zip
target/release/denort-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/deno-aarch64-apple-darwin.zip
target/release/deno-aarch64-apple-darwin.zip.sha256sum
target/release/denort-aarch64-apple-darwin.zip
target/release/denort-aarch64-apple-darwin.zip.sha256sum
target/release/deno_src.tar.gz
target/release/lib.deno.d.ts
body_path: target/release/release-notes.md
draft: true
test-release-windows-x86_64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}release windows-x86_64'
needs:
- build-release-windows-x86_64
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''windows-2022'' }}'
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-windows-x86_64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-windows-x86_64-release-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Download artifact release-windows-x86_64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: release-windows-x86_64-deno
path: target/release
- name: Download artifact release-windows-x86_64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: release-windows-x86_64-denort
path: target/release
- name: Download artifact release-windows-x86_64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: release-windows-x86_64-test-server
path: target/release
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build --release -p test_ffi
- name: Test (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }} --release'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-windows-x86_64-release-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
build-debug-windows-aarch64:
name: build debug windows-aarch64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: windows-11-arm
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-windows-aarch64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: 'github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-windows-aarch64-debug-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
- name: Build debug
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo build --locked --bin deno --bin denort --bin test_server --features=panic-trace
- name: Log versions
run: |-
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'
- name: Check deno binary
env:
NO_COLOR: 1
run: target/debug/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact debug-windows-aarch64-deno
uses: actions/upload-artifact@v6
with:
name: debug-windows-aarch64-deno
path: target/debug/deno.exe
retention-days: 3
- name: Upload artifact debug-windows-aarch64-denort
uses: actions/upload-artifact@v6
with:
name: debug-windows-aarch64-denort
path: target/debug/denort.exe
retention-days: 3
- name: Upload artifact debug-windows-aarch64-test-server
uses: actions/upload-artifact@v6
with:
name: debug-windows-aarch64-test-server
path: target/debug/test_server.exe
retention-days: 3
- name: Cache cargo home
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-windows-aarch64-build-main-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-windows-aarch64-debug-build-main-${{ github.sha }}'
test-debug-windows-aarch64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}debug windows-aarch64'
needs:
- build-debug-windows-aarch64
runs-on: windows-11-arm
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-windows-aarch64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-windows-aarch64-debug-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Download artifact debug-windows-aarch64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: debug-windows-aarch64-deno
path: target/debug
- name: Download artifact debug-windows-aarch64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: debug-windows-aarch64-denort
path: target/debug
- name: Download artifact debug-windows-aarch64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: debug-windows-aarch64-test-server
path: target/debug
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build -p test_ffi
- name: Test (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }}'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-windows-aarch64-debug-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-windows-aarch64-test-${{ matrix.test_crate }}-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-windows-aarch64-debug-test-${{ matrix.test_crate }}-${{ github.sha }}'
build-release-windows-aarch64:
name: build release windows-aarch64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''windows-11-arm'' }}'
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-windows-aarch64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-windows-aarch64-release-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
- name: Configure canary build
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && !startsWith(github.ref, ''refs/tags/'')'
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
- name: Build release
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
run: |-
df -h
cargo build --release --locked --bin deno --bin denort --bin test_server --features=panic-trace
df -h
- name: Generate symcache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
NO_COLOR: 1
run: |-
target/release/deno -A tools/release/create_symcache.ts ./deno.symcache
du -h deno.symcache
du -h target/release/deno
- name: Authenticate with Azure (windows)
uses: azure/login@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
client-id: '${{ secrets.AZURE_CLIENT_ID }}'
tenant-id: '${{ secrets.AZURE_TENANT_ID }}'
subscription-id: '${{ secrets.AZURE_SUBSCRIPTION_ID }}'
enable-AzPSSession: true
- name: Code sign deno.exe (windows)
uses: Azure/artifact-signing-action@v0
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
endpoint: 'https://eus.codesigning.azure.net/'
trusted-signing-account-name: deno-cli-code-signing
certificate-profile-name: deno-cli-code-signing-cert
files-folder: target/release
files-folder-filter: deno.exe
file-digest: SHA256
timestamp-rfc3161: 'http://timestamp.acs.microsoft.com'
timestamp-digest: SHA256
exclude-environment-credential: true
exclude-workload-identity-credential: true
exclude-managed-identity-credential: true
exclude-shared-token-cache-credential: true
exclude-visual-studio-credential: true
exclude-visual-studio-code-credential: true
exclude-azure-cli-credential: false
- name: Verify signature (windows)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
shell: pwsh
run: |-
$SignTool = Get-ChildItem -Path "C:\Program Files*\Windows Kits\*\bin\*\x64\signtool.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1
$SignToolPath = $SignTool.FullName
& $SignToolPath verify /pa /v target\release\deno.exe
- name: Pre-release (windows)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
shell: pwsh
run: |-
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-aarch64-pc-windows-msvc.zip
Get-FileHash target/release/deno-aarch64-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/deno-aarch64-pc-windows-msvc.zip.sha256sum
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-aarch64-pc-windows-msvc.zip
Get-FileHash target/release/denort-aarch64-pc-windows-msvc.zip -Algorithm SHA256 | Format-List > target/release/denort-aarch64-pc-windows-msvc.zip.sha256sum
target/release/deno.exe -A tools/release/create_symcache.ts target/release/deno-aarch64-pc-windows-msvc.symcache
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Install Python
uses: actions/setup-python@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
python-version: 3.11
- name: Remove unused versions of Python
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
shell: pwsh
run: |-
$env:PATH -split ";" |
Where-Object { Test-Path "$_\python.exe" } |
Select-Object -Skip 1 |
ForEach-Object { Move-Item "$_" "$_.disabled" }
- name: Log versions
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
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'
- name: Setup gcloud (windows)
uses: google-github-actions/setup-gcloud@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
env:
CLOUDSDK_PYTHON: '${{env.pythonLocation}}\python.exe'
with:
project_id: denoland
- name: Upload canary to dl.deno.land
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/canary/$(git rev-parse HEAD)/
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.symcache"
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
aws s3 cp canary-latest.txt s3://dl-deno-land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt
rm canary-latest.txt gha-creds-*.json
- name: Build product size info
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
run: |-
du -hd1 "./target/release"
du -ha "./target/release/deno"
du -ha "./target/release/denort"
- name: Check deno binary
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
env:
NO_COLOR: 1
run: target/release/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact release-windows-aarch64-deno
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-windows-aarch64-deno
path: target/release/deno.exe
retention-days: 3
- name: Upload artifact release-windows-aarch64-denort
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-windows-aarch64-denort
path: target/release/denort.exe
retention-days: 3
- name: Upload artifact release-windows-aarch64-test-server
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-windows-aarch64-test-server
path: target/release/test_server.exe
retention-days: 3
- name: Upload release to dl.deno.land (windows)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
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/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.symcache"
- name: Create release notes
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
run: |-
export PATH=$PATH:$(pwd)/target/release
./tools/release/05_create_release_notes.ts
- name: Upload release to GitHub
uses: softprops/action-gh-release@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
files: |-
target/release/deno-x86_64-pc-windows-msvc.zip
target/release/deno-x86_64-pc-windows-msvc.zip.sha256sum
target/release/denort-x86_64-pc-windows-msvc.zip
target/release/denort-x86_64-pc-windows-msvc.zip.sha256sum
target/release/deno-aarch64-pc-windows-msvc.zip
target/release/deno-aarch64-pc-windows-msvc.zip.sha256sum
target/release/denort-aarch64-pc-windows-msvc.zip
target/release/denort-aarch64-pc-windows-msvc.zip.sha256sum
target/release/deno-x86_64-unknown-linux-gnu.zip
target/release/deno-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/denort-x86_64-unknown-linux-gnu.zip
target/release/denort-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/deno-x86_64-apple-darwin.zip
target/release/deno-x86_64-apple-darwin.zip.sha256sum
target/release/denort-x86_64-apple-darwin.zip
target/release/denort-x86_64-apple-darwin.zip.sha256sum
target/release/deno-aarch64-unknown-linux-gnu.zip
target/release/deno-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/denort-aarch64-unknown-linux-gnu.zip
target/release/denort-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/deno-aarch64-apple-darwin.zip
target/release/deno-aarch64-apple-darwin.zip.sha256sum
target/release/denort-aarch64-apple-darwin.zip
target/release/denort-aarch64-apple-darwin.zip.sha256sum
target/release/deno_src.tar.gz
target/release/lib.deno.d.ts
body_path: target/release/release-notes.md
draft: true
test-release-windows-aarch64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}release windows-aarch64'
needs:
- build-release-windows-aarch64
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''windows-11-arm'' }}'
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-windows-aarch64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-windows-aarch64-release-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Download artifact release-windows-aarch64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: release-windows-aarch64-deno
path: target/release
- name: Download artifact release-windows-aarch64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: release-windows-aarch64-denort
path: target/release
- name: Download artifact release-windows-aarch64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: release-windows-aarch64-test-server
path: target/release
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build --release -p test_ffi
- name: Test (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
env:
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }} --release'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-windows-aarch64-release-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
build-release-linux-x86_64:
name: build release linux-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: ubuntu-24.04
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: 'Create source tarballs (release, linux)'
if: 'github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
run: |-
mkdir -p target/release
tar --exclude=".git*" --exclude=target --exclude=third_party/prebuilt \
-czvf target/release/deno_src.tar.gz -C .. deno
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-linux-x86_64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: 'github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-linux-x86_64-release-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
- name: Set up incremental LTO and sysroot build
run: |-
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
# Remove older clang before we install
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'clang-19*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'llvm-17*' 'llvm-18*' 'llvm-19*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' 'lld-19*' > /dev/null 2> /dev/null
# Install clang-XXX, lld-XXX, and debootstrap.
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-noble-21.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21 || (echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21)
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
clang-21 -c -o /tmp/memfd_create_shim.o tools/memfd_create_shim.c -fPIC
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20250207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
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
cd
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
# 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 "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-21
CFLAGS=$CFLAGS
" > $GITHUB_ENV
- name: Configure canary build
if: '!startsWith(github.ref, ''refs/tags/'')'
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
- name: Build release
run: |-
df -h
cargo build --release --locked --bin deno --bin denort --bin test_server --features=panic-trace
df -h
- name: Generate symcache
env:
NO_COLOR: 1
run: |-
target/release/deno -A tools/release/create_symcache.ts ./deno.symcache
du -h deno.symcache
du -h target/release/deno
- name: Pre-release (linux)
if: github.repository == 'denoland/deno'
run: |-
cd target/release
./deno -A ../../tools/release/create_symcache.ts deno-x86_64-unknown-linux-gnu.symcache
strip ./deno
zip -r deno-x86_64-unknown-linux-gnu.zip deno
shasum -a 256 deno-x86_64-unknown-linux-gnu.zip > deno-x86_64-unknown-linux-gnu.zip.sha256sum
strip ./denort
zip -r denort-x86_64-unknown-linux-gnu.zip denort
shasum -a 256 denort-x86_64-unknown-linux-gnu.zip > denort-x86_64-unknown-linux-gnu.zip.sha256sum
./deno types > lib.deno.d.ts
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
if: 'github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Setup gcloud (unix)
uses: google-github-actions/setup-gcloud@v3
if: 'github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
- name: Log versions
run: |-
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'
- name: Upload canary to dl.deno.land
if: github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/canary/$(git rev-parse HEAD)/
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.symcache"
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
aws s3 cp canary-latest.txt s3://dl-deno-land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt
rm canary-latest.txt gha-creds-*.json
- name: Build product size info
if: 'github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')'
run: |-
du -hd1 "./target/release"
du -ha "./target/release/deno"
du -ha "./target/release/denort"
- name: Check deno binary
env:
NO_COLOR: 1
run: target/release/deno eval "console.log(1+2)" | grep 3
- name: Check deno binary (in sysroot)
run: sudo chroot /sysroot "$(pwd)/target/release/deno" --version
- name: Upload artifact release-linux-x86_64-deno
uses: actions/upload-artifact@v6
with:
name: release-linux-x86_64-deno
path: target/release/deno
retention-days: 3
- name: Upload artifact release-linux-x86_64-denort
uses: actions/upload-artifact@v6
with:
name: release-linux-x86_64-denort
path: target/release/denort
retention-days: 3
- name: Upload artifact release-linux-x86_64-test-server
uses: actions/upload-artifact@v6
with:
name: release-linux-x86_64-test-server
path: target/release/test_server
retention-days: 3
- name: Upload release to dl.deno.land (unix)
if: 'github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
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/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.symcache"
- name: Create release notes
if: 'github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
run: |-
export PATH=$PATH:$(pwd)/target/release
./tools/release/05_create_release_notes.ts
- name: Upload release to GitHub
uses: softprops/action-gh-release@v2
if: 'github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
files: |-
target/release/deno-x86_64-pc-windows-msvc.zip
target/release/deno-x86_64-pc-windows-msvc.zip.sha256sum
target/release/denort-x86_64-pc-windows-msvc.zip
target/release/denort-x86_64-pc-windows-msvc.zip.sha256sum
target/release/deno-aarch64-pc-windows-msvc.zip
target/release/deno-aarch64-pc-windows-msvc.zip.sha256sum
target/release/denort-aarch64-pc-windows-msvc.zip
target/release/denort-aarch64-pc-windows-msvc.zip.sha256sum
target/release/deno-x86_64-unknown-linux-gnu.zip
target/release/deno-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/denort-x86_64-unknown-linux-gnu.zip
target/release/denort-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/deno-x86_64-apple-darwin.zip
target/release/deno-x86_64-apple-darwin.zip.sha256sum
target/release/denort-x86_64-apple-darwin.zip
target/release/denort-x86_64-apple-darwin.zip.sha256sum
target/release/deno-aarch64-unknown-linux-gnu.zip
target/release/deno-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/denort-aarch64-unknown-linux-gnu.zip
target/release/denort-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/deno-aarch64-apple-darwin.zip
target/release/deno-aarch64-apple-darwin.zip.sha256sum
target/release/denort-aarch64-apple-darwin.zip
target/release/denort-aarch64-apple-darwin.zip.sha256sum
target/release/deno_src.tar.gz
target/release/lib.deno.d.ts
body_path: target/release/release-notes.md
draft: true
- name: Cache cargo home
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-x86_64-build-main-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-x86_64-release-build-main-${{ github.sha }}'
test-release-linux-x86_64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}release linux-x86_64'
needs:
- build-release-linux-x86_64
runs-on: ubuntu-24.04
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-linux-x86_64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-linux-x86_64-release-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Set up incremental LTO and sysroot build
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
# Remove older clang before we install
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'clang-19*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'llvm-17*' 'llvm-18*' 'llvm-19*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' 'lld-19*' > /dev/null 2> /dev/null
# Install clang-XXX, lld-XXX, and debootstrap.
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-noble-21.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21 || (echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21)
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
clang-21 -c -o /tmp/memfd_create_shim.o tools/memfd_create_shim.c -fPIC
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20250207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
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
cd
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
# 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 "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-21
CFLAGS=$CFLAGS
" > $GITHUB_ENV
- name: Download artifact release-linux-x86_64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: release-linux-x86_64-deno
path: target/release
- name: Set target/release/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: chmod +x target/release/deno
- name: Download artifact release-linux-x86_64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: release-linux-x86_64-denort
path: target/release
- name: Set target/release/denort permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
run: chmod +x target/release/denort
- name: Download artifact release-linux-x86_64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: release-linux-x86_64-test-server
path: target/release
- name: Set target/release/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
run: chmod +x target/release/test_server
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (release)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build --release -p test_ffi
- name: Test (release)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }} --release'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-linux-x86_64-release-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-x86_64-test-${{ matrix.test_crate }}-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-x86_64-release-test-${{ matrix.test_crate }}-${{ github.sha }}'
wpt-release-linux-x86_64:
name: wpt release linux-x86_64
needs:
- build-release-linux-x86_64
runs-on: ubuntu-24.04
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Clone submodule ./tests/wpt/suite
if: '!startsWith(github.ref, ''refs/tags/'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/wpt/suite
- name: Restore cache wpt and autobahn test run hashes
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target/wpt_input_hash
./target/autobahn_input_hash
key: never_saved
restore-keys: 102-wpt-target-linux-x86_64-release-
- name: Install Deno
uses: denoland/setup-deno@v2
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
deno-version: v2.x
- name: Install Python
uses: actions/setup-python@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
python-version: 3.11
- name: Download artifact release-linux-x86_64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
name: release-linux-x86_64-deno
path: target/release
- name: Set target/release/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'')'
run: chmod +x target/release/deno
- name: Configure hosts file for WPT
if: '!startsWith(github.ref, ''refs/tags/'')'
working-directory: tests/wpt/suite/
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
- name: Run web platform tests (release)
if: '!startsWith(github.ref, ''refs/tags/'')'
env:
DENO_BIN: ./target/release/deno
run: |-
deno run -RWNE --allow-run --lock=tools/deno.lock.json --config tests/config/deno.json \
./tests/wpt/wpt.ts setup
deno run -RWNE --allow-run --lock=tools/deno.lock.json --config tests/config/deno.json --unsafely-ignore-certificate-errors \
./tests/wpt/wpt.ts run --all --quiet --release --binary="$DENO_BIN" --json=wpt.json --wptreport=wptreport.json
- name: Autobahn testsuite
if: '!startsWith(github.ref, ''refs/tags/'')'
run: target/release/deno run -A --config tests/config/deno.json ext/websocket/autobahn/fuzzingclient.js
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
if: '!startsWith(github.ref, ''refs/tags/'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Setup gcloud (unix)
uses: google-github-actions/setup-gcloud@v3
if: '!startsWith(github.ref, ''refs/tags/'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
with:
project_id: denoland
- name: Upload wpt results to dl.deno.land
if: '!startsWith(github.ref, ''refs/tags/'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
continue-on-error: true
run: |-
gzip ./wptreport.json
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
aws s3 cp ./wpt.json s3://dl-deno-land/wpt/$(git rev-parse HEAD).json
aws s3 cp ./wptreport.json.gz s3://dl-deno-land/wpt/$(git rev-parse HEAD)-wptreport.json.gz
echo $(git rev-parse HEAD) > wpt-latest.txt
gsutil -h "Cache-Control: no-cache" cp wpt-latest.txt gs://dl.deno.land/wpt-latest.txt
aws s3 cp wpt-latest.txt s3://dl-deno-land/wpt-latest.txt
- name: Upload wpt results to wpt.fyi
if: '!startsWith(github.ref, ''refs/tags/'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
env:
WPT_FYI_USER: deno
WPT_FYI_PW: '${{ secrets.WPT_FYI_PW }}'
GITHUB_TOKEN: '${{ secrets.DENOBOT_PAT }}'
continue-on-error: true
run: |-
./target/release/deno run --allow-all --lock=tools/deno.lock.json \
./tools/upload_wptfyi.js $(git rev-parse HEAD) --ghstatus
- name: Cache wpt and autobahn test run hashes
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target/wpt_input_hash
./target/autobahn_input_hash
key: '102-wpt-target-linux-x86_64-release-${{ github.sha }}'
build-debug-linux-x86_64:
name: build debug linux-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: ubuntu-24.04
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-linux-x86_64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: 'github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-linux-x86_64-debug-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
- name: Set up incremental LTO and sysroot build
run: |-
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
# Remove older clang before we install
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'clang-19*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'llvm-17*' 'llvm-18*' 'llvm-19*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' 'lld-19*' > /dev/null 2> /dev/null
# Install clang-XXX, lld-XXX, and debootstrap.
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-noble-21.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21 || (echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21)
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
clang-21 -c -o /tmp/memfd_create_shim.o tools/memfd_create_shim.c -fPIC
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20250207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
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
cd
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
# 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 "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-21
CFLAGS=$CFLAGS
" > $GITHUB_ENV
- name: Build debug
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo build --locked --bin deno --bin denort --bin test_server --features=panic-trace
- name: Log versions
run: |-
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'
- name: Check deno binary
env:
NO_COLOR: 1
run: target/debug/deno eval "console.log(1+2)" | grep 3
- name: Check deno binary (in sysroot)
run: sudo chroot /sysroot "$(pwd)/target/debug/deno" --version
- name: Upload artifact debug-linux-x86_64-deno
uses: actions/upload-artifact@v6
with:
name: debug-linux-x86_64-deno
path: target/debug/deno
retention-days: 3
- name: Upload artifact debug-linux-x86_64-denort
uses: actions/upload-artifact@v6
with:
name: debug-linux-x86_64-denort
path: target/debug/denort
retention-days: 3
- name: Upload artifact debug-linux-x86_64-test-server
uses: actions/upload-artifact@v6
with:
name: debug-linux-x86_64-test-server
path: target/debug/test_server
retention-days: 3
- name: Cache cargo home
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-x86_64-build-main-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-x86_64-debug-build-main-${{ github.sha }}'
test-debug-linux-x86_64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}debug linux-x86_64'
needs:
- build-debug-linux-x86_64
runs-on: ubuntu-24.04
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-linux-x86_64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-linux-x86_64-debug-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Set up incremental LTO and sysroot build
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
# Remove older clang before we install
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'clang-19*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'llvm-17*' 'llvm-18*' 'llvm-19*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' 'lld-19*' > /dev/null 2> /dev/null
# Install clang-XXX, lld-XXX, and debootstrap.
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-noble-21.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21 || (echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21)
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
clang-21 -c -o /tmp/memfd_create_shim.o tools/memfd_create_shim.c -fPIC
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20250207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
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
cd
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
# 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 "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-21
CFLAGS=$CFLAGS
" > $GITHUB_ENV
- name: Download artifact debug-linux-x86_64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: debug-linux-x86_64-deno
path: target/debug
- name: Set target/debug/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: chmod +x target/debug/deno
- name: Download artifact debug-linux-x86_64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: debug-linux-x86_64-denort
path: target/debug
- name: Set target/debug/denort permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
run: chmod +x target/debug/denort
- name: Download artifact debug-linux-x86_64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: debug-linux-x86_64-test-server
path: target/debug
- name: Set target/debug/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
run: chmod +x target/debug/test_server
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Build ffi (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build -p test_ffi
- name: Test (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }}'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-linux-x86_64-debug-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-x86_64-test-${{ matrix.test_crate }}-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-x86_64-debug-test-${{ matrix.test_crate }}-${{ github.sha }}'
build-libs-debug-linux-x86_64:
name: build libs debug linux-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
fetch-depth: 5
submodules: false
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'')'
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-linux-x86_64-build-libs-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-linux-x86_64-debug-build-libs-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
cache-path: ./target
- name: Install wasm target
if: '!startsWith(github.ref, ''refs/tags/'')'
run: rustup target add wasm32-unknown-unknown
- name: Cargo check (deno_resolver)
if: '!startsWith(github.ref, ''refs/tags/'')'
run: cargo check --target wasm32-unknown-unknown -p deno_resolver && cargo check --target wasm32-unknown-unknown -p deno_resolver --features graph && cargo check --target wasm32-unknown-unknown -p deno_resolver --features graph --features deno_ast
- name: Cargo check (deno_npm_installer)
if: '!startsWith(github.ref, ''refs/tags/'')'
run: cargo check --target wasm32-unknown-unknown -p deno_npm_installer
- name: Cargo check (deno_config)
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
cargo check --no-default-features -p deno_config
cargo check --no-default-features --features workspace -p deno_config
cargo check --no-default-features --features package_json -p deno_config
cargo check --no-default-features --features workspace --features sync -p deno_config
cargo check --target wasm32-unknown-unknown --all-features -p deno_config
cargo check -p deno --features=lsp-tracing
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-x86_64-build-libs-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-x86_64-debug-build-libs-${{ github.sha }}'
build-debug-linux-aarch64:
name: build debug linux-aarch64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: ubuntu-24.04-arm
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-linux-aarch64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: 'github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-linux-aarch64-debug-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
- name: Build debug
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo build --locked --bin deno --bin denort --bin test_server --features=panic-trace
- name: Log versions
run: |-
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'
- name: Check deno binary
env:
NO_COLOR: 1
run: target/debug/deno eval "console.log(1+2)" | grep 3
- name: Upload artifact debug-linux-aarch64-deno
uses: actions/upload-artifact@v6
with:
name: debug-linux-aarch64-deno
path: target/debug/deno
retention-days: 3
- name: Upload artifact debug-linux-aarch64-denort
uses: actions/upload-artifact@v6
with:
name: debug-linux-aarch64-denort
path: target/debug/denort
retention-days: 3
- name: Upload artifact debug-linux-aarch64-test-server
uses: actions/upload-artifact@v6
with:
name: debug-linux-aarch64-test-server
path: target/debug/test_server
retention-days: 3
- name: Cache cargo home
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-aarch64-build-main-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-aarch64-debug-build-main-${{ github.sha }}'
test-debug-linux-aarch64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}debug linux-aarch64'
needs:
- build-debug-linux-aarch64
runs-on: ubuntu-24.04-arm
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-linux-aarch64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-linux-aarch64-debug-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Download artifact debug-linux-aarch64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: debug-linux-aarch64-deno
path: target/debug
- name: Set target/debug/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: chmod +x target/debug/deno
- name: Download artifact debug-linux-aarch64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: debug-linux-aarch64-denort
path: target/debug
- name: Set target/debug/denort permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
run: chmod +x target/debug/denort
- name: Download artifact debug-linux-aarch64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: debug-linux-aarch64-test-server
path: target/debug
- name: Set target/debug/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
run: chmod +x target/debug/test_server
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Load 'vsock_loopback; kernel module
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: sudo modprobe vsock_loopback
- name: Build ffi (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build -p test_ffi
- name: Test (debug)
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }}'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-linux-aarch64-debug-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-aarch64-test-${{ matrix.test_crate }}-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-aarch64-debug-test-${{ matrix.test_crate }}-${{ github.sha }}'
test-libs-debug-linux-aarch64:
name: test libs debug linux-aarch64
needs:
- build-debug-linux-aarch64
runs-on: ubuntu-24.04-arm
timeout-minutes: 30
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
fetch-depth: 5
submodules: false
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-linux-aarch64-test-libs-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-linux-aarch64-debug-test-libs-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'')'
- name: Download artifact debug-linux-aarch64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
name: debug-linux-aarch64-deno
path: target/debug
- name: Set target/debug/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'')'
run: chmod +x target/debug/deno
- name: Download artifact debug-linux-aarch64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
name: debug-linux-aarch64-test-server
path: target/debug
- name: Set target/debug/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'')'
run: chmod +x target/debug/test_server
- name: Test libs
if: '!startsWith(github.ref, ''refs/tags/'')'
env:
CARGO_PROFILE_DEV_DEBUG: 0
run: cargo test --locked --lib -p deno -p denort -p node_shim -p deno_lib -p deno_snapshots -p deno_bundle_runtime -p deno_cache -p deno_cron -p deno_crypto -p deno_fetch -p deno_ffi -p deno_fs -p deno_http -p deno_image -p deno_io -p deno_kv -p deno_napi -p napi_sym -p deno_net -p deno_node -p deno_node_crypto -p deno_node_sqlite -p denort_helper -p deno_signals -p deno_telemetry -p deno_url -p deno_web -p deno_webgpu -p deno_webidl -p deno_websocket -p deno_webstorage -p deno_cache_dir -p deno_config -p deno_crypto_provider -p deno_dotenv -p eszip -p deno_inspector_server -p deno_lockfile -p deno_maybe_sync -p napi_sys -p node_resolver -p deno_npm -p deno_npm_cache -p deno_npm_installer -p deno_package_json -p deno_resolver -p deno_typescript_go_client_rust -p deno_runtime -p deno_features -p deno_permissions -p deno_subprocess_windows
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-aarch64-test-libs-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-aarch64-debug-test-libs-${{ github.sha }}'
build-release-linux-aarch64:
name: build release linux-aarch64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''ubuntu-24.04-arm'' }}'
environment:
name: '${{ (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/'')) && ''build'' || '''' }}'
timeout-minutes: 240
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-linux-aarch64-build-main-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-linux-aarch64-release-build-main-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
- name: Set up incremental LTO and sysroot build
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
# Remove older clang before we install
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'clang-19*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'llvm-17*' 'llvm-18*' 'llvm-19*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' 'lld-19*' > /dev/null 2> /dev/null
# Install clang-XXX, lld-XXX, and debootstrap.
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-noble-21.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21 || (echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21)
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
clang-21 -c -o /tmp/memfd_create_shim.o tools/memfd_create_shim.c -fPIC
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20250207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
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
cd
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
# 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 "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-21
CFLAGS=$CFLAGS
" > $GITHUB_ENV
- name: Configure canary build
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && !startsWith(github.ref, ''refs/tags/'')'
run: echo "DENO_CANARY=true" >> $GITHUB_ENV
- name: Build release
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
df -h
cargo build --release --locked --bin deno --bin denort --bin test_server --features=panic-trace
df -h
- name: Generate symcache
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
env:
NO_COLOR: 1
run: |-
target/release/deno -A tools/release/create_symcache.ts ./deno.symcache
du -h deno.symcache
du -h target/release/deno
- name: Pre-release (linux)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'''
run: |-
cd target/release
./deno -A ../../tools/release/create_symcache.ts deno-aarch64-unknown-linux-gnu.symcache
strip ./deno
zip -r deno-aarch64-unknown-linux-gnu.zip deno
shasum -a 256 deno-aarch64-unknown-linux-gnu.zip > deno-aarch64-unknown-linux-gnu.zip.sha256sum
strip ./denort
zip -r denort-aarch64-unknown-linux-gnu.zip denort
shasum -a 256 denort-aarch64-unknown-linux-gnu.zip > denort-aarch64-unknown-linux-gnu.zip.sha256sum
./deno types > lib.deno.d.ts
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Setup gcloud (unix)
uses: google-github-actions/setup-gcloud@v3
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
with:
project_id: denoland
- name: Log versions
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: |-
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'
- name: Upload canary to dl.deno.land
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && github.ref == ''refs/heads/main'''
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
run: |-
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.zip gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.sha256sum gs://dl.deno.land/canary/$(git rev-parse HEAD)/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/canary/$(git rev-parse HEAD)/
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/canary/$(git rev-parse HEAD)/ --exclude "*" --include "*.symcache"
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
aws s3 cp canary-latest.txt s3://dl-deno-land/canary-$(rustc -vV | sed -n "s|host: ||p")-latest.txt
rm canary-latest.txt gha-creds-*.json
- name: Build product size info
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))'
run: |-
du -hd1 "./target/release"
du -ha "./target/release/deno"
du -ha "./target/release/denort"
- name: Check deno binary
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
env:
NO_COLOR: 1
run: target/release/deno eval "console.log(1+2)" | grep 3
- name: Check deno binary (in sysroot)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
run: sudo chroot /sysroot "$(pwd)/target/release/deno" --version
- name: Upload artifact release-linux-aarch64-deno
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-linux-aarch64-deno
path: target/release/deno
retention-days: 3
- name: Upload artifact release-linux-aarch64-denort
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-linux-aarch64-denort
path: target/release/denort
retention-days: 3
- name: Upload artifact release-linux-aarch64-test-server
uses: actions/upload-artifact@v6
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'')'
with:
name: release-linux-aarch64-test-server
path: target/release/test_server
retention-days: 3
- name: Upload release to dl.deno.land (unix)
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
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/*/}/
gsutil -h "Cache-Control: public, max-age=3600" cp ./target/release/*.symcache gs://dl.deno.land/release/${GITHUB_REF#refs/*/}/
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.zip"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.sha256sum"
aws s3 sync ./target/release/ s3://dl-deno-land/release/${GITHUB_REF#refs/*/}/ --exclude "*" --include "*.symcache"
- name: Create release notes
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
run: |-
export PATH=$PATH:$(pwd)/target/release
./tools/release/05_create_release_notes.ts
- name: Upload release to GitHub
uses: softprops/action-gh-release@v2
if: '!(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.repository == ''denoland/deno'' && startsWith(github.ref, ''refs/tags/'')'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
files: |-
target/release/deno-x86_64-pc-windows-msvc.zip
target/release/deno-x86_64-pc-windows-msvc.zip.sha256sum
target/release/denort-x86_64-pc-windows-msvc.zip
target/release/denort-x86_64-pc-windows-msvc.zip.sha256sum
target/release/deno-aarch64-pc-windows-msvc.zip
target/release/deno-aarch64-pc-windows-msvc.zip.sha256sum
target/release/denort-aarch64-pc-windows-msvc.zip
target/release/denort-aarch64-pc-windows-msvc.zip.sha256sum
target/release/deno-x86_64-unknown-linux-gnu.zip
target/release/deno-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/denort-x86_64-unknown-linux-gnu.zip
target/release/denort-x86_64-unknown-linux-gnu.zip.sha256sum
target/release/deno-x86_64-apple-darwin.zip
target/release/deno-x86_64-apple-darwin.zip.sha256sum
target/release/denort-x86_64-apple-darwin.zip
target/release/denort-x86_64-apple-darwin.zip.sha256sum
target/release/deno-aarch64-unknown-linux-gnu.zip
target/release/deno-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/denort-aarch64-unknown-linux-gnu.zip
target/release/denort-aarch64-unknown-linux-gnu.zip.sha256sum
target/release/deno-aarch64-apple-darwin.zip
target/release/deno-aarch64-apple-darwin.zip.sha256sum
target/release/denort-aarch64-apple-darwin.zip
target/release/denort-aarch64-apple-darwin.zip.sha256sum
target/release/deno_src.tar.gz
target/release/lib.deno.d.ts
body_path: target/release/release-notes.md
draft: true
test-release-linux-aarch64:
name: 'test ${{ matrix.test_crate }} ${{ matrix.shard_label }}release linux-aarch64'
needs:
- build-release-linux-aarch64
runs-on: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'' && ''ubuntu-24.04'' || ''ubuntu-24.04-arm'' }}'
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- test_crate: integration
test_package: integration_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: integration
test_package: integration_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: node_compat
test_package: node_compat_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: specs
test_package: specs_tests
shard_index: '0'
shard_total: '2'
shard_label: '(1/2) '
- test_crate: specs
test_package: specs_tests
shard_index: '1'
shard_total: '2'
shard_label: '(2/2) '
- test_crate: unit
test_package: unit_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
- test_crate: unit_node
test_package: unit_node_tests
shard_index: '0'
shard_total: '1'
shard_label: ''
fail-fast: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/node_compat/runner/suite
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''node_compat'''
run: git submodule update --init --recursive --depth=1 -- ./tests/node_compat/runner/suite
- name: Clone submodule ./tests/util/std
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-linux-aarch64-test-${{ matrix.test_crate }}-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-linux-aarch64-release-test-${{ matrix.test_crate }}-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
cache-path: ./target
- name: Install Node
uses: actions/setup-node@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
node-version: 22
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
- name: Set up incremental LTO and sysroot build
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: |-
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
# Remove older clang before we install
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'clang-19*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'llvm-17*' 'llvm-18*' 'llvm-19*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' 'lld-19*' > /dev/null 2> /dev/null
# Install clang-XXX, lld-XXX, and debootstrap.
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-noble-21.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21 || (echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21)
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
clang-21 -c -o /tmp/memfd_create_shim.o tools/memfd_create_shim.c -fPIC
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20250207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
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
cd
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
# 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 "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-21
CFLAGS=$CFLAGS
" > $GITHUB_ENV
- name: Download artifact release-linux-aarch64-deno
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
name: release-linux-aarch64-deno
path: target/release
- name: Set target/release/deno permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: chmod +x target/release/deno
- name: Download artifact release-linux-aarch64-denort
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
with:
name: release-linux-aarch64-denort
path: target/release
- name: Set target/release/denort permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'')'
run: chmod +x target/release/denort
- name: Download artifact release-linux-aarch64-test-server
uses: actions/download-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
with:
name: release-linux-aarch64-test-server
path: target/release
- name: Set target/release/test_server permissions
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && (matrix.test_crate == ''integration'' || matrix.test_crate == ''specs'' || matrix.test_crate == ''unit'' || matrix.test_crate == ''unit_node'')'
run: chmod +x target/release/test_server
- name: Set up playwright cache
uses: actions/cache@v5
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
with:
path: ./.ms-playwright
key: 'playwright-${{ runner.os }}-${{ runner.arch }}'
- name: Load 'vsock_loopback; kernel module
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
run: sudo modprobe vsock_loopback
- name: Build ffi (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && matrix.test_crate == ''specs'''
run: cargo build --release -p test_ffi
- name: Test (release)
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'')'
env:
CI_SHARD_INDEX: '${{ github.event_name == ''pull_request'' && matrix.shard_index || '''' }}'
CI_SHARD_TOTAL: '${{ github.event_name == ''pull_request'' && matrix.shard_total || '''' }}'
run: 'cargo test -p ${{ matrix.test_package }} --test ${{ matrix.test_crate }} --release'
- name: Ensure no git changes
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && github.event_name == ''pull_request'''
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
- name: Upload test results
uses: actions/upload-artifact@v6
if: '!startsWith(github.ref, ''refs/tags/'') && !(!contains(github.event.pull_request.labels.*.name, ''ci-full'') && github.event_name == ''pull_request'') && (matrix.shard_index == 0 || github.event_name == ''pull_request'') && always()'
with:
name: 'test-results-linux-aarch64-release-${{ matrix.test_crate }}${{ matrix.shard_total > 1 && format(''-shard-{0}'', matrix.shard_index) || '''' }}.json'
path: 'target/test_results_${{ matrix.test_crate }}.json'
lint:
name: 'lint ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }}'
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: '${{ matrix.runner }}'
timeout-minutes: 30
defaults:
run:
shell: bash
strategy:
matrix:
include:
- os: linux
arch: x86_64
runner: ubuntu-24.04
profile: debug
job: lint
- os: macos
arch: x86_64
runner: macos-15-intel
profile: debug
job: lint
- os: windows
arch: x86_64
runner: windows-2022
profile: debug
job: lint
steps:
- name: Configure git
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
with:
fetch-depth: 5
submodules: false
- name: Clone submodule ./tests/util/std
run: git submodule update --init --recursive --depth=1 -- ./tests/util/std
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: '102-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-lint-'
- name: Restore cache build output
uses: actions/cache/restore@v4
if: 'github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '102-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-lint-'
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
- name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: test_format.js
if: matrix.os == 'linux'
run: deno run --allow-write --allow-read --allow-run --allow-net ./tools/format.js --check
- name: jsdoc_checker.js
if: matrix.os == 'linux'
run: deno run --allow-read --allow-env --allow-sys ./tools/jsdoc_checker.js
- name: lint.js
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: deno run --allow-write --allow-read --allow-run --allow-net --allow-env ./tools/lint.js
- name: Cache cargo home
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-lint-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: 'github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-lint-${{ github.sha }}'
deno-core-test:
name: deno_core test linux-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true' && needs.pre_build.outputs.skip_deno_core_test != 'true'
runs-on: ubuntu-24.04
timeout-minutes: 60
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
fetch-depth: 5
submodules: false
- name: Restore cache cargo home
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: never_saved
restore-keys: 102-cargo-home-linux-x86_64-deno-core-test-
- name: Restore cache build output
uses: actions/cache/restore@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref != ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: 102-cargo-target-linux-x86_64-release-deno-core-test-
- name: Apply and update mtime cache
uses: ./.github/mtime_cache
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
cache-path: ./target
- uses: dsherret/rust-toolchain-file@v1
if: '!startsWith(github.ref, ''refs/tags/'')'
- name: Install Deno
uses: denoland/setup-deno@v2
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
deno-version: v2.x
- name: Set up incremental LTO and sysroot build
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
# Setting up sysroot
export DEBIAN_FRONTEND=noninteractive
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
# Remove older clang before we install
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'clang-19*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'llvm-17*' 'llvm-18*' 'llvm-19*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' 'lld-19*' > /dev/null 2> /dev/null
# Install clang-XXX, lld-XXX, and debootstrap.
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-noble-21.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21 || (echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-21 lld-21 clang-tools-21 clang-format-21 clang-tidy-21)
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
clang-21 -c -o /tmp/memfd_create_shim.o tools/memfd_create_shim.c -fPIC
echo "Decompressing sysroot..."
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20250207/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
cd /
xzcat /tmp/sysroot.tar.xz | sudo tar -x
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
cd
echo "Done."
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
# 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 "
CARGO_PROFILE_BENCH_INCREMENTAL=false
CARGO_PROFILE_RELEASE_INCREMENTAL=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-21
-C link-arg=-fuse-ld=lld-21
-C link-arg=-ldl
-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
-C link-arg=/tmp/memfd_create_shim.o
--cfg tokio_unstable
$RUSTFLAGS
__1
CC=/usr/bin/clang-21
CFLAGS=$CFLAGS
" > $GITHUB_ENV
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
if: '!startsWith(github.ref, ''refs/tags/'')'
- name: Install nextest
if: '!startsWith(github.ref, ''refs/tags/'')'
run: cargo binstall cargo-nextest --secure --locked
- name: Cargo nextest (release)
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
cargo nextest run --release \
--features "deno_core/default deno_core/include_js_files_for_snapshotting deno_core/unsafe_use_unprotected_platform" \
--tests --examples \
-p deno_core -p build-your-own-js-snapshot -p dcore -p deno_ops -p deno_ops_compile_test_runner -p serde_v8 -p deno_core_testing
- name: Cargo nextest ops compile test runner (release)
if: '!startsWith(github.ref, ''refs/tags/'')'
run: cargo nextest run --release -p deno_ops_compile_test_runner
- name: Cargo doc test
if: '!startsWith(github.ref, ''refs/tags/'')'
run: cargo test --doc --release -p deno_core -p build-your-own-js-snapshot -p deno_ops -p serde_v8 -p deno_core_testing
- name: Run examples (regression tests)
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
cargo run -p deno_core --example op2
cargo run -p deno_core --example op2 --features include_js_files_for_snapshotting
- name: Cache cargo home
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '102-cargo-home-linux-x86_64-deno-core-test-${{ github.sha }}'
- name: Cache build output
uses: actions/cache/save@v4
if: '!startsWith(github.ref, ''refs/tags/'') && github.ref == ''refs/heads/main'''
with:
path: |-
./target
!./target/*/gn_out
!./target/*/gn_root
!./target/*/*.zip
!./target/*/*.tar.gz
key: '102-cargo-target-linux-x86_64-release-deno-core-test-${{ github.sha }}'
deno-core-miri:
name: deno_core miri linux-x86_64
needs:
- pre_build
if: needs.pre_build.outputs.skip_build != 'true'
runs-on: ubuntu-24.04
timeout-minutes: 60
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUST_LIB_BACKTRACE: 0
steps:
- name: Configure git
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
git config --global core.symlinks true
git config --global fetch.parallel 32
- name: Clone repository
uses: actions/checkout@v6
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
fetch-depth: 5
submodules: false
- name: Install Rust (nightly)
uses: dtolnay/rust-toolchain@master
if: '!startsWith(github.ref, ''refs/tags/'')'
with:
toolchain: nightly-2025-11-12
- name: Cargo test (miri)
if: '!startsWith(github.ref, ''refs/tags/'')'
run: |-
cargo clean
rustup component add --toolchain nightly-2025-11-12 miri
# This somehow prints errors in CI that don't show up locally
RUSTFLAGS=-Awarnings cargo +nightly-2025-11-12 miri test -p deno_core
ci-status:
name: ci status
needs:
- bench
- build-debug-macos-x86_64
- test-debug-macos-x86_64
- build-release-macos-x86_64
- test-release-macos-x86_64
- build-debug-macos-aarch64
- test-debug-macos-aarch64
- test-libs-debug-macos-aarch64
- build-release-macos-aarch64
- test-release-macos-aarch64
- build-debug-windows-x86_64
- test-debug-windows-x86_64
- test-libs-debug-windows-x86_64
- build-release-windows-x86_64
- test-release-windows-x86_64
- build-debug-windows-aarch64
- test-debug-windows-aarch64
- build-release-windows-aarch64
- test-release-windows-aarch64
- build-release-linux-x86_64
- test-release-linux-x86_64
- wpt-release-linux-x86_64
- build-debug-linux-x86_64
- test-debug-linux-x86_64
- build-libs-debug-linux-x86_64
- build-debug-linux-aarch64
- test-debug-linux-aarch64
- test-libs-debug-linux-aarch64
- build-release-linux-aarch64
- test-release-linux-aarch64
- lint
- deno-core-test
- deno-core-miri
- pre_build
if: needs.pre_build.outputs.skip_build != 'true' && always()
runs-on: ubuntu-latest
steps:
- name: Ensure CI success
run: |-
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo 'CI failed'
exit 1
fi
publish-canary:
name: publish canary
needs:
- build-debug-macos-x86_64
- build-release-macos-x86_64
- build-debug-macos-aarch64
- build-release-macos-aarch64
- build-debug-windows-x86_64
- build-release-windows-x86_64
- build-debug-windows-aarch64
- build-release-windows-aarch64
- build-release-linux-x86_64
- build-debug-linux-x86_64
- build-debug-linux-aarch64
- build-release-linux-aarch64
if: github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'
runs-on: ubuntu-24.04
steps:
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v3
with:
project_id: denoland
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
create_credentials_file: true
- name: Setup gcloud (unix)
uses: google-github-actions/setup-gcloud@v3
with:
project_id: denoland
- name: Upload canary version file to dl.deno.land
env:
AWS_ACCESS_KEY_ID: '${{ vars.S3_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.S3_SECRET_ACCESS_KEY }}'
AWS_ENDPOINT_URL_S3: '${{ vars.S3_ENDPOINT }}'
AWS_DEFAULT_REGION: '${{ vars.S3_REGION }}'
run: |-
echo ${{ github.sha }} > canary-latest.txt
gsutil -h "Cache-Control: no-cache" cp canary-latest.txt gs://dl.deno.land/canary-latest.txt
aws s3 cp canary-latest.txt s3://dl-deno-land/canary-latest.txt