From 59deccfa2e96386c2253745c56a2e9d5df6c02d0 Mon Sep 17 00:00:00 2001 From: Zhichang Yu Date: Fri, 21 Jun 2024 22:45:23 +0800 Subject: [PATCH] Checkout resource before build pysdk --- .github/workflows/release.yml | 5 ++++- .github/workflows/tests.yml | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f93594eb2..e79adb9047 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,11 +71,14 @@ jobs: TZ=$(readlink -f /etc/localtime | awk -F '/zoneinfo/' '{print $2}') sudo docker rm -f infinity_build && sudo docker run -d --privileged --name infinity_build --network=host -e TZ=$TZ -v $PWD:/infinity infiniflow/infinity_builder:centos7 + - name: Modify CMakeLists + run: sed -i '/install.*TARGETS embedded_infinity_ext.*/d' src/CMakeLists.txt + - name: Build release version run: sudo docker exec infinity_build bash -c "git config --global safe.directory \"*\" && cd /infinity && rm -fr cmake-build-release && mkdir -p cmake-build-release && cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=amd64 -DCMAKE_JOB_POOL_LINK:STRING=link_pool -DCMAKE_JOB_POOLS:STRING=link_pool=1 -S /infinity -B /infinity/cmake-build-release && cmake --build /infinity/cmake-build-release" - name: Download resources - run: sudo docker exec infinity_build bash -c "rm -rf resource && git clone https://github.com/infiniflow/resource.git" + run: rm -rf resource && git clone --depth=1 https://github.com/infiniflow/resource.git - name: Build RPM and DEB run: sudo docker exec infinity_build bash -c "cd /infinity/cmake-build-release && cpack" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index edde938563..6b7166b940 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,9 +65,12 @@ jobs: if: ${{ !cancelled() }} # always run this step even if previous steps failed run: cat unittest_debug.log 2>/dev/null || true + - name: Download resources + run: rm -rf resource && git clone --depth=1 https://github.com/infiniflow/resource.git + - name: Install pysdk if: ${{ !cancelled() && !failure() }} - run: sudo docker exec infinity_build bash -c "cd /infinity/ && pip uninstall -y infinity-sdk && pip install . -v --config-settings=cmake.build-type='Debug' --config-settings=build-dir='cmake-build-debug' --config-settings=cmake.targets='embedded_infinity_ext'" + run: sudo docker exec infinity_build bash -c "cd /infinity/ && pip uninstall -y infinity-sdk && pip install . -v --config-settings=cmake.build-type='Debug' --config-settings=build-dir='cmake-build-debug'" - name: Start infinity pysdk & http_api debug version if: ${{ !cancelled() && !failure() }} @@ -163,9 +166,12 @@ jobs: if: ${{ !cancelled() }} # always run this step even if previous steps failed run: cat unittest_release.log 2>/dev/null || true + - name: Download resources + run: rm -rf resource && git clone --depth=1 https://github.com/infiniflow/resource.git + - name: Install pysdk if: ${{ !cancelled() && !failure() }} - run: sudo docker exec infinity_build bash -c "cd /infinity/ && pip uninstall -y infinity-sdk && pip install . -v --config-settings=cmake.build-type='RelWithDebInfo' --config-settings=build-dir='cmake-build-release' --config-settings=cmake.targets='embedded_infinity_ext'" + run: sudo docker exec infinity_build bash -c "cd /infinity/ && pip uninstall -y infinity-sdk && pip install . -v --config-settings=cmake.build-type='RelWithDebInfo' --config-settings=build-dir='cmake-build-release'" - name: pysdk local infinity test release version if: ${{ !cancelled() && !failure() }}