Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bun-release): support windows in npm package #9873

Merged
merged 8 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/bun-release-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow tests bun-release's code and the packages to ensure that npm,
# yarn, and pnpm can install bun on all platforms. This does not test that bun
# itself works as it hardcodes 1.1.0 as the version to package.
name: bun-release-test
concurrency: release-test

on:
pull_request:
paths:
- "packages/bun-release/**"
- ".github/workflows/bun-release-test.yml"

jobs:
test-release-script:
name: Test Release Script
strategy:
matrix:
machine: [namespace-profile-bun-linux-x64, linux-arm64, macos-arm64, macos-12-large, windows-latest]
fail-fast: false
runs-on: ${{ matrix.machine }}
permissions:
contents: read
defaults:
run:
working-directory: packages/bun-release
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: "1.1.0"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: bun install && npm i -g pnpm yarn npm

- name: Release
run: bun upload-npm -- 1.1.0 test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ txt.js
x64
yarn.lock
zig-cache
zig-out
zig-out
14 changes: 8 additions & 6 deletions packages/bun-release/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.DS_Store
.env
node_modules
/npm/**/bin
/npm/**/*.js
/npm/**/.npmrc
.DS_Store
.env
node_modules
/npm/**/bin
/npm/**/*.js
/npm/**/package.json
/npm/**/.npmrc
*.tgz
Binary file modified packages/bun-release/bun.lockb
Binary file not shown.
16 changes: 0 additions & 16 deletions packages/bun-release/npm/@oven/bun-darwin-aarch64/package.json

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions packages/bun-release/npm/@oven/bun-darwin-x64/package.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/bun-release/npm/@oven/bun-linux-aarch64/package.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/bun-release/npm/@oven/bun-linux-x64-baseline/package.json

This file was deleted.

16 changes: 0 additions & 16 deletions packages/bun-release/npm/@oven/bun-linux-x64/package.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Bun

This is the Windows x64 binary for Bun, a fast all-in-one JavaScript runtime. https://bun.sh

_Note: "Baseline" builds are for machines that do not support [AVX2](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) instructions._
3 changes: 3 additions & 0 deletions packages/bun-release/npm/@oven/bun-windows-x64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Bun

This is the Windows x64 binary for Bun, a fast all-in-one JavaScript runtime. https://bun.sh
42 changes: 0 additions & 42 deletions packages/bun-release/npm/bun/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/bun-release/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"devDependencies": {
"@octokit/types": "^8.1.1",
"bun-types": "^0.4.0",
"bun-types": "^1.1.0",
"prettier": "^2.8.2"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/bun-release/scripts/npm-exec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { importBun } from "../src/npm/install";
import { importBun, optimizeBun } from "../src/npm/install";
import { execFileSync } from "child_process";

importBun()
Expand Down
Loading
Loading