-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,133 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: E2E Tests | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
call-rust-build: | ||
uses: ./.github/workflows/plugin-build.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Lint Pr Title | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
lint-pr-title: | ||
name: Validating PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
# https://github.com/amannn/action-semantic-pull-request | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# Configure which types are allowed (newline-delimited). | ||
# Derived from https://github.com/commitizen/conventional-commit-types | ||
types: | | ||
fix | ||
feat | ||
docs | ||
style | ||
refactor | ||
perf | ||
test | ||
build | ||
ci | ||
chore | ||
revert | ||
release | ||
# Configure that a scope must always be provided. | ||
requireScope: false | ||
# Configure additional validation for the subject based on a regex. | ||
ignoreLabels: | | ||
bot |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Lint | ||
on: [pull_request] | ||
|
||
jobs: | ||
rust-lint: | ||
name: Rust Code Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Rust | ||
uses: oxidecomputer/actions-rs_toolchain@oxide/master | ||
- name: Cache rust artifacts | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: cargo-clippy | ||
|
||
- uses: arduino/setup-protoc@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run cargo fmt | ||
run: cargo fmt | ||
- name: Run cargo clippy | ||
run: cargo clippy |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: PR build plugins | ||
on: workflow_call | ||
|
||
jobs: | ||
build: | ||
name: Build and Upload Artifacts - ${{ matrix.settings.abi }} | ||
runs-on: ${{ matrix.settings.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
settings: | ||
- os: ubuntu-latest | ||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian | ||
abi: linux-x64-gnu | ||
build: >- | ||
git config --global --add safe.directory /build && | ||
set -e && | ||
unset CC_x86_64_unknown_linux_gnu && | ||
unset CC && | ||
pnpm --filter "[HEAD^]" --sequential build --target x86_64-unknown-linux-gnu --abi linux-x64-gnu | ||
- os: ubuntu-latest | ||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine | ||
abi: linux-x64-musl | ||
build: >- | ||
git config --global --add safe.directory /build && | ||
set -e && | ||
unset CC_x86_64_unknown_linux_musl && | ||
unset CC && | ||
pnpm --filter "[HEAD^]" --sequential build --target x86_64-unknown-linux-musl --abi linux-x64-musl | ||
- os: windows-latest | ||
abi: win32-x64-msvc | ||
- os: macos-latest | ||
abi: darwin-arm64 | ||
- os: macos-13 | ||
abi: darwin-x64 | ||
# cross compile | ||
# windows. Note swc plugins is not supported on ia32 and arm64 | ||
- os: windows-latest | ||
abi: win32-ia32-msvc | ||
target: i686-pc-windows-msvc | ||
build: | | ||
export CARGO_PROFILE_RELEASE_LTO=false | ||
cargo install cargo-xwin | ||
pnpm --filter "[HEAD^]" --sequential build --target i686-pc-windows-msvc --abi win32-ia32-msvc --cargo-flags="--no-default-features" | ||
- os: windows-latest | ||
abi: win32-arm64-msvc | ||
target: aarch64-pc-windows-msvc | ||
build: | | ||
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=256 | ||
export CARGO_PROFILE_RELEASE_LTO=false | ||
cargo install cargo-xwin | ||
pnpm --filter "[HEAD^]" --sequential build --target aarch64-pc-windows-msvc --abi win32-arm64-msvc --cargo-flags="--no-default-features" | ||
# linux | ||
- os: ubuntu-latest | ||
abi: linux-arm64-musl | ||
target: aarch64-unknown-linux-musl | ||
zig: true | ||
- os: ubuntu-latest | ||
abi: linux-arm64-gnu | ||
target: aarch64-unknown-linux-gnu | ||
zig: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Cache rust artifacts | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: rust-build-${{ matrix.settings.abi }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install Dependencies | ||
run: npm config set registry https://registry.npmmirror.com && npm install -g [email protected] && pnpm i --frozen-lockfile | ||
- run: rustup target add ${{ matrix.settings.target }} | ||
if: ${{ matrix.settings.target }} | ||
# Use the v1 of this action | ||
- uses: mbround18/setup-osxcross@v1 | ||
if: ${{ matrix.settings.osxcross }} | ||
# This builds executables & sets env variables for rust to consume. | ||
with: | ||
osx-version: '12.3' | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
if: ${{ matrix.settings.zig }} | ||
- name: Build in docker | ||
uses: addnab/docker-run-action@v3 | ||
if: ${{ matrix.settings.docker }} | ||
with: | ||
image: ${{ matrix.settings.docker }} | ||
options: -v ${{ env.HOME }}/.cargo/git:/root/.cargo/git -v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry -v ${{ github.workspace }}:/build -w /build | ||
run: ${{ matrix.settings.build }} | ||
- name: Default Build | ||
if: ${{ !matrix.settings.docker && !matrix.settings.build }} | ||
run: >- | ||
pnpm --filter "[HEAD^]" --sequential build --abi ${{ matrix.settings.abi }} ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} | ||
shell: bash | ||
- name: Build | ||
if: ${{ !matrix.settings.docker && matrix.settings.build }} | ||
run: ${{ matrix.settings.build }} | ||
shell: bash |
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
Oops, something went wrong.