Skip to content

REVYOS: ci: add cross/native build #497

REVYOS: ci: add cross/native build

REVYOS: ci: add cross/native build #497

Workflow file for this run

name: upstream-native-kernel
on:
push:
pull_request:
workflow_dispatch:
env:
wget_alias: 'wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0'
ARCH: riscv
KBUILD_BUILD_USER: builder
KBUILD_BUILD_HOST: revyos-riscv-builder
KDEB_COMPRESS: xz
KDEB_CHANGELOG_DIST: unstable
TZ: Asia/Shanghai
jobs:
kernel:
strategy:
fail-fast: false
matrix:
include:
- name: native
cross: riscv64-linux-gnu-
machine: [ self-hosted, Linux, riscv64 ]
run_image: ghcr.io/revyos/revyos-kernel-builder:debian-trixie-2025.12.16
board: revyos
compiler: riscv64-linux-gnu-gcc-14
runs-on: ${{ matrix.machine }}
container:
image: ${{ matrix.run_image }}
env:
CROSS_COMPILE: ${{ matrix.cross }}
board: ${{ matrix.board }}
compiler: ${{ matrix.compiler }}
steps:
- name: Checkout kernel
uses: actions/checkout@v6
with:
path: 'kernel'
- name: Compile Kernel && Install
run: |
mkdir -p output
${CROSS_COMPILE}gcc -v
pushd kernel
export KDEB_PKGVERSION="$(make kernelversion)-$(date "+%Y.%m.%d.%H.%M")+$(git rev-parse --short HEAD)"
export RUST_LIB_SRC=/usr/src/rustc-$(rustc --version | cut -d' ' -f2)/library
make CC="${compiler}" debian_defconfig
make CC="${compiler}" -j$(nproc) bindeb-pkg LOCALVERSION="-${board}"
# Copy deb
sudo dcmd cp -v ../*.changes ${GITHUB_WORKSPACE}/output
# record commit-id
git rev-parse HEAD > kernel-commitid
sudo cp -v kernel-commitid ${GITHUB_WORKSPACE}/output
popd
- name: 'Upload Artifact'
uses: actions/upload-artifact@v7
with:
name: kernel-${{ matrix.name }}-${{ matrix.board }}
path: output/*
retention-days: 30