Skip to content

Commit 4fed818

Browse files
committed
Add cache for binary packages and distfiles.
1 parent 42512ec commit 4fed818

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/run-ebuild-tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,44 @@ on:
44
push:
55
paths-ignore:
66
- 'README.md'
7+
- 'LICENSE'
78

89
jobs:
910
tests:
1011
runs-on: ubuntu-latest
1112
steps:
13+
# Check out the repository
1214
- uses: actions/checkout@master
15+
16+
# Prepare the environment
17+
- name: Prepare
18+
id: prepare
19+
run: |
20+
echo "::set-output name=datetime::$(date +"%Y%m%d%H%M")"
21+
echo "::set-output name=workspace::${GITHUB_WORKSPACE}"
22+
mkdir -p "${GITHUB_WORKSPACE}/distfiles" "${GITHUB_WORKSPACE}/binpkgs"
23+
24+
# Cache distfiles and binary packages
25+
- name: Cache distfiles
26+
id: cache-distfiles
27+
uses: gerbal/[email protected]
28+
with:
29+
path: ${{ steps.prepare.outputs.workspace }}/distfiles
30+
key: distfiles-${{ steps.prepare.outputs.datetime }}
31+
restore-keys: |
32+
distfiles-${{ steps.prepare.outputs.datetime }}
33+
distfiles
34+
- name: Cache binpkgs
35+
id: cache-binpkgs
36+
uses: gerbal/[email protected]
37+
with:
38+
path: ${{ steps.prepare.outputs.workspace }}/binpkgs
39+
key: binpkgs-${{ steps.prepare.outputs.datetime }}
40+
restore-keys: |
41+
binpkgs-${{ steps.prepare.outputs.datetime }}
42+
binpkgs
43+
44+
# Run the ebuild tests
1345
- uses: hacking-gentoo/action-ebuild-test@master
1446
env:
1547
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)