-
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
3 changed files
with
55 additions
and
59 deletions.
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 |
---|---|---|
|
@@ -9,53 +9,52 @@ jobs: | |
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^] 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^] 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^] 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^] 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 | ||
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 | ||
|
@@ -72,13 +71,9 @@ jobs: | |
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 | ||
- name: Install rust target | ||
uses: dtolnay/rust-toolchain@stable | ||
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 }} | ||
with: | ||
toolchain: stable | ||
targets: ${{ matrix.settings.target }} | ||
# Use the v1 of this action | ||
- uses: mbround18/setup-osxcross@v1 | ||
if: ${{ matrix.settings.osxcross }} | ||
|
@@ -97,7 +92,7 @@ jobs: | |
- name: Default Build | ||
if: ${{ !matrix.settings.docker && !matrix.settings.build }} | ||
run: >- | ||
pnpm --filter [HEAD^] build --abi ${{ matrix.settings.abi }} ${{ matrix.settings.target && format('--target {0}', matrix.settings.target) || '' }} ${{ matrix.settings.zig && '--zig' || '' }} | ||
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 }} | ||
|
@@ -107,4 +102,4 @@ jobs: | |
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.sha }}-${{ matrix.settings.abi }}-plugin | ||
path: pnpm/${{ matrix.settings.abi }}/index.farm | ||
path: packages/**/npm/${{ matrix.settings.abi }}/index.farm |
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
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"name": "farm-plugins", | ||
"version": "1.0.0", | ||
"description": "The collections of farm plugins", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
|