Skip to content
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
54 changes: 31 additions & 23 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
APP_NAME: webview
MACOSX_DEPLOYMENT_TARGET: '10.13'
CARGO_INCREMENTAL: '1'
CARGO_TERM_COLOR: always
permissions:
contents: write
id-token: write
Expand Down Expand Up @@ -31,50 +32,50 @@ jobs:
settings:
- host: macos-latest
target: x86_64-apple-darwin
build: yarn build --target x86_64-apple-darwin
build: bun run build --target x86_64-apple-darwin
- host: windows-latest
build: yarn build --target x86_64-pc-windows-msvc
build: bun run build --target x86_64-pc-windows-msvc
target: x86_64-pc-windows-msvc
- host: windows-latest
build: yarn build --target i686-pc-windows-msvc
build: bun run build --target i686-pc-windows-msvc
target: i686-pc-windows-msvc
# - host: ubuntu-latest
# target: x86_64-unknown-linux-gnu
# docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
# setup: |
# sudo apt-get update
# sudo apt-get install pkg-config -y
# build: yarn build --target x86_64-unknown-linux-gnu
# build: bun run build --target x86_64-unknown-linux-gnu
# - host: ubuntu-latest
# target: x86_64-unknown-linux-musl
# docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
# setup: |
# sudo apt-get update
# sudo apt-get install pkg-config -y
# build: yarn build --target x86_64-unknown-linux-musl
# build: bun run build --target x86_64-unknown-linux-musl
- host: macos-latest
target: aarch64-apple-darwin
build: yarn build --target aarch64-apple-darwin
build: bun run build --target aarch64-apple-darwin
# - host: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
# setup: |
# sudo apt-get update
# sudo apt-get install pkg-config -y
# build: yarn build --target aarch64-unknown-linux-gnu
# build: bun run build --target aarch64-unknown-linux-gnu
# - host: ubuntu-latest
# target: armv7-unknown-linux-gnueabihf
# setup: |
# sudo apt-get update
# sudo apt-get install gcc-arm-linux-gnueabihf -y
# build: |
# yarn build --target armv7-unknown-linux-gnueabihf
# bun run build --target armv7-unknown-linux-gnueabihf
- host: ubuntu-latest
target: aarch64-linux-android
build: yarn build --target aarch64-linux-android
build: bun run build --target aarch64-linux-android
- host: ubuntu-latest
target: armv7-linux-androideabi
build: yarn build --target armv7-linux-androideabi
build: bun run build --target armv7-linux-androideabi
# - host: ubuntu-latest
# target: aarch64-unknown-linux-musl
# docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
Expand All @@ -84,20 +85,24 @@ jobs:
# build: |-
# set -e &&
# rustup target add aarch64-unknown-linux-musl &&
# yarn build --target aarch64-unknown-linux-musl
# bun run build --target aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
build: yarn build --target aarch64-pc-windows-msvc
build: bun run build --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v2
if: ${{ !matrix.settings.docker }}
with:
bun-version: latest
- name: Setup node
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
with:
node-version: 20
cache: yarn
- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
Expand All @@ -123,7 +128,7 @@ jobs:
if: ${{ matrix.settings.setup }}
shell: bash
- name: Install dependencies
run: yarn install
run: bun install
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
Expand Down Expand Up @@ -161,26 +166,26 @@ jobs:
# shell: bash
# run: |
# sudo pkg install -y -f curl node libnghttp2 npm pkg-config
# sudo npm install -g yarn --ignore-scripts
# sudo npm install -g bun --ignore-scripts
# curl https://sh.rustup.rs -sSf --output rustup.sh
# sh rustup.sh -y --profile minimal --default-toolchain beta
# source "$HOME/.cargo/env"
# echo "~~~~ rustc --version ~~~~"
# rustc --version
# echo "~~~~ node -v ~~~~"
# node -v
# echo "~~~~ yarn --version ~~~~"
# yarn --version
# echo "~~~~ bun --version ~~~~"
# bun --version
# pwd
# ls -lah
# whoami
# env
# freebsd-version
# yarn install
# yarn build
# bun install
# bun run build
# rm -rf node_modules
# rm -rf target
# rm -rf .yarn/cache
# rm -rf .bun/cache
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
Expand All @@ -195,19 +200,22 @@ jobs:
# - build-freebsd
steps:
- uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- name: Install dependencies
run: yarn install
run: bun install
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Move artifacts
run: yarn artifacts
run: bun run artifacts
- name: List packages
run: ls -R ./npm
shell: bash
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,40 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libglib2.0-dev pkg-config

- name: Install dependencies
run: yarn install
run: bun install

- name: ESLint
run: yarn lint
run: bun run lint

- name: Cargo fmt
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy
run: bun run clippy

- name: Cargo check
run: bun run check

- name: Run tests
run: bun run test
33 changes: 32 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,40 @@ Cargo.lock

*.node
.pnp.*

# Bun
bun.lockb

# Yarn (legacy)
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions

# Build artifacts
*.a
*.lib
*.o
*.obj
*.so
*.dylib
*.dll
*.exe

# Rust
.cargo-cache/
Cargo.lock

# NAPI
index.d.ts
npm/

# IDE
.idea/
*.swp
*.swo
*~
.DS_Store
bun.lock
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
bun run lint-staged
7 changes: 0 additions & 7 deletions .taplo.toml

This file was deleted.

Loading