mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 02:02:41 +08:00
PR_Test download external library (#13861)
This commit is contained in:
@@ -73,6 +73,24 @@ jobs:
|
||||
git fetch origin pull/${{ steps.get_pr.outputs.pr_number }}/head:pull-${{ steps.get_pr.outputs.pr_number }}
|
||||
git merge --ff -s recursive --no-verify -m "PR Test" origin/${{ steps.parse_pr.outputs.pr_base_ref }} pull-${{ steps.get_pr.outputs.pr_number }}
|
||||
|
||||
- name: Download external libraries
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
|
||||
PRECLONE_EXTERNAL="E:/preclone/cocos-engine-external"
|
||||
if [ ! -d $PRECLONE_EXTERNAL ]; then
|
||||
mkdir -p $PRECLONE_EXTERNAL
|
||||
git clone https://github.com/cocos/cocos-engine-external $PRECLONE_EXTERNAL
|
||||
else
|
||||
echo "directory $PRECLONE_EXTERNAL is ready"
|
||||
fi
|
||||
if [ ! -d native/external ]; then
|
||||
mkdir native/external
|
||||
fi
|
||||
git -C $PRECLONE_EXTERNAL reset --hard
|
||||
git -C $PRECLONE_EXTERNAL fetch --all --prune
|
||||
git -C $PRECLONE_EXTERNAL archive --format=tar $EXT_VERSION | tar -C native/external -xf -
|
||||
- name: Generate bindings
|
||||
run: |
|
||||
cd ./native/tools/swig-config
|
||||
@@ -167,6 +185,27 @@ jobs:
|
||||
git branch ${{ steps.parse_pr.outputs.pr_base_ref }}
|
||||
git fetch origin pull/${{ steps.get_pr.outputs.pr_number }}/head:pull-${{ steps.get_pr.outputs.pr_number }}
|
||||
git merge --ff -s recursive --no-verify -m "PR Test" origin/${{ steps.parse_pr.outputs.pr_base_ref }} pull-${{ steps.get_pr.outputs.pr_number }}
|
||||
- name: Download external libraries
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
EXT_VERSION=`node ./.github/workflows/get-native-external-version.js`
|
||||
PRECLONE_EXTERNAL="/Users/admin/Documents/actions-runner/preclone/cocos-engine-external"
|
||||
if [ ! -d $PRECLONE_EXTERNAL ]; then
|
||||
echo "create directory $PRECLONE_EXTERNAL"
|
||||
# remove all sub-folders
|
||||
rm -rf /Users/admin/Documents/actions-runner/preclone
|
||||
mkdir -p $PRECLONE_EXTERNAL
|
||||
git clone https://github.com/cocos/cocos-engine-external $PRECLONE_EXTERNAL
|
||||
else
|
||||
echo "directory $PRECLONE_EXTERNAL is ready"
|
||||
fi
|
||||
if [ ! -d native/external ]; then
|
||||
mkdir native/external
|
||||
fi
|
||||
git -C $PRECLONE_EXTERNAL reset --hard
|
||||
git -C $PRECLONE_EXTERNAL fetch --all --prune
|
||||
git -C $PRECLONE_EXTERNAL archive --format=tar $EXT_VERSION | tar -C native/external -xf -
|
||||
- name: Generate bindings
|
||||
run: |
|
||||
cd ./native/tools/swig-config
|
||||
|
||||
Reference in New Issue
Block a user