Skip to content

Commit

Permalink
Add cache_cleaner for Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Jul 18, 2024
1 parent 39c71ae commit 2340fa9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/cache_cleaner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Cache clear action on PR close

on:
pull_request:
types:
- closed

jobs:
clean:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: yumemi-inc/clean-cache-action@v1
with:
ref: 'refs/pull/${{ github.event.pull_request.number }}/merge'
18 changes: 18 additions & 0 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ jobs:
key: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-

- name: Clear branch ccache storage
uses: yumemi-inc/clean-cache-action@v1
with:
ref: ${{ github.event.ref }}
key: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-

- name: Check default version
if: matrix.linuxVersion != 'bullseye'
run: |
Expand Down Expand Up @@ -167,6 +173,12 @@ jobs:
key: macOS-ccache-${{ matrix.NICE_NAME }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: macOS-ccache-${{ matrix.NICE_NAME }}

- name: Clear branch ccache storage
uses: yumemi-inc/clean-cache-action@v1
with:
ref: ${{ github.event.ref }}
key: macOS-ccache-${{ matrix.NICE_NAME }}

# Install deps
- name: Install deps
shell: bash
Expand Down Expand Up @@ -252,6 +264,12 @@ jobs:
key: ${{ runner.os }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ runner.os }}-ccache

- name: Clear branch ccache storage
uses: yumemi-inc/clean-cache-action@v1
with:
ref: ${{ github.event.ref }}
key: ${{ runner.os }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}

- name: Install TurboJPEG
shell: powershell
run: |
Expand Down
4 changes: 2 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ make -j 2
# Run it from the build directory
bin/hyperhdr -d

# BUILD INSTALLERS (recommended method to install HyperHDR)
# BUILD INSTALLERS (recommended method to install HyperHDR, doesnt work for ArchLinux: use build.sh script )
cpack
# or compile and build the package using one command
cmake --build . --target package --config Release
Expand Down Expand Up @@ -167,7 +167,7 @@ PLATFORM=rpi DOCKER_TAG=bullseye DOCKER_IMAGE=arm-64bit-aarch64 ./build.sh
Installers from Docker builds will be ready in the deploy folder
```

The `build.sh` script can also be used to natively build installers as an alternative to the method described in the previous point. Of course, then you must have all the necessary packages installed.
The `build.sh` script can also be used to natively build macOS/Windows installers as an alternative to the method described in the previous point. Of course, then you must have all the necessary packages installed.

----

Expand Down

0 comments on commit 2340fa9

Please sign in to comment.