Skip to content

Commit

Permalink
Update bool conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
taalexander committed Jan 3, 2024
1 parent f07f205 commit f1aa2ae
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ jobs:
run: |
export CONAN_LLVM_GIT_CACHE="${{ runner.temp }}/llvm-project"
conan install .. -pr:h default -pr:b default
echo "cache-miss=$($?)" >> $GITHUB_OUTPUT
- name : Print cache hit/miss
run: |
echo "Cache was missed: ${{ steps.check_conan_cache.outputs.cache-miss }}"
export cache-miss=$($?)
echo "cache-miss=$cache-miss" >> $GITHUB_OUTPUT
echo "Cache was missed: $cache-miss"
# If we have a cache miss on 'main', clear the cache.
# A dependency was updated, so we need to drop the old one
# to prevent unbounded cache growth over time.
- name : Clear Conan cache
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && ${{ steps.check_conan_cache.outputs.cache-miss }} != '0'
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && ${{ steps.check_conan_cache.outputs.cache-miss }} == '1'
run: |
rm -rf ./.conan
- name: Conan install
Expand All @@ -93,7 +92,7 @@ jobs:
# Note: we only update the cache from 'main' to avoid "cache thrashing", which would result in the 'main'
# cache getting LRU-evicted for every PR, since a single run uses most of the 10GB repo limit.
- uses: actions/cache/save@v3
if: always() && (github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.conan_install.outcome == 'success' && steps.check_conan_cache.outputs.cache-miss != '0')
if: always() && (github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.conan_install.outcome == 'success' && steps.check_conan_cache.outputs.cache-miss == '1')
with:
path: .conan
key: conan-${{ runner.os }}

0 comments on commit f1aa2ae

Please sign in to comment.