|
| 1 | +name: th1520-upstream-native-kernel |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +env: |
| 9 | + wget_alias: 'wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0' |
| 10 | + ARCH: riscv |
| 11 | + board: th1520 |
| 12 | + KBUILD_BUILD_USER: builder |
| 13 | + KBUILD_BUILD_HOST: revyos-riscv-builder |
| 14 | + KDEB_COMPRESS: xz |
| 15 | + KDEB_CHANGELOG_DIST: unstable |
| 16 | + |
| 17 | +jobs: |
| 18 | + kernel: |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + matrix: |
| 22 | + include: |
| 23 | + - name: native |
| 24 | + cross: riscv64-linux-gnu- |
| 25 | + machine: [ self-hosted, Linux, riscv64 ] |
| 26 | + run_image: ghcr.io/revyos/revyos-kernel-builder:riscv64-2025.12.04-plucky |
| 27 | + compiler: riscv64-linux-gnu-gcc-14 |
| 28 | + |
| 29 | + runs-on: ${{ matrix.machine }} |
| 30 | + container: |
| 31 | + image: ${{ matrix.run_image }} |
| 32 | + env: |
| 33 | + CROSS_COMPILE: ${{ matrix.cross }} |
| 34 | + compiler: ${{ matrix.compiler }} |
| 35 | + |
| 36 | + steps: |
| 37 | + - name: Checkout kernel |
| 38 | + uses: actions/checkout@v4 |
| 39 | + with: |
| 40 | + path: 'kernel' |
| 41 | + |
| 42 | + - name: Compile Kernel && Install |
| 43 | + run: | |
| 44 | + mkdir -p output |
| 45 | + pushd kernel |
| 46 | + export KDEB_PKGVERSION="$(make kernelversion)-$(date "+%Y.%m.%d.%H.%M")+$(git rev-parse --short HEAD)" |
| 47 | + make CC="${compiler}" revyos_defconfig |
| 48 | + make CC="${compiler}" -j$(nproc) bindeb-pkg LOCALVERSION="-${board}" |
| 49 | + make CC="${compiler}" -j$(nproc) dtbs |
| 50 | +
|
| 51 | + # Copy deb |
| 52 | + sudo dcmd cp -v ../*.changes ${GITHUB_WORKSPACE}/output |
| 53 | +
|
| 54 | + # record commit-id |
| 55 | + git rev-parse HEAD > kernel-commitid |
| 56 | + sudo cp -v kernel-commitid ${GITHUB_WORKSPACE}/output |
| 57 | + popd |
| 58 | +
|
| 59 | + - name: 'Upload Artifact' |
| 60 | + uses: actions/upload-artifact@v4 |
| 61 | + with: |
| 62 | + name: xuantie-mainline-kernel-${{ matrix.name }} |
| 63 | + path: output/* |
| 64 | + retention-days: 30 |
0 commit comments