1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 13:24:36 +00:00
rtl8812au/.github/workflows/build.yml

64 lines
2.3 KiB
YAML
Raw Normal View History

2020-12-23 13:09:08 +00:00
name: Build
on: [pull_request]
2020-12-23 13:09:08 +00:00
jobs:
commontasks:
2020-12-23 13:09:08 +00:00
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
2023-04-02 11:01:14 +00:00
- uses: actions/checkout@v3
- 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-23 13:09:08 +00:00
run: |
JSON=$(curl -s https://www.kernel.org/releases.json)
2020-12-23 13:09:08 +00:00
VERSIONSARRAY=$(echo $JSON | jq -c '[.releases[] | {version: .version, moniker: .moniker} | select(.moniker != "linux-next") | .version]')
echo ::set-output name=matrix::${VERSIONSARRAY}
build:
needs: commontasks
2020-12-23 13:09:08 +00:00
strategy:
fail-fast: false
2023-04-02 11:01:14 +00:00
matrix:
version: ${{fromJson(needs.commontasks.outputs.matrix)}}
2020-12-23 13:09:08 +00:00
#version: [4.9.248, 4.4.248]
include:
#Version 4.15.x requested to test Ubuntu 18.04 LTS version
- os: ubuntu-18.04
version: $(uname -r)
2020-12-23 13:09:08 +00:00
use_apt: true
runs-on: ubuntu-22.04
2020-12-23 13:09:08 +00:00
steps:
- name: install deb packages
2023-04-02 11:01:14 +00:00
env:
2020-12-23 13:09:08 +00:00
VERSION: ${{matrix.version }}
if: ${{ !matrix.use_apt }}
run: |
KERNEL_URL=https://kernel.ubuntu.com/~kernel-ppa/mainline/
KERNEL_URL_DETAILS=$(wget --quiet -O - ${KERNEL_URL}v${VERSION}/ | grep -A8 "Build for amd64\|Test amd64")
ALL_DEB=$(echo "$KERNEL_URL_DETAILS" | grep -m1 'all.deb' | cut -d '"' -f 2)
AMD64_DEB=$(echo "$KERNEL_URL_DETAILS" | grep -m1 "amd64.deb" | cut -d '"' -f 2)
[ -z "$ALL_DEB" ] && exit 1
[ -z "$AMD64_DEB" ] && exit 2
wget -nv ${KERNEL_URL}v${VERSION}/$AMD64_DEB
wget -nv ${KERNEL_URL}v${VERSION}/$ALL_DEB
2020-12-23 13:09:08 +00:00
sudo dpkg --force-all -i *.deb
echo "KVER=$(echo $ALL_DEB | cut -d '_' -f 2 | rev | cut -c14- | rev)-generic" >> $GITHUB_ENV
2020-12-23 13:09:08 +00:00
- name: apt-linux-headers
if: ${{ matrix.use_apt }}
run: |
sudo apt-get install linux-headers-$(uname -r)
2020-12-23 13:09:08 +00:00
echo "KVER=${{matrix.version }}" >> $GITHUB_ENV
2023-04-02 11:01:14 +00:00
- uses: actions/checkout@v3
2020-12-23 13:09:08 +00:00
- name: build
run: make KVER=$KVER