Skip to content

Commit

Permalink
CI: Android Caching Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Holden committed Jan 23, 2025
1 parent d829048 commit 3990127
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@ runs:
sudo make install
- name: Setup sccache (Windows)
if: runner.os == 'Windows'
if: runner.os == 'Windows' && inputs.target != 'android'
uses: mozilla-actions/[email protected]

- run: echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
if: runner.os == 'Windows'
if: runner.os == 'Windows' && inputs.target != 'android'
shell: bash

- name: Setup Build Cache
uses: hendrikmuhs/ccache-action@main
with:
create-symlink: ${{ runner.os != 'Windows' }}
variant: ${{ runner.os == 'Windows' && 'sccache' || 'ccache' }}
key: ${{ inputs.host }}-ccache-${{ inputs.target }}-${{ inputs.build-type }}
variant: ${{ runner.os == 'Windows' && inputs.target != 'android' && 'sccache' || 'ccache' }}
key: ${{ inputs.host }}-${{ inputs.target }}-${{ inputs.build-type }}
restore-keys: |
${{ inputs.host }}-ccache-${{ inputs.target }}
${{ inputs.host }}-ccache-
${{ inputs.host }}-${{ inputs.target }}
${{ inputs.host }}-
max-size: 1G
verbose: 1
evict-old-files: job
Expand All @@ -62,7 +62,7 @@ runs:
shell: bash

- name: Cache CPM Modules
if: (inputs.cpm-modules != '')
if: inputs.cpm-modules != ''
uses: actions/cache@v4
with:
path: ${{ inputs.cpm-modules }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/qt-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ runs:
uses: ./.github/actions/cache
with:
host: ${{ inputs.host }}
target: ${{ inputs.arch }}
target: android
build-type: ${{ matrix.BuildType }}
cpm-modules: ${{ inputs.cpm-cache }}

Expand Down
4 changes: 2 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ org.gradle.parallel=true
# Gradle caching allows reusing the build artifacts from a previous
# build with the same inputs. However, over time, the cache size will
# grow. Uncomment the following line to enable it.
# org.gradle.caching=true
# org.gradle.configuration-cache=true
org.gradle.caching=true
org.gradle.configuration-cache=true

# Allow AndroidX usage
android.useAndroidX=true

0 comments on commit 3990127

Please sign in to comment.