From be3bcb5897c4454c27759176a4334af1b1729d19 Mon Sep 17 00:00:00 2001 From: makslevental Date: Thu, 29 Aug 2024 17:04:46 -0500 Subject: [PATCH] remove cache storage for PRs --- .github/workflows/ci-linux.yml | 26 ++------------------------ .github/workflows/ci-macos.yml | 17 +---------------- .github/workflows/ci-windows.yml | 19 ++----------------- build_tools/ci/build_test_cpp.sh | 4 ---- 4 files changed, 5 insertions(+), 61 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 8051cc333..72d78cc0f 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -21,12 +21,6 @@ concurrency: group: ci-build-test-cpp-linux-${{ github.event.number || github.sha }} cancel-in-progress: true -permissions: - contents: read - # required to delete cache - # https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-github-actions-caches-for-a-repository-using-a-cache-key - actions: write - jobs: build_and_ctest: name: Build and Test (linux, ASSERTIONS) @@ -58,12 +52,7 @@ jobs: - name: Install deps run: | yum remove -y openssl-devel zlib-devel || true - - dnf install -y almalinux-release-devel - type -p yum-config-manager >/dev/null || yum -y install yum-utils - yum-config-manager -y --add-repo https://cli.github.com/packages/rpm/gh-cli.repo - - yum install -y protobuf-devel protobuf-compiler gh + yum install -y protobuf-devel protobuf-compiler - name: Sync source deps run: | @@ -87,7 +76,6 @@ jobs: echo CCACHE_DEBUGLEVEL=2 >> $GITHUB_ENV echo CCACHE_DEBUGDIR="/ccache-debug" >> $GITHUB_ENV echo CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros >> $GITHUB_ENV - echo CCACHE_COMPILERCHECK=content >> $GITHUB_ENV - name: Build packages run: | @@ -120,19 +108,9 @@ jobs: path: iree-dist-linux.tar if-no-files-found: warn - - name: Overwrite cache - if: ${{ !cancelled() }} - continue-on-error: true - env: - # required to run gh with privileges - GH_TOKEN: ${{ github.token }} - run: | - gh extension install actions/gh-actions-cache - gh actions-cache delete ${{ env.CACHE_KEY }} --confirm -R ${{ github.repository }} - - name: Save cache uses: actions/cache/save@v3 - if: ${{ !cancelled() }} + if: ${{ !cancelled() && github.event_name != 'pull_request' }} with: path: ${{ env.CACHE_DIR }} key: ${{ env.CACHE_KEY }} diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 6d85321a0..c28a3be53 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -16,10 +16,6 @@ concurrency: group: ci-build-test-cpp-macos-${{ github.event.number || github.sha }} cancel-in-progress: true -permissions: - contents: read - actions: write - jobs: build_and_ctest: name: Build and Test (${{ matrix.runs-on }}, ASSERTIONS) @@ -70,12 +66,10 @@ jobs: - name: Configure ccache debug logs run: | - # https://interrupt.memfault.com/blog/ccache-debugging echo CCACHE_DEBUG=1 >> $GITHUB_ENV echo CCACHE_DEBUGLEVEL=2 >> $GITHUB_ENV echo CCACHE_DEBUGDIR="/ccache-debug" >> $GITHUB_ENV echo CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros >> $GITHUB_ENV - echo CCACHE_COMPILERCHECK=content >> $GITHUB_ENV - name: Build packages run: | @@ -108,18 +102,9 @@ jobs: path: iree-dist-${{ matrix.runs-on }}.tar if-no-files-found: warn - - name: Overwrite cache - if: ${{ !cancelled() }} - continue-on-error: true - env: - GH_TOKEN: ${{ github.token }} - run: | - gh extension install actions/gh-actions-cache - gh actions-cache delete ${{ env.CACHE_KEY }} --confirm -R ${{ github.repository }} - - name: Save cache uses: actions/cache/save@v3 - if: ${{ !cancelled() }} + if: ${{ !cancelled() && github.event_name != 'pull_request' }} with: path: ${{ env.CACHE_DIR }} key: ${{ env.CACHE_KEY }} diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 61b5306f6..7600394ec 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -21,10 +21,6 @@ defaults: # force bash for windows shell: bash -permissions: - contents: read - actions: write - jobs: build_and_ctest: name: Build and Test (windows, ASSERTIONS) @@ -78,12 +74,10 @@ jobs: - name: Configure ccache debug logs run: | - # https://interrupt.memfault.com/blog/ccache-debugging echo CCACHE_DEBUG=1 >> $GITHUB_ENV echo CCACHE_DEBUGLEVEL=2 >> $GITHUB_ENV - echo CCACHE_DEBUGDIR="/ccache-debug" >> $GITHUB_ENV + echo CCACHE_DEBUGDIR="/c/ccache-debug" >> $GITHUB_ENV echo CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros >> $GITHUB_ENV - echo CCACHE_COMPILERCHECK=content >> $GITHUB_ENV - name: Build packages run: | @@ -116,18 +110,9 @@ jobs: path: iree-dist-windows.tar if-no-files-found: warn - - name: Overwrite cache - if: ${{ !cancelled() }} - continue-on-error: true - env: - GH_TOKEN: ${{ github.token }} - run: | - gh extension install actions/gh-actions-cache - gh actions-cache delete ${{ env.CACHE_KEY }} --confirm -R ${{ github.repository }} - - name: Save cache uses: actions/cache/save@v3 - if: ${{ !cancelled() }} + if: ${{ !cancelled() && github.event_name != 'pull_request' }} with: path: ${{ env.CACHE_DIR }} key: ${{ env.CACHE_KEY }} diff --git a/build_tools/ci/build_test_cpp.sh b/build_tools/ci/build_test_cpp.sh index 94a2d0b28..296dfc353 100644 --- a/build_tools/ci/build_test_cpp.sh +++ b/build_tools/ci/build_test_cpp.sh @@ -115,10 +115,6 @@ elif [[ "$OSTYPE" == "msys"* ]]; then ctest --test-dir "$build_dir" -R amd-aie --output-on-failure -j --repeat until-pass:5 fi -# Show ccache stats. -ccache --show-stats -v -grep -r -B15 'Result: .*_miss' $CCACHE_DEBUGDIR - rm -f "$install_dir"/bin/clang* rm -f "$install_dir"/bin/llvm-link* cp "$build_dir"/tools/testing/e2e/iree-e2e-matmul-test "$install_dir"/bin