Build other for Droidian #9
This file contains hidden or 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
| # This is a basic workflow to help you get started with Actions | |
| name: Build other for Droidian | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the "master" branch | |
| push: | |
| tags: | |
| - '*' | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| build: | |
| name: Build other for Droidian | |
| runs-on: ubuntu-latest | |
| container: quay.io/droidian/build-essential:current-amd64 | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: melt-rebase | |
| - name: Update & install dependencies | |
| run: | | |
| apt update | |
| apt install zip curl git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison build-essential dpkg-dev findutils android-platform-prebuilts-python-linux-x86-2.7.5 bc rsync kmod cpio bison flex libssl-dev binutils-aarch64-linux-gnu lz4 clang-android-12.0-r416183b -y | |
| mkdir -p /android-kernel/ | |
| git clone https://android.googlesource.com/kernel/build -b android-12.1.0_r0.40 /android-kernel/build | |
| - name: Patch kernel | |
| run: | | |
| curl https://github.com/Halhadus/android_kernel_xiaomi_marble/compare/melt-rebase...Pzqqt:android_kernel_xiaomi_marble:melt-rebase-hyperos.patch | git apply --check --ignore-space-change --ignore-whitespace | |
| curl https://github.com/Halhadus/android_kernel_xiaomi_marble/compare/melt-rebase...Pzqqt:android_kernel_xiaomi_marble:melt-rebase-hyperos.patch | git apply --ignore-space-change --ignore-whitespace | |
| git apply --check --ignore-space-change --ignore-whitespace <./lxcbuild/lxc_support.diff | |
| git apply --ignore-space-change --ignore-whitespace <./lxcbuild/lxc_support.diff | |
| cp ./lxcbuild/stock_gki_defconfig arch/arm64/configs/ | |
| git apply --check --ignore-space-change --ignore-whitespace <./debian/droidian.diff | |
| git apply --ignore-space-change --ignore-whitespace <./debian/droidian.diff | |
| patch --ignore-whitespace -p1 <./debian/goodix.diff | |
| - name: Build other for Droidian | |
| run: | | |
| export PATH=/opt/android/prebuilts/python/2.7.5/bin:$PATH | |
| ./build_lxc.sh | |
| cd /outmelt | |
| zip -r melt-other-droidian.zip . | |
| - name: Move package to out directory | |
| run: | | |
| mkdir /out | |
| cp /outmelt/melt-other-droidian.zip /out/ | |
| ls /out | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kernel-other-droidian | |
| path: /out/melt-other-droidian.zip | |
| if-no-files-found: error | |
| retention-days: 1 | |
| prepare: | |
| runs-on: ubuntu-latest | |
| name: Create GitHub release | |
| needs: build | |
| steps: | |
| - name: Delete old latest-other-droidian release | |
| uses: dev-drprasad/[email protected] | |
| with: | |
| delete_release: true | |
| tag_name: latest-other-droidian | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Tag latest-other-droidian | |
| uses: tvdias/[email protected] | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: latest-other-droidian | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: prepare | |
| name: Publish kernel-other-droidian release | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: out | |
| - name: Create latest-other-droidian release | |
| uses: softprops/[email protected] | |
| with: | |
| files: out/kernel-other-droidian/* | |
| tag_name: latest-other-droidian | |
| draft: false | |
| prerelease: false | |