Unverified Commit 20da8079 authored by Maia Teegarden's avatar Maia Teegarden Committed by GitHub

Chore/publish all swc (#30289)

* Publish more swc targets

* Remove prebuilt binaries

* Use correct path for caching

* Build next-swc binaries

* Remove unused job dependency
parent f6c58cb8
...@@ -53,7 +53,7 @@ jobs: ...@@ -53,7 +53,7 @@ jobs:
id: binary-cache id: binary-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: packages/next/native/** path: packages/next/native/next-swc.${{ matrix.name }}.node
key: next-swc-nightly-2021-08-12-${{ matrix.target }}-${{ hashFiles('.github/workflows/build_native.yml', 'packages/next/build/swc/**') }} key: next-swc-nightly-2021-08-12-${{ matrix.target }}-${{ hashFiles('.github/workflows/build_native.yml', 'packages/next/build/swc/**') }}
- name: Cross build aarch64 setup - name: Cross build aarch64 setup
if: ${{ matrix.target == 'aarch64-apple-darwin' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} if: ${{ matrix.target == 'aarch64-apple-darwin' && steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
...@@ -90,334 +90,9 @@ jobs: ...@@ -90,334 +90,9 @@ jobs:
cargo install cargo-cache --no-default-features --features ci-autoclean cargo install cargo-cache --no-default-features --features ci-autoclean
cargo-cache cargo-cache
build-windows-i686:
name: next-swc - windows-i686 - node@14
runs-on: windows-latest
env:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 32
CARGO_PROFILE_RELEASE_LTO: 'false'
steps:
- uses: actions/checkout@v2
- name: Install node x86
run: |
choco install nodejs-lts --x86 -y --force
refreshenv
- name: Set 32bit Node.js path
run: |
echo "C:\\Program Files (x86)\\nodejs" >> $GITHUB_PATH
shell: bash
- name: Node.js arch
run: node -e "console.log(process.arch)"
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-08-12
override: true
target: i686-pc-windows-msvc
- name: Build
shell: bash
run: yarn build-native --target i686-pc-windows-msvc
working-directory: packages/next
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
build-windows-aarch64:
name: next-swc - windows-aarch64 - node@14
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-08-12
override: true
target: aarch64-pc-windows-msvc
- name: Build
shell: bash
run: yarn build-native --target aarch64-pc-windows-msvc
working-directory: packages/next
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
build-linux-musl:
name: next-swc - linux-musl - node@lts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to registry
run: |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
env:
DOCKER_REGISTRY_URL: ghcr.io
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
- name: Cache
uses: actions/cache@v2
with:
path: |
target/
key: linux-musl-publish-integration
- name: Pull docker image
run: |
docker pull ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
docker tag ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine builder
- name: 'Build'
run: |
docker run --rm -v $(pwd)/packages/next:/swc -w /swc builder sh -c "yarn build-native"
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
build-linux-aarch64:
name: next-swc - aarch64-unknown-linux-gnu - node@14
runs-on: ubuntu-18.04
steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-08-12
override: true
target: aarch64-unknown-linux-gnu
- name: Cache
uses: actions/cache@v2
with:
path: |
target/
key: aarch64-linux-gnu-publish-integration
- name: Install cross compile toolchain
run: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
- name: Cross build aarch64
run: yarn build-native --target aarch64-unknown-linux-gnu
working-directory: packages/next
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
build-linux-aarch64-musl:
name: next-swc - aarch64-unknown-linux-musl - node@14
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-08-12
override: true
target: aarch64-unknown-linux-musl
- name: Cache
uses: actions/cache@v2
with:
path: |
target/
key: aarch64-linux-musl-publish-integration
- name: Install cross compile toolchain
run: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu -y
- name: Cross build aarch64
run: yarn build-native --target aarch64-unknown-linux-musl
working-directory: packages/next
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
build-linux-arm7:
name: next-swc - arm7-unknown-linux-gnu - node@14
runs-on: ubuntu-18.04
steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-08-12
override: true
target: armv7-unknown-linux-gnueabihf
- name: Cache
uses: actions/cache@v2
with:
path: |
target/
key: arm7-linux-gnu-publish-integration
- name: Install cross compile toolchain
run: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
- name: Cross build aarch64
run: yarn build-native --target armv7-unknown-linux-gnueabihf
working-directory: packages/next
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
build-android-aarch64:
name: next-swc - Android - aarch64
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2021-08-12
override: true
target: aarch64-linux-android
- name: Build
shell: bash
run: |
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang"
yarn build-native --target aarch64-linux-android
working-directory: packages/next
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
build-freebsd:
runs-on: macos-10.15
name: next-swc - freebsd
steps:
- uses: actions/checkout@v2
- name: Build
id: build
uses: vmactions/freebsd-vm@v0.1.5
env:
DEBUG: 'napi:*'
RUSTUP_HOME: /usr/local/rustup
CARGO_HOME: /usr/local/cargo
RUSTUP_IO_THREADS: 1
with:
envs: 'DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS'
usesh: true
mem: 6000
prepare: |
pkg install -y curl node14
curl -qL https://www.npmjs.com/install.sh | sh
npm install -g yarn
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source /usr/local/cargo/env
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ yarn --version ~~~~"
yarn --version
run: |
export PATH="/usr/local/cargo/bin:$PATH"
pwd
ls -lah
whoami
env
freebsd-version
cargo build --release -p next-swc
yarn build-native
rm -rf node_modules
rm -rf target
working-directory: packages/next
- name: 'List files'
run: ls -la
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
path: packages/next/native/next-swc.*.node
commit: commit:
needs: needs:
- build-native - build-native
- build-windows-i686
- build-windows-aarch64
- build-linux-musl
- build-linux-arm7
- build-linux-aarch64
- build-android-aarch64
- build-freebsd
- build-linux-aarch64-musl
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
......
This diff is collapsed.
# `@next/swc-android-arm64`
This is the **android-arm64** binary for `@next/swc`
{
"name": "@next/swc-android-arm64",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.android-arm64.node",
"files": [
"next-swc.android-arm64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
# `@next/swc-linux-arm-gnueabihf`
This is the **linux-arm-gnueabihf** binary for `@next/swc`
{
"name": "@next/swc-linux-arm-gnueabihf",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.linux-arm-gnueabihf.node",
"files": [
"next-swc.linux-arm-gnueabihf.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
# `@next/swc-linux-arm64-gnu`
This is the **linux-arm64-gnu** binary for `@next/swc`
{
"name": "@next/swc-linux-arm64-gnu",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.linux-arm64-gnu.node",
"files": [
"next-swc.linux-arm64-gnu.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
# `@next/swc-linux-arm64-musl`
This is the **linux-arm64-musl** binary for `@next/swc`
{
"name": "@next/swc-linux-arm64-musl",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.linux-arm64-musl.node",
"files": [
"next-swc.linux-arm64-musl.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
# `@next/swc-linux-x64-musl`
This is the **linux-x64-musl** binary for `@next/swc`
{
"name": "@next/swc-linux-x64-musl",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.linux-x64-musl.node",
"files": [
"next-swc.linux-x64-musl.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
# `@next/swc-win32-arm64-msvc`
This is the **win32-arm64-msvc** binary for `@next/swc`
{
"name": "@next/swc-win32-arm64-msvc",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.win32-arm64-msvc.node",
"files": [
"next-swc.win32-arm64-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
# `@next/swc-win32-ia32-msvc`
This is the **win32-ia32-msvc** binary for `@next/swc`
{
"name": "@next/swc-win32-ia32-msvc",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.win32-ia32-msvc.node",
"files": [
"next-swc.win32-ia32-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment