name: build kernel sw64
on:
  push:
  pull_request:
  workflow_dispatch:

env:
  KBUILD_BUILD_USER: deepin-kernel-sig
  KBUILD_BUILD_HOST: deepin-kernel-builder
  email: support@deepin.org

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  pull-requests: read

jobs:
  build-kernel-sw6b:
    runs-on: [self-hosted, linux, x64]
    steps:
      - uses: actions/checkout@v6
      - name: "Install Deps"
        run: |
          git config --global user.email $email
          git config --global user.name $KBUILD_BUILD_USER

      - name: "Compile kernel"
        run: |
          # .config
          time swmk1230 xuelang_defconfig
          time swmk1230 -j`nproc`

  build-kernel-sw8a:
    runs-on: [self-hosted, linux, x64]
    steps:
      - uses: actions/checkout@v6
      - name: "Install Deps"
        run: |
          git config --global user.email $email
          git config --global user.name $KBUILD_BUILD_USER

      - name: "Compile kernel"
        run: |
          # .config
          time swmk8a1230 junzhang_defconfig
          time swmk8a1230 -j`nproc`