Skip to content

Build Kernel Matrix (NO-KSU/KSU) #37

Build Kernel Matrix (NO-KSU/KSU)

Build Kernel Matrix (NO-KSU/KSU) #37

Workflow file for this run

name: Build Kernel (NO-KSU/KSU)
on:
workflow_dispatch
jobs:
build_kernel:
name: Build Kernel
runs-on: ubuntu-latest
strategy:
matrix:
build_type: ['KSU', 'NO-KSU']
steps:
- name: Clone Repo Android Kernel
uses: MoeKernel/[email protected]
with:
depth: 1
branch: ${{ matrix.build_type == 'KSU' && 'fourteen' || matrix.build_type == 'NO-KSU' && 'without-ksu' }}
owner: 'MoeKernel'
repository: 'android_kernel_xiaomi_ginkgo'
- name: Clone Repo Scripts
uses: MoeKernel/[email protected]
with:
branch: ${{ matrix.build_type == 'KSU' && 'ksu' || matrix.build_type == 'NO-KSU' && 'without-ksu' }}
owner: 'MoeKernel'
repository: 'scripts'
- name: Restore Cache
uses: MoeKernel/cache@v3
with:
path: /home/runner/tc
key: ${{ runner.os }}-tc
id: tc-cache
- name: Move Scripts
working-directory: ./scripts
run: |
chmod +x ksu_update.sh bot.py
cp ksu_update.sh build_count.txt bot.py ../android_kernel_xiaomi_ginkgo
- name: Github Configs
working-directory: ./android_kernel_xiaomi_ginkgo
run: |
git config --global user.email "[email protected]"
git config --global user.name "ginkgo"
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install python3 python3-pip git make gcc bc bison flex libssl-dev ccache libelf-dev libncurses-dev bc binutils-dev ca-certificates clang cmake curl file flex git libelf-dev libssl-dev lld make ninja-build python3-dev texinfo u-boot-tools xz-utils zlib1g-dev
- name: Pip Install Packages
working-directory: ./android_kernel_xiaomi_ginkgo
run: |
pip install Pyrogram TgCrypto load_dotenv
- name: Export Variables
run: |
echo "CHAT_ID=${{ secrets.CHAT_ID }}" >> .env
echo "API_ID=${{ secrets.API_ID }}" >> .env
echo "API_HASH=${{ secrets.API_HASH }}" >> .env
echo "BOT_TOKEN=${{ secrets.BOT_TOKEN }}" >> .env
- name: Compile Kernel CI
working-directory: ./android_kernel_xiaomi_ginkgo
run: |
python3 bot.py -t dev # or release
- name: Move CI Build Count
working-directory: ./android_kernel_xiaomi_ginkgo
run: |
cp build_count.txt ../scripts
- name: Commit Update
working-directory: ./scripts
run: |
git add build_count.txt
git commit -m "update build count"
git push origin ${{ matrix.build_type == 'KSU' && 'ksu' || matrix.build_type == 'NO-KSU' && 'without-ksu' }} --force