2022-07-16 07:08:52 +07:00
|
|
|
#
|
|
|
|
# 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: "format %y.%-m.$i or auto"
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
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: 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: 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
|
|
|
|
tar -zcf ${{ github.workspace }}/source/${{ matrix.platform }}-${{ matrix.version }}-${{ matrix.parm }}.tgz -C ${{ github.workspace }}/source/output .
|
|
|
|
else
|
|
|
|
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 "${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
|
|
|
|
LATEST_TAG="`curl -skL "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r ".tag_name" 2>/dev/null`"
|
|
|
|
if [[ -n "${LATEST_TAG}" && "`echo ${LATEST_TAG} | cut -d '.' -f 1,2`" = "`date +'%y.%-m.%-d'`" ]]; then # format %y.%-m.$i
|
|
|
|
VERSION="`echo ${LATEST_TAG} | awk -F '.' '{$3=$3+1}1' OFS='.'`"
|
|
|
|
else
|
|
|
|
VERSION="`date +'%y.%-m.%-d'`"
|
|
|
|
fi
|
|
|
|
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
|
|
|
|
if: success() && env.VERSION != ''
|
|
|
|
run: |
|
|
|
|
zip -9 modules.zip -j output/*
|
2024-05-31 04:13:16 +07:00
|
|
|
sha256sum modules.zip >checksum.sha256
|
2022-07-16 07:08:52 +07:00
|
|
|
|
|
|
|
- name: Release
|
|
|
|
if: success() && env.VERSION != ''
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
tag: ${{ env.VERSION }}
|
|
|
|
prerelease: ${{ inputs.prerelease }}
|
|
|
|
allowUpdates: true
|
|
|
|
body: |
|
|
|
|
${{ steps.Changelog.outputs.changelog }}
|
|
|
|
artifacts: |
|
|
|
|
modules.zip
|
2024-05-31 04:13:16 +07:00
|
|
|
./output/*.tgz
|
|
|
|
checksum.sha256
|