Skip to content

star64-riscv-kernel-build #10

star64-riscv-kernel-build

star64-riscv-kernel-build #10

Workflow file for this run

name: pine64-riscv-kernel-build
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 2 * * *"
env:
ARCH: riscv
KBUILD_BUILD_USER: debian-riscv-pine64
KBUILD_BUILD_HOST: debian-riscv-pine64-builder
KDEB_COMPRESS: xz
KDEB_CHANGELOG_DIST: unstable
CROSS_COMPILE: riscv64-linux-gnu-
jobs:
kernel:
strategy:
fail-fast: false
matrix:
board: [star64, pinetabv]
runs-on: ubuntu-22.04
steps:
- name: Install software
run: |
sudo apt update && \
sudo apt install -y gdisk dosfstools g++-12-riscv64-linux-gnu build-essential \
libncurses-dev gawk flex bison openssl libssl-dev tree \
dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf device-tree-compiler \
devscripts
sudo update-alternatives --install \
/usr/bin/riscv64-linux-gnu-gcc riscv64-gcc /usr/bin/riscv64-linux-gnu-gcc-12 10
sudo update-alternatives --install \
/usr/bin/riscv64-linux-gnu-g++ riscv64-g++ /usr/bin/riscv64-linux-gnu-g++-12 10
- name: Checkout kernel
uses: actions/checkout@v4
with:
path: 'kernel'
- name: Compile Kernel && Install
run: |
mkdir -p rootfs
pushd kernel
make pine64_${{ matrix.board }}_defconfig
export KDEB_PKGVERSION="$(date "+%Y.%m.%d.%H.%M")+$(git rev-parse --short HEAD)"
sed -i '/CONFIG_LOCALVERSION_AUTO/d' .config && echo "CONFIG_LOCALVERSION_AUTO=n" >> .config
make -j$(nproc) bindeb-pkg LOCALVERSION="-${{ matrix.board }}"
# make -j$(nproc) dtbs
# Copy deb
sudo dcmd cp -v ../*.changes ${GITHUB_WORKSPACE}/rootfs/
# record commit-id
git rev-parse HEAD > ${{ matrix.board }}-kernel-commitid
sudo cp -v ${{ matrix.board }}-kernel-commitid ${GITHUB_WORKSPACE}/rootfs/
ls -al ${GITHUB_WORKSPACE}/rootfs/
popd
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: pine64-riscv-kernel-${{ matrix.board }}
path: rootfs/*
retention-days: 60