From f83d3ff6604aa35bb39b3caffb5554ae0c436708 Mon Sep 17 00:00:00 2001 From: Yellow Shine Date: Tue, 30 Jul 2024 16:34:56 +0800 Subject: [PATCH] feat: [skip e2e] effective way to use cache Signed-off-by: Yellow Shine --- .github/workflows/code-checker.yaml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-checker.yaml b/.github/workflows/code-checker.yaml index 9dbe977f7780..a9805bb4bdb4 100644 --- a/.github/workflows/code-checker.yaml +++ b/.github/workflows/code-checker.yaml @@ -52,7 +52,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Download Caches - uses: ./.github/actions/cache + uses: ./.github/actions/cache-restore with: os: 'ubuntu22.04' - name: Code Check @@ -60,6 +60,11 @@ jobs: OS_NAME: 'ubuntu22.04' run: | ./build/builder.sh /bin/bash -c "make check-proto-product && make verifiers" + - name: Save Caches + uses: ./.github/actions/cache-save + if: github.event_name != 'pull_request' + with: + os: 'ubuntu22.04' amazonlinux: if: ${{ false }} # skip for now @@ -80,13 +85,18 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Download Caches - uses: ./.github/actions/cache + uses: ./.github/actions/cache-restore with: os: 'amazonlinux2023' - name: Code Check run: | sed -i 's/ubuntu22.04/amazonlinux2023/g' .env ./build/builder.sh /bin/bash -c "make install" + - name: Save Caches + uses: ./.github/actions/cache-save + if: github.event_name != 'pull_request' + with: + os: 'amazonlinux2023' rockylinux: if: ${{ false }} # skip for now @@ -107,10 +117,15 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Download Caches - uses: ./.github/actions/cache + uses: ./.github/actions/cache-restore with: os: 'rockylinux8' - name: Code Check run: | sed -i 's/ubuntu22.04/rockylinux8/g' .env ./build/builder.sh /bin/bash -c "make install" + - name: Save Caches + uses: ./.github/actions/cache-save + if: github.event_name != 'pull_request' + with: + os: 'rockylinux8'