Last active
June 1, 2023 12:39
-
-
Save mvaisakh/00dabd658876056012cfb7fe9e7901f7 to your computer and use it in GitHub Desktop.
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
name: Kernel Build CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: toolchain | |
run: git clone --depth=1 https://github.com/mvaisakh/gcc-arm64 ~/tc/gcc64 && git clone --depth=1 https://github.com/mvaisakh/gcc-arm ~/tc/gcc32 | |
- name: Set date | |
id: get-date | |
run: | # generate date for kernel | |
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime | |
echo "date=$(/bin/date -u '+%d%m%Y%I%M')" >> $GITHUB_ENV | |
- name: configure | |
run: make O=out ARCH=arm64 defconfig # Edit your defconfig here | |
- name: make | |
run: make O=out ARCH=arm64 CROSS_COMPILE=~/tc/gcc64/bin/aarch64-elf- CROSS_COMPILE_ARM32=~/tc/gcc32/bin/arm-eabi- -j$(nproc --all) | |
- name: Kernel Image | |
run: cp out/arch/arm64/boot/Image.gz-dtb kernel-${{ env.date }}.gz | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ env.date }} | |
draft: true | |
prerelease: true | |
- name: Upload Release Asset # This will upload the compiled kernel gzip to your releases page | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./kernel-${{ env.date }}.gz | |
asset_name: kernel-${{ env.date }}.gz | |
asset_content_type: application/gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment