mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 19:42:19 +03:00
ci: prevent error if rust build is cached by nx (#4951)
If Rust build was cached by nx, only the output file will be presented. The chmod command will be failed in this case like: https://github.com/toeverything/AFFiNE/actions/runs/6874496337/job/18697360212
This commit is contained in:
parent
791eb75ca8
commit
703fad6a0d
12
.github/actions/build-rust/action.yml
vendored
12
.github/actions/build-rust/action.yml
vendored
@ -51,8 +51,12 @@ runs:
|
|||||||
export CC_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-gcc
|
export CC_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-gcc
|
||||||
export RUSTFLAGS="-C debuginfo=1"
|
export RUSTFLAGS="-C debuginfo=1"
|
||||||
yarn workspace ${{ inputs.package }} nx build ${{ inputs.package }} --target ${{ inputs.target }}
|
yarn workspace ${{ inputs.package }} nx build ${{ inputs.package }} --target ${{ inputs.target }}
|
||||||
|
if [ -d "node_modules/.cache" ]; then
|
||||||
chmod -R 777 node_modules/.cache
|
chmod -R 777 node_modules/.cache
|
||||||
chmod -R 777 target
|
fi
|
||||||
|
if [ -d "target" ]; then
|
||||||
|
chmod -R 777 target;
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{ inputs.target == 'aarch64-unknown-linux-gnu' }}
|
if: ${{ inputs.target == 'aarch64-unknown-linux-gnu' }}
|
||||||
@ -63,5 +67,9 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
export RUSTFLAGS="-C debuginfo=1"
|
export RUSTFLAGS="-C debuginfo=1"
|
||||||
yarn workspace ${{ inputs.package }} nx build ${{ inputs.package }} --target ${{ inputs.target }}
|
yarn workspace ${{ inputs.package }} nx build ${{ inputs.package }} --target ${{ inputs.target }}
|
||||||
|
if [ -d "node_modules/.cache" ]; then
|
||||||
chmod -R 777 node_modules/.cache
|
chmod -R 777 node_modules/.cache
|
||||||
chmod -R 777 target
|
fi
|
||||||
|
if [ -d "target" ]; then
|
||||||
|
chmod -R 777 target;
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user