update to riscv-kernel-6.11.18 #62
This file contains 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 CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
# manual trigger | |
schedule: | |
- cron: '0 6,14,22 * * *' | |
env: | |
IS_LTS: NO | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: archlinux/archlinux:base-devel | |
outputs: | |
current_version: ${{ steps.out.outputs.current_version }} | |
release_version: ${{ steps.out.outputs.release_version }} | |
clang_version: ${{ steps.out.outputs.clang_version }} | |
rebuild_flag: ${{ steps.out.outputs.rebuild_flag }} | |
strategy: | |
matrix: | |
include: | |
- arch: riscv | |
image-name: vmlinux-riscv64 | |
steps: | |
- uses: actions/checkout@main | |
- name: Install dependencies | |
id: dep | |
run: | | |
pacman -Syu --noconfirm pahole xmlto inetutils bc cpio jq llvm llvm-libs clang lld ccache zip unzip git make | |
- name: Trust this directory | |
run: git config --global --add safe.directory '*' # v2.35.3 or later | |
- name: Initialize ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
max-size: 2048M | |
key: ${{ github.job }}-${{ matrix.arch }} | |
#- name: Prepare source code | |
# shell: bash | |
# run: | | |
# export VERSION_BRANCH=v6.11-arch1 | |
# git clone https://github.com/archlinux/linux -b $VERSION_BRANCH --depth 1 linux | |
- name: Build kernel | |
run: | | |
useradd build | |
echo 'build ALL=(ALL:ALL) ALL' >> /etc/sudoers | |
chmod -R 666 linux-main ; chown -R build:build linux-main | |
su --command="cd linux-main && git apply riscv64.patch && makepkg -s ." build | |
- name: Copy ${{ matrix.image-name }} | |
run: | | |
cd linux-main | |
ls -l | |
#mv vmlinux ../${{ matrix.image-name }} | |
#cd .. | |
#sha256sum ${{ matrix.image-name }} > ${{ matrix.image-name }}.sha256 | |
- name: Upload ${{ matrix.image-name }} | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ matrix.image-name }} | |
path: | | |
${{ matrix.image-name }} | |
${{ matrix.image-name }}.sha256 | |
- id: out | |
run: | | |
echo "current_version=${{ env.CURRENT_VERSION }}" >> $GITHUB_OUTPUT | |
echo "release_version=${{ env.RELEASED_VERSION }}" >> $GITHUB_OUTPUT | |
echo "clang_version=${{ env.CLANG_VERSION }}" >> $GITHUB_OUTPUT | |
echo "rebuild_flag=${{ env.REBUILD_FLAG }}" >> $GITHUB_OUTPUT | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@main | |
- uses: actions/download-artifact@main | |
with: | |
path: release_images/ | |
- id: fetch_commit_sha | |
run: | | |
if [ ${{ github.event_name }} = 'pull_request' ]; then | |
echo "sha=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT | |
echo "RELEASE_TAG=${{ needs.build.outputs.current_version }}-PR" | tee -a $GITHUB_ENV | |
else | |
echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT | |
echo "RELEASE_TAG=${{ needs.build.outputs.current_version }}" | tee -a $GITHUB_ENV | |
fi | |
- name: Release | |
uses: softprops/action-gh-release@master | |
with: | |
name: ${{ env.RELEASE_TAG }} | |
tag_name: ${{ env.RELEASE_TAG }} | |
draft: ${{ github.event_name == 'pull_request' }} | |
target_commitish: ${{ steps.fetch_commit_sha.outputs.sha }} | |
body: | | |
RISC-V linux kernel, built with Clang ${{ needs.build.outputs.clang_version }} | |
* `vmlinux` for riscv | |
files: | | |
release_images/*/* | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# generate_release_notes: true | |
fail_on_unmatched_files: true |