mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
126 lines
4.0 KiB
YAML
126 lines
4.0 KiB
YAML
name: Update kernel configs and docs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
push:
|
|
paths:
|
|
- 'projects/ROCKNIX/packages/linux/package.mk'
|
|
branches:
|
|
- next
|
|
|
|
jobs:
|
|
update-kernel-configs-docs:
|
|
name: Update kernel configs docs
|
|
permissions:
|
|
actions: write
|
|
contents: read
|
|
env:
|
|
JAVA_HOME: /usr
|
|
ARCH: aarch64
|
|
DISABLE_COLORS: yes
|
|
CCACHE_COMPILERCHECK: content
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- device: RK3326
|
|
project: ROCKNIX
|
|
- device: RK3399
|
|
project: ROCKNIX
|
|
- device: RK3566
|
|
project: ROCKNIX
|
|
- device: RK3588
|
|
project: ROCKNIX
|
|
- device: S922X
|
|
project: ROCKNIX
|
|
- device: H700
|
|
project: ROCKNIX
|
|
- device: SM8250
|
|
project: ROCKNIX
|
|
- device: SM8550
|
|
project: ROCKNIX
|
|
- device: SM8650
|
|
project: ROCKNIX
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Retrieve ccache
|
|
run: |
|
|
URL="https://github.com/${{ github.repository_owner }}/distribution-cache/releases/download/ccache/ccache-aarch64-${{ matrix.device }}-toolchain.tar"
|
|
curl -L --fail --silent --show-error "$URL" | tar -xvf - || echo "Cache archive not found, skipping."
|
|
|
|
- name: Get deps
|
|
run: |
|
|
export PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }}
|
|
yes | ./scripts/checkdeps
|
|
|
|
- name: Build toolchain
|
|
run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} ./scripts/build_mt toolchain;
|
|
|
|
- name: Update Kernel Configs
|
|
run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} ./tools/adjust_kernel_config olddefconfig
|
|
|
|
- name: Update documentation
|
|
run: PROJECT=${{ matrix.project }} DEVICE=${{ matrix.device }} DEVICE_SPECIFIC_EMULATORS=no EMULATION_DEVICE=no ENABLE_32BIT=no TARGET_TYPE=none ./scripts/build emulators
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: kernel-config-(${{ matrix.device }})
|
|
path: ./**/projects/${{ matrix.project }}/devices/${{ matrix.device }}/linux/linux.aarch64.conf
|
|
if-no-files-found: error
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: docs-(${{ matrix.device }})
|
|
path: ./**/documentation/PER_DEVICE_DOCUMENTATION/${{ matrix.device }}/SUPPORTED_EMULATORS_AND_CORES.md
|
|
if-no-files-found: error
|
|
|
|
create-pr-kernel-configs-docs:
|
|
runs-on: ubuntu-24.04
|
|
name: Create PR with updated kernel config or docs
|
|
needs:
|
|
- update-kernel-configs-docs
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Download kernel configs
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: .
|
|
pattern: kernel-config-*
|
|
merge-multiple: true
|
|
- name: Commit kernel configs
|
|
run: |
|
|
git config user.name "${{ github.actor }}"
|
|
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
|
|
|
git add .
|
|
git commit -m "Update kernel configs" || echo "No changes to commit"
|
|
- name: Download device docs
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: .
|
|
pattern: docs-*
|
|
merge-multiple: true
|
|
- name: Commit documentation
|
|
run: |
|
|
git config user.name "${{ github.actor }}"
|
|
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
|
|
|
git add .
|
|
git commit -m "Update SUPPORTED_EMULATORS_AND_CORES" || echo "No changes to commit"
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
commit-message: "Update kernel configs/device documentation"
|
|
title: "Update kernel configs/device documentation"
|
|
body: "Automated changes by [create-pull-request]"
|
|
base: next
|
|
branch: auto-pr-branch
|
|
delete-branch: true
|