PR_Test download external library (#13861)

This commit is contained in:
江战
2022-12-20 17:23:59 +08:00
committed by GitHub
parent e9b958a125
commit b4e61735c7
2 changed files with 42 additions and 3 deletions
+39
View File
@@ -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
+3 -3
View File
@@ -112,7 +112,7 @@ scene::RenderWindow *Root::createRenderWindowFromSystemWindow(ISystemWindow *win
gfx::SwapchainInfo info;
info.width = static_cast<uint32_t>(size.width);
info.height = static_cast<uint32_t>(size.height);
info.windowHandle = reinterpret_cast<void *>(handle);
info.windowHandle = reinterpret_cast<void *>(handle); // NOLINT
info.windowId = window->getWindowId();
gfx::Swapchain *swapchain = gfx::Device::getInstance()->createSwapchain(info);
@@ -167,7 +167,7 @@ void Root::destroy() {
// this.dataPoolManager.clear();
}
void Root::resize(uint32_t width, uint32_t height, uint32_t windowId) {
void Root::resize(uint32_t width, uint32_t height, uint32_t windowId) { // NOLINT
for (const auto &window : _renderWindows) {
auto *swapchain = window->getSwapchain();
if (swapchain && (swapchain->getWindowId() == windowId)) {
@@ -435,7 +435,7 @@ void Root::frameMoveEnd() {
}
}
void Root::frameMove(float deltaTime, int32_t totalFrames) {
void Root::frameMove(float deltaTime, int32_t totalFrames) { // NOLINT
CCObject::deferredDestroy();
_frameTime = deltaTime;