git: Fix rpm ccache (#2355)

<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->

### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->

### Implementation description
<!-- Explain what you did to correct the problem -->

### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->

### Additional things
<!-- Anything else you would like to say -->

Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
Jonathan Wright 2025-07-25 11:20:43 -05:00 committed by GitHub
parent 366c631e26
commit 78a449d6d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 11 deletions

View File

@ -1043,20 +1043,19 @@ jobs:
- name: 🟩 Copy spec file to build root - name: 🟩 Copy spec file to build root
run: mv $GITHUB_WORKSPACE/ImHex/dist/rpm/imhex.spec $GITHUB_WORKSPACE/imhex.spec run: mv $GITHUB_WORKSPACE/ImHex/dist/rpm/imhex.spec $GITHUB_WORKSPACE/imhex.spec
- name: 📜 Enable ccache for mock
run: |
cat <<EOT > $GITHUB_WORKSPACE/mock.cfg
include('${{ matrix.mock_config }}-x86_64.cfg')
config_opts['plugin_conf']['ccache_enable'] = True
config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '1G'
config_opts['plugin_conf']['ccache_opts']['compress'] = True
config_opts['plugin_conf']['ccache_opts']['dir'] = "${{ github.workspace }}/.ccache"
EOT
# Fedora cmake build (in imhex.spec) # Fedora cmake build (in imhex.spec)
- name: 📦 Build RPM - name: 📦 Build RPM
run: | run: |
mock -r $GITHUB_WORKSPACE/mock.cfg --enable-network -N -v --spec $GITHUB_WORKSPACE/imhex.spec --sources $GITHUB_WORKSPACE --resultdir $GITHUB_WORKSPACE/results mock -r ${{ matrix.mock_config }}-x86_64 \
--define 'debug_package %{nil}' \
--enable-network -N -v \
--enable-plugin=ccache \
--plugin-option=ccache:compress=True \
--plugin-option=ccache:max_cache_size=1G \
--plugin-option=ccache:dir=$GITHUB_WORKSPACE/.ccache \
--spec $GITHUB_WORKSPACE/imhex.spec \
--sources $GITHUB_WORKSPACE \
--resultdir $GITHUB_WORKSPACE/results
- name: 🟩 Move and rename finished RPM - name: 🟩 Move and rename finished RPM
run: | run: |