This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
turnip-android-build #144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: turnip-android-build | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'select branch to build(default: main)' | |
required: false | |
default: 'main' | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
start_building_turnip: | |
permissions: | |
contents: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: { ref: main } | |
- name: Prepare environment | |
run: | | |
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list | |
sudo apt update | |
sudo apt build-dep mesa -y | |
sudo sed -i 's/jammy/mantic/g' /etc/apt/sources.list | |
sudo apt update | |
sudo apt install meson ccache -y | |
- name: Download suyu source code | |
run: | | |
mkdir -p ${{ github.workspace }}/turnip_workdir | |
cd ${{ github.workspace }}/turnip_workdir | |
git clone --branch ${{ github.event.inputs.branch || 'main'}} https://gitlab.freedesktop.org/mesa/mesa.git | |
- id: version | |
name: Get date | |
run: | | |
cd ${{ github.workspace }}/turnip_workdir/mesa | |
echo "date=$(date -u "+%Y%m%d")" >> $GITHUB_OUTPUT | |
echo "hash=$(git log -1 --pretty=format:%H)" >> $GITHUB_OUTPUT | |
echo "tag=$(git describe --tags --always)" >> $GITHUB_OUTPUT | |
- name: Set up cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.cache | |
key: ${{ runner.os }}-turnip-${{ steps.version.outputs.hash }} | |
restore-keys: | | |
${{ runner.os }}-turnip- | |
- name: Execute build script | |
run: | | |
export NDK_CCACHE="$(which ccache)" | |
ccache -sv | |
cd ${{ github.workspace }} | |
bash ./script/turnip_builder.sh ${{ github.event.inputs.branch || 'main'}} | |
ccache -sv | |
- name: Release Turnip (Mesa-Turnip-Android) | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: Mesa Turnip Android ${{ steps.version.outputs.date }} | |
tag_name: mesa-turnip-android | |
files: | | |
${{ github.workspace }}/turnip_workdir/turnip-${{ steps.version.outputs.date }}-${{ steps.version.outputs.tag }}.zip | |
- name: Release Turnip ${{ steps.version.outputs.date }} | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ steps.version.outputs.date }} | |
tag_name: ${{ steps.version.outputs.date }} | |
files: | | |
${{ github.workspace }}/turnip_workdir/turnip-${{ steps.version.outputs.date }}-${{ steps.version.outputs.tag }}.zip |