Skip to content

Commit

Permalink
Create inline.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
whyakari authored Oct 27, 2024
1 parent d9db3d4 commit 64b146a
Showing 1 changed file with 110 additions and 0 deletions.
110 changes: 110 additions & 0 deletions .github/workflows/inline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Build Kernel bangkk (KSU/Fifteen/Inline)

on:
workflow_dispatch:

env:
TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }}

jobs:
ci:
runs-on: ubuntu-latest
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_HARDLINK: "true"

steps:
- name: Clone Repo Kernel
uses: MoeKernel/[email protected]
with:
depth: 1
branch: 'inline'
owner: 'MoeKernel'
repository: 'android_kernel_motorola_bangkk'

- name: Clone Repo Build
uses: MoeKernel/[email protected]
with:
depth: 1
branch: 'main'
owner: 'MoeKernel'
repository: 'build'

- name: Prepare Configuration
working-directory: ./build
run: |
CONFIG_ENV=$(cat config.env | grep -w "CONFIG_ENV" | head -n 1 | cut -d "=" -f 2)
echo "ENABLE_CCACHE=$(cat $CONFIG_ENV | grep -w "ENABLE_CCACHE" | head -n 1 | cut -d "=" -f 2)" >> $GITHUB_ENV
- name: Set swap to 24G
uses: MoeKernel/swap@moe
with:
swap-size-gb: 24

- name: Clone Repo Scripts
uses: MoeKernel/[email protected]
with:
owner: 'MoeKernel'
branch: 'fifteen'
repository: 'scripts'

- name: Move Scripts
working-directory: ./scripts
run: |
chmod +x bot.py bot.sh ksu_update.sh moe.sh
cp moe.sh ksu_update.sh bot.sh bot.py build_count.txt ../android_kernel_motorola_bangkk
- name: Restore Cache
uses: MoeKernel/cache@v3
with:
path: /home/runner/tc/clang-17.0.0
key: ${{ runner.os }}-toolchain
id: tc-toolchain

- name: Github Configs
working-directory: ./android_kernel_motorola_bangkk
run: |
git config --global user.email "[email protected]"
git config --global user.name "bangkk"
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get -y --no-install-recommends install libarchive-tools cpio flex bc ccache python3 python3-pip git make bc ca-certificates git xz-utils
- name: Export Variables
working-directory: ./android_kernel_motorola_bangkk
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: Setup ccache
if: env.ENABLE_CCACHE == 'true'
uses: MoeKernel/ccache@moe
with:
key: buildd-kernel
max-size: 12G

- name: Compile Kernel CI
working-directory: ./android_kernel_motorola_bangkk
run: |
./bot.sh
- name: Move CI Build
working-directory: ./android_kernel_motorola_bangkk
run: |
cp build_count.txt ../scripts
- name: Commit Update
working-directory: ./scripts
run: |
git config --global user.email "[email protected]"
git config --global user.name "Akari"
git remote set-url origin https://${{ secrets.TOKEN_GITHUB }}@github.com/MoeKernel/scripts.git
git add build_count.txt
git commit -m "update build count"
git push origin fifteen -f

0 comments on commit 64b146a

Please sign in to comment.