Skip to content

Commit

Permalink
feat(core): change artifact structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli authored and FrozenPandaz committed Jan 30, 2023
1 parent 1ad65c6 commit b47a4e7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ jobs:
- host: macos-latest
target: x86_64-apple-darwin
build: |
yarn nx -- run-many --target=build-native -- --target=x86_64-apple-darwin
yarn nx -- run-many --target=build-native --configuration=publish -- --target=x86_64-apple-darwin
- host: windows-latest
build: yarn nx -- run-many --target=build-native -- --target=x86_64-pc-windows-msvc
build: yarn nx -- run-many --target=build-native --configuration=publish -- --target=x86_64-pc-windows-msvc
target: x86_64-pc-windows-msvc
# Windows 32bit (not needed)
# - host: windows-latest
# build: |
# yarn nx -- run-many --target=build-native -- --target=i686-pc-windows-msvc
# yarn nx -- run-many --target=build-native --configuration=publish -- --target=i686-pc-windows-msvc
# target: i686-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |-
set -e &&
yarn --version &&
yarn nx -- run-many --target=build-native -- --target=x86_64-unknown-linux-gnu
yarn nx -- run-many --target=build-native --configuration=publish -- --target=x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: set -e && yarn nx -- run-many --target=build-native -- --target=x86_64-unknown-linux-musl
build: set -e && yarn nx -- run-many --target=build-native --configuration=publish -- --target=x86_64-unknown-linux-musl
- host: macos-latest
target: aarch64-apple-darwin
build: |
Expand All @@ -45,40 +45,40 @@ jobs:
export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
yarn nx -- run-many --target=build-native -- --target=aarch64-apple-darwin
yarn nx -- run-many --target=build-native --configuration=publish -- --target=aarch64-apple-darwin
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |-
set -e &&
yarn --version &&
yarn nx -- run-many --target=build-native -- --target=aarch64-unknown-linux-gnu
yarn nx -- run-many --target=build-native --configuration=publish -- --target=aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: |
yarn nx -- run-many --target=build-native -- --target=armv7-unknown-linux-gnueabihf
yarn nx -- run-many --target=build-native --configuration=publish -- --target=armv7-unknown-linux-gnueabihf
# Android (not needed)
# - host: ubuntu-latest
# target: aarch64-linux-android
# build: |
# yarn nx -- run-many --target=build-native -- --target=aarch64-linux-android
# yarn nx -- run-many --target=build-native --configuration=publish -- --target=aarch64-linux-android
# - host: ubuntu-latest
# target: armv7-linux-androideabi
# build: |
# yarn nx -- run-many --target=build-native -- --target=armv7-linux-androideabi
# yarn nx -- run-many --target=build-native --configuration=publish -- --target=armv7-linux-androideabi
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
yarn nx -- run-many --target=build-native -- --target=aarch64-unknown-linux-musl
yarn nx -- run-many --target=build-native --configuration=publish -- --target=aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
build: yarn nx -- run-many --target=build-native -- --target=aarch64-pc-windows-msvc
build: yarn nx -- run-many --target=build-native --configuration=publish -- --target=aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
# env
# freebsd-version
# yarn install
# yarn nx -- run-many --target=build-native -- --target=x86_64-unknown-freebsd
# yarn nx -- run-many --target=build-native --configuration=publish -- --target=x86_64-unknown-freebsd
# strip -x packages/*/*.node
# rm -rf node_modules
# rm -rf target
Expand Down Expand Up @@ -219,7 +219,8 @@ jobs:
- name: Publish
run: |
echo $GITHUB_REF_NAME
# yarn nx-release --local=false $GITHUB_REF_NAME --dryRun
yarn nx-release --local=false $GITHUB_REF_NAME --dryRun
ls -R build/packages/nx/native-packages
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions packages/nx/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
"dist": "packages/nx/src/native",
"jsFile": "packages/nx/src/native/index.js",
"release": true
},
"configurations": {
"publish": {
"dist": "packages/nx"
}
}
},
"artifacts": {
Expand Down

0 comments on commit b47a4e7

Please sign in to comment.