Conversation
8d0d9c5 to
fddf791
Compare
fddf791 to
fe1bd34
Compare
|
I'm ok with running the CI jobs on main as well. I wonder if we could structure it so we only run the julia 1.10 x ubuntu combination on main. As far as the GHA cache I don't fully understand which branches can access it. @petebachant maybe you understand more? |
It sounds like Teja is right, that branches don't share caches, but they can fall back to the default branch's cache: https://github.com/actions/cache?tab=readme-ov-file#cache-scopes So yeah, running on |
|
@petebachant @juliasloan25 Has GitHub started enforcing the cache size limit yet? The cache for this repo says "(30.66 GB of 10 GB Used)". If a single cache for ci is about 2GB, maybe it makes sense to only cache from main, so all branches can use it. We currently create 12 GB of caches per branch. |
|
I assume they are dropping entries from the cache. It used to be up in the hundreds of GB at one point. Maybe we're also caching more than we need to: - name: Cache Julia depot
uses: actions/cache@v4
with:
# Cache Julia's depot
path: |
~/.julia/packages
~/.julia/compiled
~/.julia/artifacts
~/.julia/scratchspaces
~/.julia/registries
~/.julia/logsSounds like maybe |
|
What does it mean to run CI/code cov on main (vs on the branch being merged into main? |
| - name: Run tests | ||
| uses: julia-actions/julia-runtest@v1 | ||
| with: | ||
| coverage: ${{ matrix.version == '1.10' && matrix.os == 'ubuntu-latest' }} |
There was a problem hiding this comment.
I think the "correct" thing to do is upload a codecov report for every Julia version/os combination. I don't think we have anything in ClimaLand that depends on the Julia version or os, so the reports should all be the same.
There was a problem hiding this comment.
I think it's ok to just check coverage on one Julia version/OS pair like this
This should reduce cache clobbering.
I think I was incorrect about needing to run codecov on main. |
cae8b1c to
29b2c1c
Compare
All other workflows changes to not update caches. Artifacts no longer cached.
29b2c1c to
61b2fcd
Compare
|
Keep in mind that a cache hit appears to only save ~1 minute on the CI job, so spending a ton of time on optimizing might not be worth the trouble. |
| - if: ${{ matrix.version != '1.10' || matrix.os != 'ubuntu-latest' }} | ||
| uses: julia-actions/julia-runtest@v1 | ||
| with: | ||
| coverage: false | ||
| - if: ${{ matrix.version == '1.10' && matrix.os == 'ubuntu-latest' }} | ||
| uses: julia-actions/julia-runtest@v1 |
There was a problem hiding this comment.
| - if: ${{ matrix.version != '1.10' || matrix.os != 'ubuntu-latest' }} | |
| uses: julia-actions/julia-runtest@v1 | |
| with: | |
| coverage: false | |
| - if: ${{ matrix.version == '1.10' && matrix.os == 'ubuntu-latest' }} | |
| uses: julia-actions/julia-runtest@v1 | |
| - uses: julia-actions/julia-runtest@v1 | |
| with: | |
| coverage: ${{ matrix.version == '1.10' && matrix.os == 'ubuntu-latest' }} |
${{ matrix.version == '1.10' && matrix.os == 'ubuntu-latest' }} will be a boolean that's true when we run with Julia 1.10 and ubuntu only, so I think this should work
| with: | ||
| file: lcov.info | ||
| token: ${{secrets.CODECOV_TOKEN}} | ||
| files: lcov.info |
There was a problem hiding this comment.
should this be files or file? do we need to change the line above too?
| - name: Run tests | ||
| uses: julia-actions/julia-runtest@v1 | ||
| with: | ||
| coverage: ${{ matrix.version == '1.10' && matrix.os == 'ubuntu-latest' }} |
There was a problem hiding this comment.
I think it's ok to just check coverage on one Julia version/OS pair like this
| name: update_caches | ||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * *" |
There was a problem hiding this comment.
I think it would be good for this to run overnight. I would assume this uses UTC, and 12am UTC = 4am PST. So we could change to 0 8 * * * to run at our midnight
Purpose
Codecov was not being submitted because the token was missing for the repo. This is now fixed (this pr does not need to merged for that). Instead of submitting a codecov report for each os/Julia combo, only one of which is used, this only submits a codecov for a single version. Coverage is also disabled for the other tests, which should make them run slightly faster.