Compare commits

...

16 Commits

Author SHA1 Message Date
dependabot[bot]
edf78a706c Bump actions/cache from 3.2.5 to 3.2.6 (#54)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](6998d139dd...69d9d449ac)

---
updated-dependencies:
- dependency-name: actions/cache
  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>
2023-02-22 06:40:35 -05:00
dependabot[bot]
10913c2628 Bump actions/cache from 3.2.4 to 3.2.5 (#53)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](627f0f41f6...6998d139dd)

---
updated-dependencies:
- dependency-name: actions/cache
  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>
2023-02-10 12:07:54 +01:00
dependabot[bot]
a364403e9b Bump actions/cache from 3.2.3 to 3.2.4 (#52)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](58c146cc91...627f0f41f6)

---
updated-dependencies:
- dependency-name: actions/cache
  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>
2023-01-31 11:35:10 +01:00
Sascha Mann
b695972eeb Add test to check compiled hasn't been cached (#49) 2023-01-13 14:15:12 +01:00
dependabot[bot]
2ff65c9241 Bump actions/cache from 3.2.2 to 3.2.3 (#43)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](4723a57e26...58c146cc91)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 12:20:21 +01:00
dependabot[bot]
8618676e71 Bump actions/checkout from 3.2.0 to 3.3.0 (#41)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-06 14:55:53 +01:00
Sascha Mann
6bbc93575c Add option to cache precompilation cache (#38)
See #11
2023-01-05 18:35:07 +01:00
dependabot[bot]
a96f53eeda Bump actions/cache from 3.2.1 to 3.2.2 (#39)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](c1a5de879e...4723a57e26)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-28 08:52:36 +01:00
dependabot[bot]
bb2ad8a6dc Bump actions/checkout from 3.1.0 to 3.2.0 (#35)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](93ea575cb5...755da8c3cf)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-23 16:24:46 +01:00
dependabot[bot]
b45946153f Bump actions/cache from 3.0.11 to 3.2.1 (#37)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.11 to 3.2.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](9b0c1fce7a...c1a5de879e)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-23 02:21:40 -05:00
Sascha Mann
26bda12c02 Remove deprecated command #33 2022-10-14 17:38:48 +02:00
Sascha Mann
08f6ca9894 Remove deprecated set-output command (#32)
* Remove deprecated set-output command

See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ & https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter

* Update action.yml

Co-authored-by: Rik Huijzer <t.h.huijzer@rug.nl>

Co-authored-by: Rik Huijzer <t.h.huijzer@rug.nl>
2022-10-14 16:02:53 +02:00
dependabot[bot]
d696810071 Bump actions/cache from 3.0.10 to 3.0.11 (#31)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.10 to 3.0.11.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](56461b9eb0...9b0c1fce7a)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-14 10:55:36 +02:00
dependabot[bot]
643194b98c Bump actions/checkout from 3.0.2 to 3.1.0 (#30)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](2541b1294d...93ea575cb5)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-05 18:13:54 +02:00
dependabot[bot]
c314effe59 Bump actions/cache from 3.0.9 to 3.0.10 (#29)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.9 to 3.0.10.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](ac8075791e...56461b9eb0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-04 09:39:46 +02:00
dependabot[bot]
c38652fe18 Bump actions/cache from 3.0.8 to 3.0.9 (#28)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.8 to 3.0.9.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](fd5de65bc8...ac8075791e)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-30 14:14:34 +02:00
3 changed files with 18 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ jobs:
run: 'write("random.txt", string(rand(10)))'
- name: Set cache-name as output
id: name
run: echo "::set-output name=cache-name::${{ hashFiles('random.txt') }}"
run: echo "cache-name=${{ hashFiles('random.txt') }}" >> $GITHUB_OUTPUT
test-save:
needs: generate-key
@@ -33,7 +33,7 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- name: Save cache
id: cache
uses: ./
@@ -56,7 +56,7 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- name: Restore cache
id: cache
uses: ./
@@ -69,11 +69,16 @@ jobs:
@assert ENV["cache-hit"] == "true"
env:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
- name: Check non-empty artifacts and packages dir
- name: Check existance or emptiness of affected dirs
shell: 'julia --color=yes {0}'
run: |
# Artifacts and Packages should exist as they've been cached
artifacts_dir = joinpath(first(DEPOT_PATH), "artifacts")
@assert !isempty(readdir(artifacts_dir))
packages_dir = joinpath(first(DEPOT_PATH), "packages")
@assert !isempty(readdir(packages_dir))
# Caching the compiled dir is disabled by default and should not exist after restoring a cache
compiled_dir = joinpath(first(DEPOT_PATH), "compiled")
@assert !isdir(compiled_dir) || isempty(readdir(compiled_dir))

View File

@@ -40,6 +40,7 @@ That is why caching the registries is disabled by default.
- `cache-artifacts` - Whether to cache `~/.julia/artifacts/`. Enabled by default.
- `cache-packages` - Whether to cache `~/.julia/packages/`. Enabled by default.
- `cache-registries` - Whether to cache `~/.julia/registries/`. Disabled by default.
- `cache-compiled` - Whether to cache `~/.julia/compiled/`. Disabled by default. **USE ONLY IF YOU KNOW WHAT YOU'RE DOING!** See [#11](https://github.com/julia-actions/cache/issues/11).
### Outputs

View File

@@ -19,6 +19,9 @@ inputs:
cache-registries:
description: 'Whether to cache ~/.julia/registries/'
default: 'false'
cache-compiled:
description: 'Whether to cache ~/.julia/compiled. USE WITH CAUTION! See https://github.com/julia-actions/cache/issues/11 for caveats.'
default: 'false'
outputs:
cache-hit:
@@ -36,18 +39,20 @@ runs:
echo "PACKAGES_PATH=$P_PATH" >> $GITHUB_ENV
[ "${{ inputs.cache-registries }}" = "true" ] && R_PATH="~/.julia/registries"
echo "REGISTRIES_PATH=$R_PATH" >> $GITHUB_ENV
[ "${{ inputs.cache-compiled }}" = "true" ] && PCC_PATH="~/.julia/compiled"
echo "PRECOMPILATION_CACHE_PATH=$PCC_PATH" >> $GITHUB_ENV
shell: bash
- uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
id: cache
with:
path: "${{ format('{0}\n{1}\n{2}', env.ARTIFACTS_PATH, env.PACKAGES_PATH, env.REGISTRIES_PATH) }}"
path: "${{ format('{0}\n{1}\n{2}\n{3}', env.ARTIFACTS_PATH, env.PACKAGES_PATH, env.REGISTRIES_PATH, env.PRECOMPILATION_CACHE_PATH) }}"
key: ${{ runner.os }}-test-${{ inputs.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ inputs.cache-name }}-
- id: hit
run: echo "::set-output name=cache-hit::$(echo $CACHE_HIT)"
run: echo "cache-hit=$CACHE_HIT" >> $GITHUB_OUTPUT
env:
CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
shell: bash