Skip to content

Make overriding __esModule less observable #465

Make overriding __esModule less observable

Make overriding __esModule less observable #465

Workflow file for this run

name: CI
env:
LLVM_VERSION: 18
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
llvm_version:
description: "LLVM version"
default: "18"
jobs:
macos:
name: macOS
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
strategy:
matrix:
include:
- runner: macos-13-large
cpp_flags: "-D_LIBCXX_ENABLE_ASSERTIONS=1"
cpu: haswell
label: bun-webkit-macos-amd64-debug
brew_prefix: /usr/local/opt
package_json_arch: "x64"
CMAKE_BUILD_TYPE: Debug
- runner: macos-13-xlarge
cpp_flags: "-D_LIBCXX_ENABLE_ASSERTIONS=1"
cpu: native
label: bun-webkit-macos-arm64-debug
brew_prefix: /opt/homebrew/opt
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: Debug
# We aren't doing LTO on macOS, for now.
# - runner: macos-13-large
# cpp_flags: -flto=full -fwhole-program-vtables -fforce-emit-vtables -D_LIBCXX_ENABLE_ASSERTIONS=0
# cpu: haswell
# label: bun-webkit-macos-amd64-lto
# brew_prefix: /usr/local/opt
# package_json_arch: "x64"
# CMAKE_BUILD_TYPE: Release
- runner: macos-13-large
cpp_flags: ""
cpu: haswell
label: bun-webkit-macos-amd64
brew_prefix: /usr/local/opt
package_json_arch: "x64"
CMAKE_BUILD_TYPE: Release
# We aren't doing LTO on macOS, for now.
# - runner: macos-13-xlarge
# cpp_flags: -flto=full -fwhole-program-vtables -fforce-emit-vtables -D_LIBCXX_ENABLE_ASSERTIONS=0
# cpu: native
# label: bun-webkit-macos-arm64-lto
# brew_prefix: /opt/homebrew/opt
# package_json_arch: "arm64"
# CMAKE_BUILD_TYPE: Release
- runner: macos-13-xlarge
cpp_flags: "-D_LIBCXX_ENABLE_ASSERTIONS=0"
cpu: native
label: bun-webkit-macos-arm64
brew_prefix: /opt/homebrew/opt
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: Release
steps:
- name: "Set LLVM version"
if: github.event == 'workflow_dispatch'
run: echo "LLVM_VERSION=${{inputs.llvm_version}}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
sparse-checkout-cone-mode: false
sparse-checkout: |
/*
!LayoutTests/
!JSTests/
- name: PATH
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_ANALYTICS_THIS_RUN: 1
run: |
echo "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin" >> $GITHUB_PATH
brew install llvm@${{env.LLVM_VERSION}} python icu4c ninja -f --overwrite
brew link llvm@${{env.LLVM_VERSION}} -f --overwrite
- name: Run
env:
ICU_INCLUDE_DIRS: ${{matrix.brew_prefix}}/icu4c/include
LDFLAGS: "${{env.LDFLAGS}} "
CC: "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin/clang"
CXX: "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin/clang++"
RANLIB: "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin/llvm-ranlib"
AR: "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin/llvm-ar"
CMAKE_C_COMPILER: "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin/clang"
CMAKE_CXX_COMPILER: "${{matrix.brew_prefix}}/llvm@${{env.LLVM_VERSION}}/bin/clang++"
CMAKE_C_FLAGS: " -fno-exceptions ${{matrix.cpp_flags}} -fvisibility=hidden -fvisibility-inlines-hidden -O3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -faddrsig "
CMAKE_CXX_FLAGS: " -fno-exceptions ${{matrix.cpp_flags}} -fvisibility=hidden -fvisibility-inlines-hidden -O3 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -faddrsig -fno-c++-static-destructors "
CMAKE_OSX_DEPLOYMENT_TARGET: "13.0"
CMAKE_BUILD_TYPE: ${{matrix.CMAKE_BUILD_TYPE}}
PACKAGE_JSON_ARCH: ${{matrix.package_json_arch}}
PACKAGE_JSON_LABEL: ${{matrix.label}}
run: GITHUB_REPOSITORY=$GITHUB_REPOSITORY bash mac-release.bash
- uses: actions/upload-artifact@v3
with:
name: ${{matrix.label}}
path: ${{runner.temp}}/bun-webkit.tar.gz
linux:
name: Linux
runs-on: ${{matrix.os}}
strategy:
matrix:
include:
- lto_flag: ""
label: bun-webkit-linux-amd64-debug
os: big-ubuntu
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Debug"
- lto_flag: ""
label: bun-webkit-linux-arm64-debug
os: linux-arm64-gh
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Debug"
- lto_flag: "-flto=full -fwhole-program-vtables -fforce-emit-vtables"
label: bun-webkit-linux-arm64-lto
os: linux-arm64-gh
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
- lto_flag: ""
label: bun-webkit-linux-arm64
os: linux-arm64-gh
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
- lto_flag: "-flto=full -fwhole-program-vtables -fforce-emit-vtables"
label: bun-webkit-linux-amd64-lto
os: big-ubuntu
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
- lto_flag: ""
label: bun-webkit-linux-amd64
os: big-ubuntu
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
with:
sparse-checkout-cone-mode: false
sparse-checkout: |
/*
!LayoutTests/
!JSTests/
- uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true
- name: Run
run: |
rm -rf ${{runner.temp}}/bun-webkit ${{runner.temp}}/bun-webkit.tar.gz
WEBKIT_RELEASE_TYPE=${{matrix.CMAKE_BUILD_TYPE}} CPU="native" cpu=native LTO_FLAG="${{matrix.lto_flag}}" temp=${{runner.temp}} bash release.sh
cd ${{runner.temp}}
echo "#define BUN_WEBKIT_VERSION \"${{github.sha}}\"" >> bun-webkit/include/cmakeconfig.h
echo '{ "name": "${{matrix.label}}", "version": "0.0.1-${{github.sha}}", "os": ["linux"], "cpu": ["${{matrix.package_json_arch}}"], "repository": "https://github.com/${{github.repository}}" }' > bun-webkit/package.json
rm -rf bun-webkit/lib/*.so
rm -rf bun-webkit/lib/*.so.*
tar -czf bun-webkit.tar.gz bun-webkit
rm -rf bun-webkit
- uses: actions/upload-artifact@v3
with:
name: ${{matrix.label}}
path: ${{runner.temp}}/bun-webkit.tar.gz
windows:
strategy:
matrix:
include:
- runner: windows
build-type: Release
arch: amd64
suffix: ""
- runner: windows
build-type: Debug
arch: amd64
suffix: -debug
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
steps:
- name: Install Scoop
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
- name: Install LLVM and Ninja
run: |
scoop install ninja
scoop install [email protected]
Join-Path (Resolve-Path ~).Path "scoop\apps\llvm\current\bin" >> $Env:GITHUB_PATH
- uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401
- uses: actions/checkout@v4
with:
sparse-checkout-cone-mode: false
sparse-checkout: |
/*
!LayoutTests/
!JSTests/
- name: Build WebKit
run: |
$env:Path = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\;" + $env:Path
$env:WEBKIT_OUTPUT_DIR = "bun-webkit"
$env:BUN_WEBKIT_VERSION = "${{ github.sha }}"
$env:CMAKE_BUILD_TYPE = "${{matrix.build-type}}"
./windows-release.ps1
- uses: actions/upload-artifact@v3
with:
name: bun-webkit-windows-${{ matrix.arch }}${{ matrix.suffix }}
path: bun-webkit.tar.gz
release:
name: release
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 90
needs:
- linux
- macos
- windows
steps:
- uses: actions/download-artifact@v3
with:
name: bun-webkit-linux-amd64
path: ${{runner.temp}}/bun-webkit-linux-amd64
- uses: actions/download-artifact@v3
with:
name: bun-webkit-linux-arm64
path: ${{runner.temp}}/bun-webkit-linux-arm64
- uses: actions/download-artifact@v3
with:
name: bun-webkit-linux-amd64-debug
path: ${{runner.temp}}/bun-webkit-linux-amd64-debug
- uses: actions/download-artifact@v3
with:
name: bun-webkit-linux-arm64-debug
path: ${{runner.temp}}/bun-webkit-linux-arm64-debug
- uses: actions/download-artifact@v3
with:
name: bun-webkit-macos-arm64
path: ${{runner.temp}}/bun-webkit-macos-arm64
- uses: actions/download-artifact@v3
with:
name: bun-webkit-macos-arm64-debug
path: ${{runner.temp}}/bun-webkit-macos-arm64-debug
- uses: actions/download-artifact@v3
with:
name: bun-webkit-macos-amd64-debug
path: ${{runner.temp}}/bun-webkit-macos-amd64-debug
- uses: actions/download-artifact@v3
with:
name: bun-webkit-macos-amd64
path: ${{runner.temp}}/bun-webkit-macos-amd64
- uses: actions/download-artifact@v3
with:
name: bun-webkit-linux-amd64-lto
path: ${{runner.temp}}/bun-webkit-linux-amd64-lto
- uses: actions/download-artifact@v3
with:
name: bun-webkit-linux-arm64-lto
path: ${{runner.temp}}/bun-webkit-linux-arm64-lto
- uses: actions/download-artifact@v3
with:
name: bun-webkit-windows-amd64
path: ${{runner.temp}}/bun-webkit-windows-amd64
- uses: actions/download-artifact@v3
with:
name: bun-webkit-windows-amd64-debug
path: ${{runner.temp}}/bun-webkit-windows-amd64-debug
- name: Rename files
run: |
mv ${{runner.temp}}/bun-webkit-linux-amd64/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-linux-amd64.tar.gz
mv ${{runner.temp}}/bun-webkit-linux-arm64/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-linux-arm64.tar.gz
mv ${{runner.temp}}/bun-webkit-macos-arm64/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-macos-arm64.tar.gz
mv ${{runner.temp}}/bun-webkit-macos-amd64/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-macos-amd64.tar.gz
mv ${{runner.temp}}/bun-webkit-linux-amd64-debug/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-linux-amd64-debug.tar.gz
mv ${{runner.temp}}/bun-webkit-linux-arm64-debug/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-linux-arm64-debug.tar.gz
mv ${{runner.temp}}/bun-webkit-macos-arm64-debug/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-macos-arm64-debug.tar.gz
mv ${{runner.temp}}/bun-webkit-macos-amd64-debug/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-macos-amd64-debug.tar.gz
mv ${{runner.temp}}/bun-webkit-linux-arm64-lto/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-linux-arm64-lto.tar.gz
mv ${{runner.temp}}/bun-webkit-linux-amd64-lto/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-linux-amd64-lto.tar.gz
mv ${{runner.temp}}/bun-webkit-windows-amd64/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-windows-amd64.tar.gz
mv ${{runner.temp}}/bun-webkit-windows-amd64-debug/bun-webkit.tar.gz ${{runner.temp}}/bun-webkit-windows-amd64-debug.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
id: release
with:
generate_release_notes: true
tag_name: "autobuild-${{github.sha}}"
files: |
${{runner.temp}}/bun-webkit-linux-amd64-debug.tar.gz
${{runner.temp}}/bun-webkit-linux-arm64-debug.tar.gz
${{runner.temp}}/bun-webkit-macos-arm64-debug.tar.gz
${{runner.temp}}/bun-webkit-macos-amd64-debug.tar.gz
${{runner.temp}}/bun-webkit-linux-amd64.tar.gz
${{runner.temp}}/bun-webkit-linux-arm64.tar.gz
${{runner.temp}}/bun-webkit-macos-arm64.tar.gz
${{runner.temp}}/bun-webkit-macos-amd64.tar.gz
${{runner.temp}}/bun-webkit-linux-amd64-lto.tar.gz
${{runner.temp}}/bun-webkit-linux-arm64-lto.tar.gz
${{runner.temp}}/bun-webkit-windows-amd64.tar.gz
${{runner.temp}}/bun-webkit-windows-amd64-debug.tar.gz