@@ -1303,6 +1303,66 @@ jobs:
13031303 name : next-swc-binaries
13041304 path : packages/next-swc/native/next-swc.*.node
13051305
1306+ build-native-freebsd :
1307+ if : ${{ needs.build.outputs.isRelease == 'true' }}
1308+ needs : build
1309+ name : stable - x86_64-unknown-freebsd - node@16
1310+ runs-on : macos-10.15
1311+ steps :
1312+ - name : tune mac network
1313+ run : sudo sysctl -w net.link.generic.system.hwcksum_tx=0 && sudo sysctl -w net.link.generic.system.hwcksum_rx=0
1314+ - uses : actions/checkout@v3
1315+ - name : Delete useless files
1316+ run : |
1317+ rm -rf bench
1318+ rm -rf docs
1319+ rm -rf errors
1320+ rm -rf examples
1321+ rm -rf scripts
1322+ rm -rf test
1323+ - name : Build
1324+ id : build
1325+ 1326+ env :
1327+ DEBUG : napi:*
1328+ RUSTUP_HOME : /usr/local/rustup
1329+ CARGO_HOME : /usr/local/cargo
1330+ RUSTUP_IO_THREADS : 1
1331+ # Disable LTO, or the lld may crash with OOM
1332+ CARGO_PROFILE_RELEASE_LTO : false
1333+ with :
1334+ envs : DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS CARGO_PROFILE_RELEASE_LTO NAPI_CLI_VERSION TURBO_VERSION RUST_TOOLCHAIN
1335+ usesh : true
1336+ mem : 6000
1337+ prepare : |
1338+ pkg install -y curl node14
1339+ curl -qL https://www.npmjs.com/install.sh | sh
1340+ npm install -g yarn
1341+ curl https://sh.rustup.rs -sSf --output rustup.sh
1342+ sh rustup.sh -y --profile minimal --default-toolchain stable
1343+ export PATH="/usr/local/cargo/bin:$PATH"
1344+ echo "~~~~ rustc --version ~~~~"
1345+ rustc --version
1346+ echo "~~~~ node -v ~~~~"
1347+ node -v
1348+ run : |
1349+ export PATH="/usr/local/cargo/bin:$PATH"
1350+ pwd
1351+ ls -lah
1352+ whoami
1353+ env
1354+ freebsd-version
1355+ npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" "turbo@${TURBO_VERSION}"
1356+ yarn --cwd packages/next-swc build-native --release --target x86_64-unknown-freebsd
1357+ rm -rf node_modules
1358+ rm -rf packages/next-swc/target
1359+ - name : Upload artifact
1360+ uses : actions/upload-artifact@v3
1361+ with :
1362+ name : next-swc-binaries
1363+ path : packages/next-swc/native/next-swc.*.node
1364+ if-no-files-found : error
1365+
13061366 build-wasm :
13071367 needs : build
13081368 if : ${{ needs.build.outputs.isRelease == 'true' }}
0 commit comments