@@ -929,7 +929,7 @@ jobs:
929929 - build
930930 - build-wasm
931931 - build-native
932- - build-native-freebsd
932+ # - build-native-freebsd
933933 env :
934934 NPM_TOKEN : ${{ secrets.NPM_TOKEN_ELEVATED }}
935935 steps :
@@ -1219,18 +1219,18 @@ jobs:
12191219 - host : macos-latest
12201220 target : ' x86_64-apple-darwin'
12211221 build : |
1222- npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi
1223- pnpm dlx turbo@${TURBO_VERSION} run build-native --cache-dir=".turbo" -- --release
1224- strip -x packages/next-swc/ native/next-swc.*.node
1222+ npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}"
1223+ cd packages/next-swc; npm run build-native -- --release
1224+ strip -x native/next-swc.*.node
12251225 - host : windows-latest
12261226 build : |
12271227 npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "pnpm@${PNPM_VERSION}"
1228- pnpm dlx turbo@${TURBO_VERSION} run build-native --cache-dir=".turbo" -- --release
1228+ cd packages/next-swc; npm run build-native -- --release
12291229 target : ' x86_64-pc-windows-msvc'
12301230 - host : windows-latest
12311231 build : |
12321232 npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "pnpm@${PNPM_VERSION}"
1233- pnpm dlx turbo@${TURBO_VERSION} run build-native-no-plugin --cache-dir=".turbo" -- --release --target i686-pc-windows-msvc
1233+ cd packages/next-swc; npm run build-native-no-plugin -- --release --target i686-pc-windows-msvc
12341234 target : ' i686-pc-windows-msvc'
12351235 - host : ubuntu-latest
12361236 target : ' x86_64-unknown-linux-gnu'
@@ -1263,9 +1263,9 @@ jobs:
12631263 export CXX=$(xcrun -f clang++);
12641264 SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
12651265 export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
1266- npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi
1267- pnpm dlx turbo@${TURBO_VERSION} run build-native --cache-dir=".turbo" -- --release --target aarch64-apple-darwin
1268- strip -x packages/next-swc/ native/next-swc.*.node
1266+ npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}"
1267+ cd packages/next-swc; npm run build-native -- --release --target aarch64-apple-darwin
1268+ strip -x native/next-swc.*.node
12691269 - host : ubuntu-latest
12701270 target : ' aarch64-unknown-linux-gnu'
12711271 docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:stable-2022-10-24-aarch64
@@ -1274,65 +1274,65 @@ jobs:
12741274 rustup toolchain install "${RUST_TOOLCHAIN}" &&
12751275 rustup default "${RUST_TOOLCHAIN}" &&
12761276 rustup target add aarch64-unknown-linux-gnu &&
1277- npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi &&
1277+ npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" &&
12781278 export CC_aarch64_unknown_linux_gnu=/usr/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc &&
1279- pnpm dlx turbo@${TURBO_VERSION} run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-gnu &&
1280- llvm-strip -x packages/next-swc/ native/next-swc.*.node
1279+ cd packages/next-swc; npm run build-native -- --release --target aarch64-unknown-linux-gnu &&
1280+ llvm-strip -x native/next-swc.*.node
12811281 - host : ubuntu-latest
12821282 target : ' armv7-unknown-linux-gnueabihf'
12831283 setup : |
12841284 sudo apt-get update
12851285 sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
12861286 build : |
1287- npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi
1288- pnpm dlx turbo@${TURBO_VERSION} run build-native-no-plugin --cache-dir=".turbo" -- --release --target armv7-unknown-linux-gnueabihf
1289- arm-linux-gnueabihf-strip packages/next-swc/ native/next-swc.*.node
1290- - host : ubuntu-latest
1291- target : aarch64-linux-android
1292- build : |
1293- export CLANG_VERSION=`ls ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang | sed 's/ *$//g'`
1294- export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
1295- export CC="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
1296- export CXX="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++"
1297- export AR="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
1298- export PATH="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
1299- touch "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/aarch64/libgcc.a"
1300- chmod 777 "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/aarch64/libgcc.a"
1301- echo "INPUT(-lunwind)" > "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/aarch64/libgcc.a"
1302- npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi
1303- pnpm dlx turbo@${TURBO_VERSION} run build-native --cache-dir=".turbo" -- --release --target aarch64-linux-android
1304- ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/next-swc/native/next-swc.*.node
1305- - host : ubuntu-latest
1306- target : armv7-linux-androideabi
1307- build : |
1308- export CLANG_VERSION=`ls ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang | sed 's/ *$//g'`
1309- export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
1310- export CC="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
1311- export CXX="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++"
1312- export AR="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
1313- export PATH="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
1314- touch "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/arm/libgcc.a"
1315- chmod 777 "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/arm/libgcc.a"
1316- echo "INPUT(-lunwind)" > "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/arm/libgcc.a"
1317- npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "pnpm@${PNPM_VERSION}"
1318- pnpm dlx turbo@${TURBO_VERSION} run build-native-no-plugin --cache-dir=".turbo" -- --release --target armv7-linux-androideabi
1319- ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/next-swc/native/next-swc.*.node
1287+ npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}"
1288+ cd packages/next-swc; npm run build-native-no-plugin -- --release --target armv7-unknown-linux-gnueabihf
1289+ arm-linux-gnueabihf-strip native/next-swc.*.node
1290+ # - host: ubuntu-latest
1291+ # target: aarch64-linux-android
1292+ # build: |
1293+ # export CLANG_VERSION=`ls ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang | sed 's/ *$//g'`
1294+ # export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
1295+ # export CC="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
1296+ # export CXX="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++"
1297+ # export AR="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
1298+ # export PATH="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
1299+ # touch "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/aarch64/libgcc.a"
1300+ # chmod 777 "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/aarch64/libgcc.a"
1301+ # echo "INPUT(-lunwind)" > "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/aarch64/libgcc.a"
1302+ # npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi
1303+ # cd packages/next-swc; npm run build-native -- --release --target aarch64-linux-android
1304+ # ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/next-swc/native/next-swc.*.node
1305+ # - host: ubuntu-latest
1306+ # target: armv7-linux-androideabi
1307+ # build: |
1308+ # export CLANG_VERSION=`ls ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang | sed 's/ *$//g'`
1309+ # export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
1310+ # export CC="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
1311+ # export CXX="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++"
1312+ # export AR="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
1313+ # export PATH="${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
1314+ # touch "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/arm/libgcc.a"
1315+ # chmod 777 "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/arm/libgcc.a"
1316+ # echo "INPUT(-lunwind)" > "${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/${CLANG_VERSION}/lib/linux/arm/libgcc.a"
1317+ # npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "pnpm@${PNPM_VERSION}"
1318+ # pnpm dlx turbo@${TURBO_VERSION} run build-native-no-plugin --cache-dir=".turbo" -- --release --target armv7-linux-androideabi
1319+ # ${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip packages/next-swc/native/next-swc.*.node
13201320 - host : ubuntu-latest
13211321 target : ' aarch64-unknown-linux-musl'
13221322 docker : ghcr.io/napi-rs/napi-rs/nodejs-rust:stable-2022-10-24-alpine
13231323 build : >-
13241324 set -e &&
1325- npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" && if [ ! -f $(dirname $(which yarn))/pnpm ]; then ln -s $(which yarn) $(dirname $(which yarn))/pnpm;fi &&
1325+ npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" &&
13261326 rustup toolchain install "${RUST_TOOLCHAIN}" &&
13271327 rustup default "${RUST_TOOLCHAIN}" &&
13281328 rustup target add aarch64-unknown-linux-musl &&
1329- pnpm dlx turbo@${TURBO_VERSION} run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-musl &&
1330- llvm-strip -x packages/next-swc/ native/next-swc.*.node
1329+ cd packages/next-swc; npm run build-native -- --release --target aarch64-unknown-linux-musl &&
1330+ llvm-strip -x native/next-swc.*.node
13311331 - host : windows-latest
13321332 target : ' aarch64-pc-windows-msvc'
13331333 build : |
13341334 npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "pnpm@${PNPM_VERSION}"
1335- pnpm dlx turbo@${TURBO_VERSION} run build-native-no-plugin --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc --cargo-flags=--no-default-features
1335+ cd packages/next-swc; npm run build-native-no-plugin -- --release --target aarch64-pc-windows-msvc --cargo-flags=--no-default-features
13361336 if : ${{ needs.build.outputs.isRelease == 'true' }}
13371337 needs : build
13381338 name : stable - ${{ matrix.settings.target }} - node@16
@@ -1380,7 +1380,7 @@ jobs:
13801380 uses : actions/setup-node@v4
13811381 if : ${{ !matrix.settings.docker }}
13821382 with :
1383- node-version : 18
1383+ node-version : 16
13841384 check-latest : true
13851385
13861386 - name : Install
@@ -1410,7 +1410,7 @@ jobs:
14101410 shell : bash
14111411
14121412 - name : Build in docker
1413- uses : addnab/docker-run-action@v4
1413+ uses : addnab/docker-run-action@v3
14141414 if : ${{ matrix.settings.docker }}
14151415 with :
14161416 image : ${{ matrix.settings.docker }}
@@ -1428,64 +1428,64 @@ jobs:
14281428 name : next-swc-binaries-${{ matrix.settings.target }}
14291429 path : packages/next-swc/native/next-swc.*.node
14301430
1431- build-native-freebsd :
1432- if : ${{ needs.build.outputs.isRelease == 'true' }}
1433- needs : build
1434- name : stable - x86_64-unknown-freebsd - node@16
1435- runs-on : macos-12
1436- steps :
1437- - name : tune mac network
1438- run : sudo sysctl -w net.link.generic.system.hwcksum_tx=0 && sudo sysctl -w net.link.generic.system.hwcksum_rx=0
1439- - uses : actions/checkout@v4
1440- - name : Delete useless files
1441- run : |
1442- rm -rf bench
1443- rm -rf docs
1444- rm -rf errors
1445- rm -rf examples
1446- rm -rf scripts
1447- rm -rf test
1448- - name : Build
1449- id : build
1450- 1451- env :
1452- DEBUG : napi:*
1453- RUSTUP_HOME : /usr/local/rustup
1454- CARGO_HOME : /usr/local/cargo
1455- RUSTUP_IO_THREADS : 1
1456- # Disable LTO, or the lld may crash with OOM
1457- CARGO_PROFILE_RELEASE_LTO : false
1458- with :
1459- envs : DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS CARGO_PROFILE_RELEASE_LTO NAPI_CLI_VERSION TURBO_VERSION RUST_TOOLCHAIN PNPM_VERSION
1460- usesh : true
1461- mem : 6000
1462- prepare : |
1463- pkg install -y curl node16
1464- curl -qL https://www.npmjs.com/install.sh | sh
1465- npm i -g pnpm@${PNPM_VERSION} "@napi-rs/cli@${NAPI_CLI_VERSION}"
1466- curl https://sh.rustup.rs -sSf --output rustup.sh
1467- sh rustup.sh -y --profile minimal --default-toolchain stable
1468- export PATH="/usr/local/cargo/bin:$PATH"
1469- echo "~~~~ rustc --version ~~~~"
1470- rustc --version
1471- echo "~~~~ node -v ~~~~"
1472- node -v
1473- run : |
1474- export PATH="/usr/local/cargo/bin:$PATH"
1475- pwd
1476- ls -lah
1477- whoami
1478- env
1479- freebsd-version
1480- pnpm --filter=@next/swc run build-native-no-plugin --platform --release --target x86_64-unknown-freebsd
1481- rm -rf node_modules
1482- rm -rf packages/next-swc/target
1483- - name : Upload artifact
1484- uses : actions/upload-artifact@v4
1485- with :
1486- name : next-swc-binaries-x86_64-unknown-freebsd
1487- path : packages/next-swc/native/next-swc.*.node
1488- if-no-files-found : error
1431+ # build-native-freebsd:
1432+ # if: ${{ needs.build.outputs.isRelease == 'true' }}
1433+ # needs: build
1434+ # name: stable - x86_64-unknown-freebsd - node@16
1435+ # runs-on: macos-12
1436+ # steps:
1437+ # - name: tune mac network
1438+ # run: sudo sysctl -w net.link.generic.system.hwcksum_tx=0 && sudo sysctl -w net.link.generic.system.hwcksum_rx=0
1439+ # - uses: actions/checkout@v4
1440+ # - name: Delete useless files
1441+ # run: |
1442+ # rm -rf bench
1443+ # rm -rf docs
1444+ # rm -rf errors
1445+ # rm -rf examples
1446+ # rm -rf scripts
1447+ # rm -rf test
1448+ # - name: Build
1449+ # id: build
1450+ # uses: vmactions/[email protected] 1451+ # env:
1452+ # DEBUG: napi:*
1453+ # RUSTUP_HOME: /usr/local/rustup
1454+ # CARGO_HOME: /usr/local/cargo
1455+ # RUSTUP_IO_THREADS: 1
1456+ # # Disable LTO, or the lld may crash with OOM
1457+ # CARGO_PROFILE_RELEASE_LTO: false
1458+ # with:
1459+ # envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS CARGO_PROFILE_RELEASE_LTO NAPI_CLI_VERSION TURBO_VERSION RUST_TOOLCHAIN PNPM_VERSION
1460+ # usesh: true
1461+ # mem: 6000
1462+ # prepare: |
1463+ # pkg install -y curl node16
1464+ # curl -qL https://www.npmjs.com/install.sh | sh
1465+ # npm i -g pnpm@${PNPM_VERSION} "@napi-rs/cli@${NAPI_CLI_VERSION}"
1466+ # curl https://sh.rustup.rs -sSf --output rustup.sh
1467+ # sh rustup.sh -y --profile minimal --default-toolchain stable
1468+ # export PATH="/usr/local/cargo/bin:$PATH"
1469+ # echo "~~~~ rustc --version ~~~~"
1470+ # rustc --version
1471+ # echo "~~~~ node -v ~~~~"
1472+ # node -v
1473+ # run: |
1474+ # export PATH="/usr/local/cargo/bin:$PATH"
1475+ # pwd
1476+ # ls -lah
1477+ # whoami
1478+ # env
1479+ # freebsd-version
1480+ # pnpm --filter=@next/swc run build-native-no-plugin --platform --release --target x86_64-unknown-freebsd
1481+ # rm -rf node_modules
1482+ # rm -rf packages/next-swc/target
1483+ # - name: Upload artifact
1484+ # uses: actions/upload-artifact@v4
1485+ # with:
1486+ # name: next-swc-binaries-x86_64-unknown-freebsd
1487+ # path: packages/next-swc/native/next-swc.*.node
1488+ # if-no-files-found: error
14891489
14901490 build-wasm :
14911491 needs : build
0 commit comments