Magisk/.github/actions/setup/action.yml

95 lines
2.4 KiB
YAML
Raw Normal View History

2024-01-29 09:36:51 +00:00
name: Magisk Setup
inputs:
is-asset-build:
required: false
default: false
2024-01-29 09:36:51 +00:00
runs:
using: "composite"
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: "3.x"
2024-08-21 23:51:30 +00:00
- name: Install GNU make
2024-08-14 22:24:05 +00:00
if: runner.os == 'macOS'
shell: bash
run: |
brew install make
echo 'GNUMAKE=gmake' >> "$GITHUB_ENV"
2024-08-21 23:51:30 +00:00
- name: Cache sccache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.sccache
key: sccache-${{ runner.os }}-${{ github.sha }}
restore-keys: sccache-${{ runner.os }}-
- name: Set up sccache
shell: bash
env:
SCCACHE_DIRECT: false
SCCACHE_DIR: ${{ github.workspace }}/.sccache
SCCACHE_CACHE_SIZE: 2G
SCCACHE_IDLE_TIMEOUT: 0
run: |
bash $GITHUB_ACTION_PATH/sccache.sh
sccache --start-server
sccache -z
- name: Show sccache stats
uses: gacts/run-and-post-run@v1
with:
run: sccache -s
post: sccache -s
2024-01-29 09:36:51 +00:00
- name: Cache Gradle dependencies
2024-01-29 09:53:09 +00:00
uses: actions/cache@v4
if: inputs.is-asset-build == 'true'
2024-01-29 09:36:51 +00:00
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: gradle-cache-${{ hashFiles('gradle/**') }}
restore-keys: gradle-cache-
2024-01-29 09:36:51 +00:00
- name: Restore Gradle dependencies
uses: actions/cache/restore@v4
if: inputs.is-asset-build == 'false'
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: gradle-cache-${{ hashFiles('gradle/**') }}
restore-keys: gradle-cache-
- name: Cache Gradle build cache
2024-01-29 09:53:09 +00:00
uses: actions/cache@v4
if: inputs.is-asset-build == 'true'
with:
path: |
~/.gradle/caches/build-cache-*
key: gradle-build-cache-${{ github.sha }}
restore-keys: gradle-build-cache-
- name: Restore Gradle build cache
uses: actions/cache/restore@v4
if: inputs.is-asset-build == 'false'
2024-01-29 09:36:51 +00:00
with:
path: |
~/.gradle/caches/build-cache-*
key: gradle-build-cache-${{ github.sha }}
restore-keys: gradle-build-cache-
2024-01-29 09:36:51 +00:00
- name: Set up NDK
shell: bash
2024-08-21 23:51:30 +00:00
run: python build.py -v ndk