mirror of
https://github.com/AuxXxilium/arc-modules.git
synced 2024-11-23 14:51:01 +07:00
0b91ed61e1
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
272 lines
8.0 KiB
YAML
272 lines
8.0 KiB
YAML
#
|
|
# Copyright (C) 2023 AuxXxilium <https://github.com/AuxXxilium> and Ing <https://github.com/wjz304>
|
|
#
|
|
# This is free software, licensed under the MIT License.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
# version: [ 7.1, 7.2 ]
|
|
# platform: [ apollolake, broadwell, broadwellnk, denverton, epyc7002, geminilake, purley, r1000, v1000 ]
|
|
# exclude:
|
|
# - version: 7.1
|
|
# platform: broadwell
|
|
# include:
|
|
# - version: "7.2"
|
|
# platform: "broadwell"
|
|
|
|
name: Build Modules
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "version"
|
|
required: false
|
|
type: string
|
|
latest:
|
|
description: "latest"
|
|
default: true
|
|
type: boolean
|
|
prerelease:
|
|
description: "pre release"
|
|
default: false
|
|
type: boolean
|
|
firmware:
|
|
description: "firmware"
|
|
default: false
|
|
type: boolean
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- version: 7.1
|
|
platform: apollolake
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: broadwell
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: broadwellnk
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: broadwellnkv2
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: broadwellntbap
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: denverton
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: epyc7002
|
|
parm: "5.10.55"
|
|
- version: 7.1
|
|
platform: geminilake
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: purley
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: r1000
|
|
parm: "4.4.180"
|
|
- version: 7.1
|
|
platform: v1000
|
|
parm: "4.4.180"
|
|
#- version: 7.1
|
|
# platform: kvmx64
|
|
# parm: "4.4.180"
|
|
|
|
- version: 7.2
|
|
platform: apollolake
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: broadwell
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: broadwellnk
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: broadwellnkv2
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: broadwellntbap
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: denverton
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: epyc7002
|
|
parm: "5.10.55"
|
|
- version: 7.2
|
|
platform: geminilake
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: purley
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: r1000
|
|
parm: "4.4.302"
|
|
- version: 7.2
|
|
platform: v1000
|
|
parm: "4.4.302"
|
|
#- version: 7.2
|
|
# platform: kvmx64
|
|
# parm: "4.4.302"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@main
|
|
|
|
- name: Init Env
|
|
run: |
|
|
git config --global user.email "info@auxxxilium.tech"
|
|
git config --global user.name "AuxXxilium"
|
|
sudo timedatectl set-timezone "Europe/Berlin"
|
|
|
|
- name: Tar to Artifacts
|
|
run: |
|
|
if [ ! -d "${{ github.workspace }}/source/output" ]; then
|
|
mkdir -p "${{ github.workspace }}/source/output"
|
|
chmod a+rw -R "${{ github.workspace }}/source/output"
|
|
fi
|
|
|
|
if [ "${{ matrix.platform }}" = "epyc7002" ]; then
|
|
MODULES_PATH="${{ github.workspace }}/modules/${{ matrix.platform }}-${{ matrix.version }}-${{ matrix.parm }}"
|
|
else
|
|
MODULES_PATH="${{ github.workspace }}/modules/${{ matrix.platform }}-${{ matrix.parm }}"
|
|
fi
|
|
|
|
echo "copy 3rd modules"
|
|
[ -d "${MODULES_PATH}" ] && cp -Rvf "${MODULES_PATH}/." "${{ github.workspace }}/source/output"
|
|
|
|
if [ "${{ matrix.platform }}" = "epyc7002" ]; then
|
|
VERSION="`date +'%y.%m.%d'`"
|
|
echo "${VERSION}" >"${{ github.workspace }}/source/output/VERSION"
|
|
tar -zcf ${{ github.workspace }}/source/${{ matrix.platform }}-${{ matrix.version }}-${{ matrix.parm }}.tgz -C ${{ github.workspace }}/source/output .
|
|
else
|
|
VERSION="`date +'%y.%m.%d'`"
|
|
echo "${VERSION}" >"${{ github.workspace }}/source/output/VERSION"
|
|
tar -zcf ${{ github.workspace }}/source/${{ matrix.platform }}-${{ matrix.parm }}.tgz -C ${{ github.workspace }}/source/output .
|
|
fi
|
|
|
|
- name: Upload to Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: modules-${{ matrix.version }}-${{ matrix.platform }}
|
|
path: |
|
|
${{ github.workspace }}/source/*.tgz
|
|
|
|
firmware:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@main
|
|
|
|
- name: Download from Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: output
|
|
pattern: modules-*
|
|
merge-multiple: true
|
|
|
|
- name: Firmware
|
|
run: |
|
|
mkdir -p firmware
|
|
|
|
echo "copy 3rd modules"
|
|
MODULES_PATH="${{ github.workspace }}/modules/firmware"
|
|
cp -rf ${MODULES_PATH}/* firmware/
|
|
|
|
if [ "${{ inputs.firmware }}" == "true" ]; then
|
|
echo "extract all modules"
|
|
for F in ./output/*.tgz; do mkdir "${F%.tgz}" && tar -xzf "${F}" -C "${F%.tgz}"; done
|
|
|
|
echo "get firmware"
|
|
SOURCE=/tmp/linux-firmware
|
|
git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git ${SOURCE}
|
|
while read -r L; do
|
|
if [ -e "${SOURCE}/${L}" ]; then
|
|
mkdir -p "`dirname firmware/${L}`"
|
|
cp -f "${SOURCE}/${L}" "firmware/${L}"
|
|
else
|
|
[ -e "firmware/${L}" ] && echo "Used modules ${L}" || echo "Missing ${L}"
|
|
fi
|
|
done < <(find ./output -name \*.ko -exec sh -c '/sbin/modinfo {} | grep ^firmware' \; | awk '{print $2}')
|
|
fi
|
|
|
|
tar -zcf firmware.tgz -C firmware .
|
|
|
|
- name: Upload to Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: modules-firmware
|
|
path: |
|
|
firmware.tgz
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: firmware
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Changelog
|
|
uses: Bullrich/generate-release-changelog@master
|
|
id: Changelog
|
|
env:
|
|
REPO: ${{ github.repository }}
|
|
|
|
- name: Init Env
|
|
run: |
|
|
git config --global user.email "info@auxxxilium.tech"
|
|
git config --global user.name "AuxXxilium"
|
|
sudo timedatectl set-timezone "Europe/Berlin"
|
|
|
|
- name: Download from Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: output
|
|
pattern: modules-*
|
|
merge-multiple: true
|
|
|
|
- name: Calculate Version
|
|
run: |
|
|
# Calculate Version
|
|
VERSION=""
|
|
if [ -n "${{ inputs.version }}" ]; then
|
|
VERSION="${{ inputs.version }}"
|
|
else
|
|
VERSION="`date +'%y.%m.%d'`"
|
|
fi
|
|
|
|
if [ -n "${VERSION}" ]; then
|
|
# Modify Source File
|
|
echo "Version: ${VERSION}"
|
|
echo "${VERSION}" >VERSION
|
|
echo "${VERSION}" >"./output/VERSION"
|
|
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- name: Zip Modules
|
|
run: |
|
|
zip -9j modules-${{ env.VERSION }}.zip output/*.tgz VERSION
|
|
|
|
- name: Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: ${{ env.VERSION }}
|
|
makeLatest: ${{ inputs.latest }}
|
|
prerelease: ${{ inputs.prerelease }}
|
|
allowUpdates: true
|
|
body: |
|
|
${{ steps.Changelog.outputs.changelog }}
|
|
artifacts: |
|
|
modules-*.zip
|
|
./output/*.tgz |