Skip to content

Commit

Permalink
ci: cache dub packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kucaahbe committed Jan 20, 2024
1 parent 65c6dd7 commit 10015f4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,19 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}

- name: 'Restore dub packages cache'
id: dub-packages-restore
uses: actions/cache/restore@v4
with:
path: |
~/.dub
key: dub-packages-${{ matrix.os }}-${{ matrix.dc }}-${{ hashFiles('dub.selections.json') }}

- name: 'dub build/lint/test'
run: |
dub_configuration=application
Expand All @@ -66,6 +75,13 @@ jobs:
dub lint --compiler=$DC --config=$dub_configuration # --verbose
dub test --compiler=$DC --config=$dub_configuration # --verbose
- name: 'Cache dub packages'
uses: actions/cache/save@v4
with:
path: |
~/.dub
key: ${{ steps.dub-packages-restore.outputs.cache-primary-key }}

- name: 'Upload binary'
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 10015f4

Please sign in to comment.