Skip to content

Commit

Permalink
remove cache storage for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Aug 29, 2024
1 parent 3118848 commit c3ee770
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 61 deletions.
27 changes: 3 additions & 24 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -102,6 +90,7 @@ jobs:
- name: Tar ccache logs
if: ${{ !cancelled() }}
run: |
ccache --show-stats -v
tar cf linux-ccache-logs.tar $CCACHE_DEBUGDIR
- name: Upload ccache logs
Expand All @@ -120,19 +109,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 }}
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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: |
Expand All @@ -90,6 +84,7 @@ jobs:
- name: Tar ccache logs
if: ${{ !cancelled() }}
run: |
ccache --show-stats -v
tar cf macos-ccache-logs.tar $CCACHE_DEBUGDIR
- name: Upload ccache logs
Expand All @@ -108,18 +103,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 }}
20 changes: 3 additions & 17 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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: |
Expand All @@ -98,6 +92,7 @@ jobs:
- name: Tar ccache logs
if: ${{ !cancelled() }}
run: |
ccache --show-stats -v
tar cf windows-ccache-logs.tar $CCACHE_DEBUGDIR
- name: Upload ccache logs
Expand All @@ -116,18 +111,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 }}
Expand Down
4 changes: 0 additions & 4 deletions build_tools/ci/build_test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c3ee770

Please sign in to comment.