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

add @replit/ruspty-darwin-arm64 #3

Closed
wants to merge 10 commits into from
Closed
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
76 changes: 12 additions & 64 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
build: |
bun run build
strip -x *.node
- host: macos-latest
target: aarch64-apple-darwin
build: |
bun run build
strip -x *.node
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
Expand All @@ -46,6 +51,8 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.0.30
- name: Setup node
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
Expand Down Expand Up @@ -88,85 +95,26 @@ jobs:
run: ${{ matrix.settings.build }}
if: ${{ !matrix.settings.docker }}
shell: bash
- name: Test
run: bun test
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bindings-${{ matrix.settings.target }}
path: ${{ env.APP_NAME }}.*.node
if-no-files-found: error

test-macos-binding:
name: Test on ${{ matrix.settings.target }}
needs:
- build
strategy:
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: bun install
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: bindings-${{ matrix.settings.target }}
path: .
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
run: bun test

test-linux-binding:
name: Test on ${{ matrix.settings.target }}
needs:
- build
strategy:
matrix:
settings:
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: bun install
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: bindings-${{ matrix.settings.target }}
path: .
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build oven/bun:1 bun test

publish:
name: Publish
runs-on: ubuntu-latest
needs:
- test-macos-binding
- test-linux-binding
- build
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.0.30
- name: Setup node
uses: actions/setup-node@v4
with:
Expand Down
Binary file modified bun.lockb
Binary file not shown.
19 changes: 13 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
/* auto-generated by NAPI-RS */

export interface Size {
cols: number
rows: number
cols: number;
rows: number;
}
export class Pty {
fd: number
pid: number
constructor(command: string, args: Array<string>, envs: Record<string, string>, dir: string, size: Size, onExit: (err: null | Error, exitCode: number) => void)
resize(size: Size): void
fd: number;
pid: number;
constructor(
command: string,
args: Array<string>,
envs: Record<string, string>,
dir: string,
size: Size,
onExit: (err: null | Error, exitCode: number) => void,
);
resize(size: Size): void;
}
3 changes: 3 additions & 0 deletions npm/darwin-arm64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@replit/ruspty-darwin-arm64`

This is the **aarch64-apple-darwin** binary for `@replit/ruspty`
18 changes: 18 additions & 0 deletions npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@replit/ruspty-darwin-arm64",
"version": "1.1.1",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "ruspty.darwin-arm64.node",
"files": [
"ruspty.darwin-arm64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"defaults": false,
"additional": [
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-unknown-linux-gnu"
]
}
Expand All @@ -42,6 +43,7 @@
},
"optionalDependencies": {
"@replit/ruspty-darwin-x64": "1.0.0-alpha.1",
"@replit/ruspty-darwin-arm64": "1.0.0-alpha.1",
"@replit/ruspty-linux-x64-gnu": "1.0.0-alpha.1"
}
}
Loading