From a68eb3fcc3997fce8680f87edce46f6450e79635 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 13 Feb 2024 21:52:30 +0530 Subject: feat: denort binary for `deno compile` (#22205) This introduces the `denort` binary - a slim version of deno without tooling. The binary is used as the default for `deno compile`. Improves `deno compile` final size by ~2.5x (141 MB -> 61 MB) on Linux x86_64. --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to '.github/workflows/ci.yml') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79edd24c5..7342319c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -424,6 +424,7 @@ jobs: run: |- cd target/release zip -r deno-${{ matrix.arch }}-unknown-linux-gnu.zip deno + zip -r denort-${{ matrix.arch }}-unknown-linux-gnu.zip denort ./deno types > lib.deno.d.ts - name: Pre-release (mac) if: |- @@ -439,6 +440,7 @@ jobs: 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-${{ matrix.arch }}-apple-darwin.zip deno + zip -r denort-${{ matrix.arch }}-apple-darwin.zip denort - name: Pre-release (windows) if: |- !(matrix.skip) && (matrix.os == 'windows' && @@ -446,7 +448,9 @@ jobs: matrix.profile == 'release' && github.repository == 'denoland/deno') shell: pwsh - run: 'Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip' + run: |- + Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-${{ matrix.arch }}-pc-windows-msvc.zip + Compress-Archive -CompressionLevel Optimal -Force -Path target/release/denort.exe -DestinationPath target/release/denort-${{ matrix.arch }}-pc-windows-msvc.zip - name: Upload canary to dl.deno.land if: |- !(matrix.skip) && (matrix.job == 'test' && @@ -588,6 +592,7 @@ jobs: run: |- du -hd1 "./target/${{ matrix.profile }}" du -ha "./target/${{ matrix.profile }}/deno" + du -ha "./target/${{ matrix.profile }}/denort" - name: Worker info if: '!(matrix.skip) && (matrix.job == ''bench'')' run: |- @@ -632,10 +637,15 @@ jobs: with: files: |- target/release/deno-x86_64-pc-windows-msvc.zip + target/release/denort-x86_64-pc-windows-msvc.zip target/release/deno-x86_64-unknown-linux-gnu.zip + target/release/denort-x86_64-unknown-linux-gnu.zip target/release/deno-x86_64-apple-darwin.zip + target/release/denort-x86_64-apple-darwin.zip target/release/deno-aarch64-unknown-linux-gnu.zip + target/release/denort-aarch64-unknown-linux-gnu.zip target/release/deno-aarch64-apple-darwin.zip + target/release/denort-aarch64-apple-darwin.zip target/release/deno_src.tar.gz target/release/lib.deno.d.ts body_path: target/release/release-notes.md -- cgit v1.2.3