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

Support windows ia32 arch #1367

Merged
merged 1 commit into from
Jan 29, 2021
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
52 changes: 50 additions & 2 deletions .github/workflows/publish-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,53 @@ jobs:
- name: Test bindings
run: npm test

build-windows-i686:
name: stable - 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 NodeJS path
run: |
echo "C:\\Program Files (x86)\\nodejs" >> $GITHUB_PATH
shell: bash

- name: NodeJS arch
run: node -e "console.log(process.arch)"

- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Install i686 toolchain
run: rustup target add i686-pc-windows-msvc

- name: Install node dependencies
run: npm i

- name: Build
shell: bash
run: yarn build --target i686-pc-windows-msvc

- name: Test bindings
run: npm test

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: bindings
path: swc.*.node

build-linux-musl:
name: stable - linux-musl - node@10
runs-on: ubuntu-latest
Expand Down Expand Up @@ -84,7 +131,7 @@ jobs:
path: swc.*.node

build-apple-silicon:
name: nightly - aarch64-apple-darwin - node@14
name: stable - aarch64-apple-darwin - node@14
runs-on: macos-latest

steps:
Expand All @@ -98,7 +145,7 @@ jobs:
- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: stable
profile: minimal
override: true

Expand Down Expand Up @@ -255,6 +302,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
- build-windows-i686
- build-linux-musl
- build-linux-arm7
- build-linux-aarch64
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"defaults": true,
"additional": [
"x86_64-unknown-linux-musl",
"i686-pc-windows-msvc",
"aarch64-unknown-linux-gnu",
"armv7-unknown-linux-gnueabihf",
"aarch64-apple-darwin",
Expand Down Expand Up @@ -62,7 +63,7 @@
"@babel/preset-env": "^7.2.3",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.1.0",
"@napi-rs/cli": "^1.0.0-alpha.11",
"@napi-rs/cli": "^1.0.2",
"@swc/helpers": "^0.2.2",
"@types/browserslist": "^4.4.0",
"@types/jest": "^25.2.3",
Expand All @@ -80,4 +81,4 @@
"type": "opencollective",
"url": "https://opencollective.com/swc"
}
}
}
2 changes: 1 addition & 1 deletion scripts/npm/android-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core-android-arm64",
"version": "1.2.40",
"version": "1.2.46",
"os": [
"android"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core-darwin-arm64",
"version": "1.2.40",
"version": "1.2.46",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core-darwin-x64",
"version": "1.2.40",
"version": "1.2.46",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/npm/linux-arm-gnueabihf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core-linux-arm-gnueabihf",
"version": "1.2.40",
"version": "1.2.46",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core-linux-arm64-gnu",
"version": "1.2.40",
"version": "1.2.46",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core-linux-x64-gnu",
"version": "1.2.40",
"version": "1.2.46",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core-linux-x64-musl",
"version": "1.2.40",
"version": "1.2.46",
"os": [
"linux"
],
Expand Down
3 changes: 3 additions & 0 deletions scripts/npm/win32-ia32-msvc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@swc/core-win32-ia32-msvc`

This is the **i686-pc-windows-msvc** binary for `@swc/core`
41 changes: 41 additions & 0 deletions scripts/npm/win32-ia32-msvc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "@swc/core-win32-ia32-msvc",
"version": "1.2.46",
"os": [
"win32"
],
"cpu": [
"ia32"
],
"main": "swc.win32-ia32-msvc.node",
"files": [
"swc.win32-ia32-msvc.node"
],
"description": "Super-fast alternative for babel",
"keywords": [
"swc",
"spack",
"babel",
"typescript",
"rust",
"webpack",
"tsc"
],
"author": "강동윤 <kdy1997.dev@gmail.com>",
"homepage": "https://swc.rs",
"license": "MIT",
"engines": {
"node": ">=10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/swc-project/swc.git"
},
"bugs": {
"url": "https://github.com/swc-project/swc/issues"
}
}
2 changes: 1 addition & 1 deletion scripts/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core-win32-x64-msvc",
"version": "1.2.40",
"version": "1.2.46",
"os": [
"win32"
],
Expand Down