From 44ed0dff6a570e0f4fb7f0ac36d5b4310727fd4c Mon Sep 17 00:00:00 2001 From: "sammy.huang" Date: Thu, 28 Dec 2023 09:46:45 +0800 Subject: [PATCH] enhance: [skip e2e]use native way from upload-artifact plugin to archive (#29539) use upload-artifact plugin to archive instead of zip Signed-off-by: Sammy Huang --- .github/workflows/main.yaml | 45 ++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6a99772850..368ee72b54 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -93,13 +93,15 @@ jobs: - name: Build run: | ./build/builder.sh /bin/bash -c "make USE_ASAN=${{env.useasan}} build-cpp-with-coverage" - - run: | - zip -r code.zip . -x "./.docker/*" -x "./cmake_build/thirdparty/*" - - name: Archive code - uses: actions/upload-artifact@v3 + - name: Upload Artifact + uses: actions/upload-artifact@v4 with: name: code - path: code.zip + compression-level: 0 # no compression + path: | + **/* + !./.docker/** + !./cmake_build/thirdparty/** UT-Cpp: name: UT for Cpp needs: Build @@ -112,13 +114,10 @@ jobs: env: UBUNTU: ${{ matrix.ubuntu }} steps: - - name: Download code - uses: actions/download-artifact@v3.0.1 + - name: Download Artifact + uses: actions/download-artifact@v4.1.0 with: name: code - - run: | - unzip code.zip - rm code.zip - name: Download Caches uses: ./.github/actions/cache with: @@ -135,7 +134,7 @@ jobs: chmod +x internal/core/output/unittest/* ./build/builder.sh /bin/bash -c ./scripts/run_cpp_codecov.sh - name: Archive result - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: cpp-result path: | @@ -155,13 +154,10 @@ jobs: env: UBUNTU: ${{ matrix.ubuntu }} steps: - - name: Download code - uses: actions/download-artifact@v3.0.1 + - name: Download Artifact + uses: actions/download-artifact@v4.1.0 with: name: code - - run: | - unzip code.zip - rm code.zip - name: Download Caches uses: ./.github/actions/cache with: @@ -177,7 +173,7 @@ jobs: chmod +x scripts/run_go_codecov.sh ./build/builder.sh /bin/bash -c ./scripts/run_go_codecov.sh - name: Archive result - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: go-result path: | @@ -198,13 +194,10 @@ jobs: env: UBUNTU: ${{ matrix.ubuntu }} steps: - - name: Download code - uses: actions/download-artifact@v3.0.1 + - name: Download Artifact + uses: actions/download-artifact@v4.1.0 with: name: code - - run: | - unzip code.zip - rm code.zip - name: Download Caches uses: ./.github/actions/cache with: @@ -220,7 +213,7 @@ jobs: chmod +x scripts/run_intergration_test.sh ./build/builder.sh /bin/bash -c ./scripts/run_intergration_test.sh - name: Archive result - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: it-result path: | @@ -234,15 +227,15 @@ jobs: timeout-minutes: 5 steps: - name: Download Cpp code coverage results - uses: actions/download-artifact@v3.0.1 + uses: actions/download-artifact@v4.1.0 with: name: cpp-result - name: Download Go code coverage results - uses: actions/download-artifact@v3.0.1 + uses: actions/download-artifact@v4.1.0 with: name: go-result - name: Download Integration Test coverage results - uses: actions/download-artifact@v3.0.1 + uses: actions/download-artifact@v4.1.0 with: name: it-result - name: Display structure of code coverage results