Compare commits

..

11 Commits

Author SHA1 Message Date
dependabot[bot]
d48542bb7b Bump actions/cache from 3.3.3 to 4.0.2 (#123)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.3 to 4.0.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](e12d46a63a...0c45773b62)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
2024-05-01 12:53:50 -04:00
dependabot[bot]
caa655642c Bump pyTooling/Actions from 1.0.1 to 1.0.5 (#127)
Bumps [pyTooling/Actions](https://github.com/pytooling/actions) from 1.0.1 to 1.0.5.
- [Release notes](https://github.com/pytooling/actions/releases)
- [Changelog](https://github.com/pyTooling/Actions/blob/main/doc/Releases.rst)
- [Commits](60281e01e2...e9d0dc3dba)

---
updated-dependencies:
- dependency-name: pyTooling/Actions
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
2024-05-01 12:38:23 -04:00
dependabot[bot]
1c20782198 Bump actions/checkout from 4.1.2 to 4.1.4 (#126)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9bb56186c3...0ad4b8fada)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-01 10:26:19 -04:00
Ian Butterworth
4b23ab708f update setup-julia to v2 in readme (#124) 2024-04-04 21:03:48 -04:00
dependabot[bot]
cc87ef305e Bump pyTooling/Actions from 0.4.6 to 1.0.1 (#117)
* Bump pyTooling/Actions from 0.4.6 to 1.0.1

Bumps [pyTooling/Actions](https://github.com/pytooling/actions) from 0.4.6 to 1.0.1.
- [Release notes](https://github.com/pytooling/actions/releases)
- [Changelog](https://github.com/pyTooling/Actions/blob/main/doc/Releases.rst)
- [Commits](adef08d3bd...60281e01e2)

---
updated-dependencies:
- dependency-name: pyTooling/Actions
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply suggestions from code review

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
2024-04-04 20:56:26 -04:00
dependabot[bot]
c36389738b Bump actions/checkout from 4.1.1 to 4.1.2 (#118)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](b4ffde65f4...9bb56186c3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-04 20:04:17 -04:00
dependabot[bot]
1b0706c0c7 Bump julia-actions/setup-julia from 1 to 2 (#116)
Bumps [julia-actions/setup-julia](https://github.com/julia-actions/setup-julia) from 1 to 2.
- [Release notes](https://github.com/julia-actions/setup-julia/releases)
- [Commits](https://github.com/julia-actions/setup-julia/compare/v1...v2)

---
updated-dependencies:
- dependency-name: julia-actions/setup-julia
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-04 19:47:11 -04:00
Ian Butterworth
8b63b4a15d Update actions/cache to v3.3.3 (#121) 2024-04-04 19:46:22 -04:00
Dilum Aluthge
0413f3b1ae Only run Dependabot once per month, but increase the PR limit (#115) 2024-04-03 11:00:28 -04:00
Mosè Giordano
e8521d4bd2 More accurate info about GitHub cache retion policy (#111) 2024-02-01 07:30:48 -05:00
Rik Huijzer
b1b004ffca Mention why the extra permissions are required (#108) 2024-01-20 11:35:32 -05:00
4 changed files with 24 additions and 24 deletions

View File

@@ -1,9 +1,10 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: "github-actions"
# Keep dependencies for GitHub Actions up-to-date directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule: schedule:
interval: 'daily' interval: "monthly"
open-pull-requests-limit: 99
labels:
- "dependencies"
- "github-actions"

View File

@@ -59,13 +59,13 @@ jobs:
env: env:
JULIA_DEPOT_PATH: /tmp/julia-depot JULIA_DEPOT_PATH: /tmp/julia-depot
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- name: Set cache-name - name: Set cache-name
id: cache-name id: cache-name
shell: bash shell: bash
run: | run: |
echo "cache-name=${{ needs.generate-prefix.outputs.cache-prefix }}-${{ github.job }}" >>"$GITHUB_OUTPUT" echo "cache-name=${{ needs.generate-prefix.outputs.cache-prefix }}-${{ github.job }}" >>"$GITHUB_OUTPUT"
- uses: julia-actions/setup-julia@v1 - uses: julia-actions/setup-julia@v2
with: with:
version: ${{ matrix.version }} version: ${{ matrix.version }}
- name: Save cache - name: Save cache
@@ -117,8 +117,8 @@ jobs:
env: env:
JULIA_DEPOT_PATH: /tmp/julia-depot JULIA_DEPOT_PATH: /tmp/julia-depot
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- uses: julia-actions/setup-julia@v1 - uses: julia-actions/setup-julia@v2
with: with:
version: ${{ matrix.version }} version: ${{ matrix.version }}
- name: Restore cache - name: Restore cache
@@ -161,7 +161,7 @@ jobs:
outputs: outputs:
cache-name: ${{ steps.cache-name.outputs.cache-name }} cache-name: ${{ steps.cache-name.outputs.cache-name }}
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- name: Set cache-name - name: Set cache-name
id: cache-name id: cache-name
run: | run: |
@@ -193,7 +193,7 @@ jobs:
needs: test-save-nomatrix needs: test-save-nomatrix
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- name: Restore cache - name: Restore cache
id: cache id: cache
uses: ./ uses: ./
@@ -233,7 +233,7 @@ jobs:
outputs: outputs:
cache-name: ${{ steps.cache-name.outputs.cache-name }} cache-name: ${{ steps.cache-name.outputs.cache-name }}
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- name: Set cache-name - name: Set cache-name
id: cache-name id: cache-name
run: | run: |
@@ -259,7 +259,7 @@ jobs:
needs: test-save-cloned-registry needs: test-save-cloned-registry
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- name: Add General registry clone - name: Add General registry clone
shell: julia --color=yes {0} shell: julia --color=yes {0}
run: | run: |

View File

@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1 - uses: julia-actions/setup-julia@v2
- uses: julia-actions/cache@v1 - uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-runtest@v1
@@ -47,7 +47,6 @@ This action uses [`jq`](https://github.com/jqlang/jq) to parse JSON.
- `cache-compiled` - Whether to cache the depot's `compiled` directory. Defaults to `true`. - `cache-compiled` - Whether to cache the depot's `compiled` directory. Defaults to `true`.
- `cache-scratchspaces` - Whether to cache the depot's `scratchspaces` directory. Defaults to `true`. - `cache-scratchspaces` - Whether to cache the depot's `scratchspaces` directory. Defaults to `true`.
- `cache-logs` - Whether to cache the depot's `logs` directory. Defaults to `true`. Helps auto-`Pkg.gc()` keep the cache small. - `cache-logs` - Whether to cache the depot's `logs` directory. Defaults to `true`. Helps auto-`Pkg.gc()` keep the cache small.
- `save-always` - Whether to save the cache even when the job fails. Defaults to `true`. This is useful as the Julia depot should mostly be reusable from a failing job.
- `delete-old-caches` - Whether to delete old caches for the given key. Defaults to `true`. - `delete-old-caches` - Whether to delete old caches for the given key. Defaults to `true`.
- `token` - A [GitHub PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). Defaults to `github.token`. Requires `repo` scope to enable the deletion of old caches. - `token` - A [GitHub PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). Defaults to `github.token`. Requires `repo` scope to enable the deletion of old caches.
@@ -63,6 +62,10 @@ This cached file is then restored upon the second run, and afterwards resaved un
The benefit of caching is that downloading one big file is quicker than downloading many different files from many different locations The benefit of caching is that downloading one big file is quicker than downloading many different files from many different locations
and precompiling them. and precompiling them.
By default, this action removes caches that were previously made by jobs on the same branch with the same restore key.
GitHub automatically removes old caches after a certain period or when the repository cache allocation is full.
It is, however, more efficient to explicitly remove old caches to improve caching for less frequently run jobs.
### Cache keys ### Cache keys
The cache key that the cache will be saved as is based on: The cache key that the cache will be saved as is based on:
@@ -84,7 +87,7 @@ This action automatically deletes old caches that match the first 4 fields of th
- The `runner.os` (may be in the matrix too, but included for safety) - The `runner.os` (may be in the matrix too, but included for safety)
Which means your caches files will not grow needlessly. GitHub also deletes cache files after Which means your caches files will not grow needlessly. GitHub also deletes cache files after
[90 days which can be increased in private repos to up to 400 days](https://docs.github.com/en/organizations/managing-organization-settings/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization) [7 days of not being accessed](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy), and there is a limit of 10 GB for the total size of cache files associated to each repository.
> [!NOTE] > [!NOTE]
> To allow deletion of caches you will likely need to [grant the following permissions](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) > To allow deletion of caches you will likely need to [grant the following permissions](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)

View File

@@ -36,9 +36,6 @@ inputs:
cache-logs: cache-logs:
description: Whether to cache the depot's `logs` directory. This helps automatic `Pkg.gc()` keep the cache size down. description: Whether to cache the depot's `logs` directory. This helps automatic `Pkg.gc()` keep the cache size down.
default: 'true' default: 'true'
save-always:
description: Whether to save the cache even when the job fails. This is useful as the Julia depot should mostly be reusable from a failing job.
default: 'true'
delete-old-caches: delete-old-caches:
description: Whether to delete old caches for the given key. description: Whether to delete old caches for the given key.
default: 'true' default: 'true'
@@ -55,7 +52,7 @@ runs:
using: 'composite' using: 'composite'
steps: steps:
- name: Install jq - name: Install jq
uses: dcarbone/install-jq-action@8867ddb4788346d7c22b72ea2e2ffe4d514c7bcb # v2.1.0 uses: dcarbone/install-jq-action@8867ddb4788346d7c22b72ea2e2ffe4d514c7bcb
with: with:
force: false # Skip install when an existing `jq` is present force: false # Skip install when an existing `jq` is present
@@ -126,7 +123,6 @@ runs:
key: ${{ steps.keys.outputs.key }} key: ${{ steps.keys.outputs.key }}
restore-keys: ${{ steps.keys.outputs.restore-key }} restore-keys: ${{ steps.keys.outputs.restore-key }}
enableCrossOsArchive: false enableCrossOsArchive: false
save-always: ${{ inputs.save-always }}
# if it wasn't restored make the depot anyway as a signal that this action ran # if it wasn't restored make the depot anyway as a signal that this action ran
# for other julia actions to check, like https://github.com/julia-actions/julia-buildpkg/pull/41 # for other julia actions to check, like https://github.com/julia-actions/julia-buildpkg/pull/41
@@ -140,7 +136,7 @@ runs:
# that match the restore key just before saving the new cache # that match the restore key just before saving the new cache
# Not windows # Not windows
- uses: pyTooling/Actions/with-post-step@adef08d3bdef092282614f3b683897cefae82ee3 - uses: pyTooling/Actions/with-post-step@e9d0dc3dba9fda45f195946858708f60c0240caf # v1.0.5
if: ${{ inputs.delete-old-caches != 'false' && runner.OS != 'Windows' }} if: ${{ inputs.delete-old-caches != 'false' && runner.OS != 'Windows' }}
with: with:
# seems like there has to be a `main` step in this action. Could list caches for info if we wanted # seems like there has to be a `main` step in this action. Could list caches for info if we wanted
@@ -151,7 +147,7 @@ runs:
GH_TOKEN: ${{ inputs.token }} GH_TOKEN: ${{ inputs.token }}
# Windows (because this action uses command prompt on windows) # Windows (because this action uses command prompt on windows)
- uses: pyTooling/Actions/with-post-step@adef08d3bdef092282614f3b683897cefae82ee3 - uses: pyTooling/Actions/with-post-step@e9d0dc3dba9fda45f195946858708f60c0240caf # v1.0.5
if: ${{ inputs.delete-old-caches != 'false' && runner.OS == 'Windows' }} if: ${{ inputs.delete-old-caches != 'false' && runner.OS == 'Windows' }}
with: with:
main: echo "" main: echo ""