Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable ccache in fuzzy-testing.yml #260

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 1 addition & 60 deletions .github/workflows/fuzzy-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,10 @@ jobs:
options: "--user=root"

env:
CCACHE_DIR: "/opt/ccache-cache"
CCACHE_COMPILERCHECK: "content"
CCACHE_COMPRESSLEVEL: "1"
CCACHE_MAXSIZE: "100M"
CCACHE_DISABLE: "1"
CONAN_HOME: "/opt/conan/"
HICTK_CI: "1"

outputs:
ccache-old-cache-key: ${{ steps.cache-ccache.outputs.cache-matched-key }}

steps:
- name: Clone hictk
uses: actions/checkout@v4
Expand All @@ -142,14 +136,7 @@ jobs:
run: |
conanfile_hash="${{ hashFiles('conanfile.py') }}"

# This can be used by to always update a cache entry (useful e.g. for ccache)
current_date="$(date '+%s')"

ccache_key_prefix="ccache-fuzzy-testing-$GITHUB_REF-$conanfile_hash"

echo "conan-key=fuzzy-testing-$conanfile_hash" | tee -a "$GITHUB_OUTPUT"
echo "ccache-key=${ccache_key_prefix}-${current_date}" | tee -a "$GITHUB_OUTPUT"
echo "ccache-restore-key=$ccache_key_prefix" | tee -a "$GITHUB_OUTPUT"

- name: Install Python
run: |
Expand Down Expand Up @@ -212,45 +199,9 @@ jobs:
-S . \
-B build

- name: Restore Ccache folder
id: cache-ccache
uses: actions/cache/restore@v4
with:
key: ${{ steps.cache-key.outputs.ccache-restore-key }}
path: ${{ env.CCACHE_DIR }}

- name: Reset Ccache stats
run: ccache --zero-stats

- name: Build hictk_fuzzer
run: cmake --build build -j $(nproc) -t hictk_fuzzer

- name: Print Ccache statistics (pre-cleanup)
run: |
ccache --show-stats \
--show-compression \
--verbose

- name: Cleanup Ccache folder
run: |
ccache --evict-older-than=14400s # 4h
ccache --recompress=19 --recompress-threads="$(nproc)"
ccache --cleanup

- name: Print Ccache statistics (post-cleanup)
run: |
ccache --show-stats \
--show-compression \
--verbose

- name: Save Ccache folder
uses: actions/cache/save@v4
with:
key: ${{ steps.cache-key.outputs.ccache-key }}
path: ${{ env.CCACHE_DIR }}
env:
ZSTD_CLEVEL: 1

- name: Install test dependencies
run: |
pip install --no-cache-dir 'cooler==0.10.*' 'numpy<2'
Expand Down Expand Up @@ -339,16 +290,6 @@ jobs:
*".${{ matrix.format }}" \
*.cool

clean-stale-cache:
needs: [build-project]
uses: paulsengroup/hictk/.github/workflows/evict-gha-cache.yml@main
name: Clean stale Ccache cache
permissions:
actions: write
if: needs.build-project.outputs.ccache-old-cache-key != ''
with:
cache-key: "${{ needs.build-project.outputs.ccache-old-cache-key }}"

fuzzy-testing-status-check:
name: Status Check (fuzzy-testing)
if: ${{ always() }}
Expand Down