2020-12-17 22:46:09 +00:00
|
|
|
name: Build
|
|
|
|
|
2021-02-06 12:47:57 +00:00
|
|
|
on: [pull_request]
|
2020-12-17 22:46:09 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-03-06 12:27:49 +00:00
|
|
|
|
|
|
|
commontasks:
|
2020-12-17 22:46:09 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
|
|
steps:
|
2021-03-06 12:27:49 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Avoid 0x0BDA
|
|
|
|
#Find devices that not use 0x0BDA instead of const USB_VENDOR_ID_REALTEK
|
|
|
|
run: grep -c -i "0x0BDA" os_dep/linux/usb_intf.c | grep -w 1
|
|
|
|
- name: Find duplicates
|
|
|
|
#Find devices that not use 0x0BDA instead of const USB_VENDOR_ID_REALTEK
|
|
|
|
run: grep -i "{USB_DEVICE(" os_dep/linux/usb_intf.c | cut -d ')' -f1 | sort | uniq -cd | wc -c | grep -w 0
|
|
|
|
- name: Get kernel matrix
|
|
|
|
id: set-matrix
|
2020-12-17 22:46:09 +00:00
|
|
|
run: |
|
2021-03-06 12:27:49 +00:00
|
|
|
JSON=$(curl -s https://www.kernel.org/releases.json)
|
2020-12-17 22:46:09 +00:00
|
|
|
VERSIONSARRAY=$(echo $JSON | jq -c '[.releases[] | {version: .version, moniker: .moniker} | select(.moniker != "linux-next") | .version]')
|
|
|
|
echo ::set-output name=matrix::${VERSIONSARRAY}
|
|
|
|
|
|
|
|
build:
|
2021-03-06 12:27:49 +00:00
|
|
|
needs: commontasks
|
2020-12-17 22:46:09 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2021-02-06 12:47:57 +00:00
|
|
|
fail-fast: false
|
2020-12-17 22:46:09 +00:00
|
|
|
matrix:
|
2021-10-09 10:24:15 +00:00
|
|
|
kernel_version: ${{fromJson(needs.commontasks.outputs.matrix)}}
|
|
|
|
gcc_version: [9, 10, 11]
|
|
|
|
#kernel_version: [5.15-rc3,5.14.10]
|
2020-12-17 22:46:09 +00:00
|
|
|
steps:
|
2021-10-09 10:24:15 +00:00
|
|
|
- name: Set up GCC
|
|
|
|
uses: egor-tensin/setup-gcc@v1
|
|
|
|
with:
|
|
|
|
version: ${{matrix.gcc_version }}
|
2021-03-06 12:27:49 +00:00
|
|
|
- name: install deb packages
|
2020-12-17 22:46:09 +00:00
|
|
|
run: |
|
|
|
|
KERNEL_URL=https://kernel.ubuntu.com/~kernel-ppa/mainline/
|
2021-10-09 10:24:15 +00:00
|
|
|
KERNEL_URL_DETAILS=$(wget --quiet -O - ${KERNEL_URL}v${{matrix.kernel_version}}/ | grep -A8 "Build for amd64\|Test amd64")
|
2020-12-17 22:46:09 +00:00
|
|
|
ALL_DEB=$(echo "$KERNEL_URL_DETAILS" | grep -m1 'all.deb' | cut -d '"' -f 2)
|
2021-03-06 12:27:49 +00:00
|
|
|
AMD64_DEB=$(echo "$KERNEL_URL_DETAILS" | grep -m1 "amd64.deb" | cut -d '"' -f 2)
|
|
|
|
[ -z "$ALL_DEB" ] && exit 1
|
|
|
|
[ -z "$AMD64_DEB" ] && exit 2
|
2021-10-09 10:24:15 +00:00
|
|
|
wget -nv ${KERNEL_URL}v${{matrix.kernel_version}}/$AMD64_DEB
|
|
|
|
wget -nv ${KERNEL_URL}v${{matrix.kernel_version}}/$ALL_DEB
|
2021-10-10 21:02:43 +00:00
|
|
|
wget -nv http://mirrors.edge.kernel.org/ubuntu/pool/main/g/glibc/libc6_2.34-0ubuntu3_amd64.deb
|
2021-02-06 12:47:57 +00:00
|
|
|
sudo dpkg --force-all -i *.deb
|
2021-03-06 12:27:49 +00:00
|
|
|
echo "KVER=$(echo $ALL_DEB | cut -d '_' -f 2 | rev | cut -c14- | rev)-generic" >> $GITHUB_ENV
|
|
|
|
- uses: actions/checkout@v2
|
2021-10-09 10:24:15 +00:00
|
|
|
- name: build kernel ${{ matrix.kernel_version }} - GCC ${{ matrix.gcc_version }}
|
|
|
|
run: make KVER=$KVER CC=cc
|