rtl8192eu-linux-driver/.github/workflows/build.yml

43 lines
1.6 KiB
YAML
Raw Normal View History

2020-12-17 22:46:09 +00:00
name: Build
on: [pull_request]
2020-12-17 22:46:09 +00:00
jobs:
fetchKernelData:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
JSON=$(curl https://www.kernel.org/releases.json)
VERSIONSARRAY=$(echo $JSON | jq -c '[.releases[] | {version: .version, moniker: .moniker} | select(.moniker != "linux-next") | .version]')
echo ::set-output name=matrix::${VERSIONSARRAY}
build:
needs: fetchKernelData
runs-on: ubuntu-latest
strategy:
fail-fast: false
2020-12-17 22:46:09 +00:00
matrix:
version: ${{fromJson(needs.fetchKernelData.outputs.matrix)}}
#version: [4.9.248, 4.4.248]
steps:
- uses: actions/checkout@v2
- name: download-Kernel
env:
VERSION: ${{matrix.version }}
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)
KVER=$(echo $ALL_DEB | cut -d '_' -f 2 | rev | cut -c14- | rev)-generic
wget -nv ${KERNEL_URL}v${VERSION}/$(echo "$KERNEL_URL_DETAILS" | grep -m1 "amd64.deb" | cut -d '"' -f 2)
wget -nv ${KERNEL_URL}v${VERSION}/$ALL_DEB
sudo dpkg --force-all -i *.deb
2020-12-17 22:46:09 +00:00
sudo wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/module.lds.S -O /usr/src/linux-headers-$KVER/scripts/module.lds
sudo sed -i '$ d' /usr/src/linux-headers-$KVER/scripts/module.lds
echo "KVER=$KVER" >> $GITHUB_ENV
- name: build
run: make KVER=$KVER