ci: use nx on rust build (#2811)

This commit is contained in:
Alex Yang 2023-06-17 17:49:07 +08:00 committed by GitHub
parent c68220166a
commit 0e01094ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 3 deletions

View File

@ -28,7 +28,7 @@ runs:
- name: Build
if: ${{ inputs.target != 'x86_64-unknown-linux-gnu' && inputs.target != 'aarch64-unknown-linux-gnu' }}
shell: bash
run: yarn workspace @affine/native build --target ${{ inputs.target }}
run: yarn nx build @affine/native --target ${{ inputs.target }}
- name: Build
if: ${{ inputs.target == 'x86_64-unknown-linux-gnu' }}
@ -39,7 +39,8 @@ runs:
run: >-
export CC=x86_64-unknown-linux-gnu-gcc &&
export CC_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-gcc &&
yarn workspace @affine/native build --target ${{ inputs.target }}
yarn nx build @affine/native --target ${{ inputs.target }} &&
chmod -R 777 node_modules/.cache
- name: Build
if: ${{ inputs.target == 'aarch64-unknown-linux-gnu' }}
@ -48,4 +49,4 @@ runs:
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
options: --user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build
run: >-
yarn workspace @affine/native build --target ${{ inputs.target }}
yarn nx build @affine/native --target ${{ inputs.target }}

View File

@ -10,6 +10,8 @@ on:
- README.md
- .github/**
- '!.github/workflows/build.yml'
- '!.github/actions/build-rust/action.yml'
- '!.github/actions/setup-node/action.yml'
pull_request:
branches:
- master
@ -19,6 +21,8 @@ on:
- README.md
- .github/**
- '!.github/workflows/build.yml'
- '!.github/actions/build-rust/action.yml'
- '!.github/actions/setup-node/action.yml'
env:
DEBUG: napi:*

View File

@ -6,11 +6,13 @@ on:
paths:
- 'packages/i18n/**'
- '.github/workflows/languages-sync.yml'
- '!.github/actions/setup-node/action.yml'
pull_request_target:
branches: ['master']
paths:
- 'packages/i18n/**'
- '.github/workflows/languages-sync.yml'
- '!.github/actions/setup-node/action.yml'
workflow_dispatch:
jobs:

View File

@ -11,6 +11,7 @@ on:
- README.md
- .github/**
- '!.github/workflows/nightly-build.yml'
- '!.github/actions/setup-node/action.yml'
permissions:
actions: write