[tls] add socket parameter, setServername and ALPNprotocols support #5111
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: bun-linux | |
concurrency: | |
group: bun-linux-build-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
TEST_TAG: bun-test' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "src/**/*" | |
- "test/**/*" | |
- "build.zig" | |
- "Makefile" | |
- "Dockerfile" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "src/**/*" | |
- "test/**/*" | |
- "build.zig" | |
- "Makefile" | |
- "Dockerfile" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
linux: | |
name: ${{matrix.tag}} | |
runs-on: ${{matrix.runner}} | |
if: github.repository_owner == 'oven-sh' | |
timeout-minutes: 90 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- cpu: haswell | |
tag: linux-x64 | |
arch: x86_64 | |
build_arch: amd64 | |
runner: big-ubuntu | |
webkit_url: "https://github.com/oven-sh/WebKit/releases/download/may20-3/bun-webkit-linux-amd64-lto.tar.gz" | |
webkit_basename: "bun-webkit-linux-amd64-lto" | |
build_machine_arch: x86_64 | |
- cpu: nehalem | |
tag: linux-x64-baseline | |
arch: x86_64 | |
build_arch: amd64 | |
runner: big-ubuntu | |
webkit_url: "https://github.com/oven-sh/WebKit/releases/download/may20-3/bun-webkit-linux-amd64-lto.tar.gz" | |
webkit_basename: "bun-webkit-linux-amd64-lto" | |
build_machine_arch: x86_64 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: docker/setup-buildx-action@v2 | |
id: buildx | |
with: | |
install: true | |
- name: Run | |
run: | | |
rm -rf ${{runner.temp}}/release | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
mkdir -p /tmp/.buildx-cache-${{matrix.tag}} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: false | |
cache-from: type=local,src=/tmp/.buildx-cache-${{matrix.tag}} | |
cache-to: type=local,dest=/tmp/.buildx-cache-${{matrix.tag}} | |
build-args: | | |
ARCH=${{matrix.arch}} | |
BUILDARCH=${{matrix.build_arch}} | |
BUILD_MACHINE_ARCH=${{matrix.build_machine_arch}} | |
CPU_TARGET=${{matrix.cpu}} | |
WEBKIT_URL=${{matrix.webkit_url}} | |
GIT_SHA=${{github.sha}} | |
WEBKIT_BASENAME=${{matrix.webkit_basename}} | |
platforms: linux/${{matrix.build_arch}} | |
target: artifact | |
outputs: type=local,dest=${{runner.temp}}/release | |
- name: Zip | |
run: | | |
# if zip is not found | |
if [ ! -x "$(command -v zip)" ]; then | |
sudo apt-get update && sudo apt-get install -y zip --no-install-recommends | |
fi | |
if [ ! -x "$(command -v strip)" ]; then | |
sudo apt-get update && sudo apt-get install -y binutils --no-install-recommends | |
fi | |
cd ${{runner.temp}}/release | |
chmod +x bun-profile bun | |
mkdir bun-${{matrix.tag}}-profile | |
mkdir bun-${{matrix.tag}} | |
strip bun | |
mv bun-profile bun-${{matrix.tag}}-profile/bun-profile | |
mv bun bun-${{matrix.tag}}/bun | |
zip -r bun-${{matrix.tag}}-profile.zip bun-${{matrix.tag}}-profile | |
zip -r bun-${{matrix.tag}}.zip bun-${{matrix.tag}} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: bun-${{matrix.tag}}-profile | |
path: ${{runner.temp}}/release/bun-${{matrix.tag}}-profile.zip | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: bun-${{matrix.tag}} | |
path: ${{runner.temp}}/release/bun-${{matrix.tag}}.zip | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: bun-obj-${{matrix.tag}} | |
path: ${{runner.temp}}/release/bun-obj | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.tag}}-dependencies | |
path: ${{runner.temp}}/release/bun-dependencies | |
- name: Release | |
id: release | |
uses: ncipollo/release-action@v1 | |
if: | | |
github.repository_owner == 'oven-sh' | |
&& github.ref == 'refs/heads/main' | |
with: | |
prerelease: true | |
body: "This canary release of Bun corresponds to the commit [${{ github.sha }}]" | |
allowUpdates: true | |
replacesArtifacts: true | |
generateReleaseNotes: true | |
artifactErrorsFailBuild: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: "Canary (${{github.sha}})" | |
tag: "canary" | |
artifacts: "${{runner.temp}}/release/bun-${{matrix.tag}}.zip,${{runner.temp}}/release/bun-${{matrix.tag}}-profile.zip" | |
linux-test: | |
name: Tests ${{matrix.tag}} | |
runs-on: ubuntu-latest | |
needs: [linux] | |
if: github.event_name == 'pull_request' | |
timeout-minutes: 20 | |
outputs: | |
failing_tests: ${{ steps.test.outputs.failing_tests }} | |
failing_tests_count: ${{ steps.test.outputs.failing_tests_count }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- tag: linux-x64 | |
- tag: linux-x64-baseline | |
steps: | |
- id: checkout | |
name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: false | |
- id: download | |
name: Download | |
uses: actions/download-artifact@v3 | |
with: | |
name: bun-${{matrix.tag}} | |
path: ${{runner.temp}}/release | |
- id: install | |
name: Install | |
run: | | |
cd ${{runner.temp}}/release | |
unzip bun-${{matrix.tag}}.zip | |
cd bun-${{matrix.tag}} | |
chmod +x bun | |
pwd >> $GITHUB_PATH | |
./bun --version | |
- id: test | |
name: Test (node runner) | |
# if: ${{github.event.inputs.use_bun == 'false'}} | |
run: | | |
bun install | |
bun install --cwd test | |
bun install --cwd packages/bun-internal-test | |
node packages/bun-internal-test/src/runner.node.mjs || true | |
- name: Comment on PR | |
if: steps.test.outputs.failing_tests != '' && github.event_name == 'pull_request' | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
comment_tag: test-failures-${{matrix.tag}} | |
message: | | |
❌ @${{ github.actor }} ${{ steps.test.outputs.failing_tests_count }} files with test failures on ${{ matrix.tag }}: | |
${{ steps.test.outputs.failing_tests }} | |
**[View test output](https://github.com/oven-sh/bun/actions/runs/${{github.run_id}})** | |
<sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup> | |
- name: Uncomment on PR | |
if: steps.test.outputs.failing_tests == '' && github.event_name == 'pull_request' | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
comment_tag: test-failures-${{matrix.tag}} | |
mode: upsert | |
create_if_not_exists: false | |
message: | | |
✅ test failures on ${{ matrix.tag }} have been resolved. | |
<sup>[#${{github.sha}}](https://github.com/oven-sh/bun/commits/${{github.sha}})</sup> | |
- id: fail | |
name: Fail the build | |
if: steps.test.outputs.failing_tests != '' | |
run: exit 1 |