Skip to content

Commit

Permalink
Added dkms compilation to binary builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ko1N committed Mar 4, 2024
1 parent f6f7b68 commit 0292cff
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion .github/workflows/binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf", "x86_64-pc-windows-gnu"]
target: ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf"]
steps:
- uses: actions/checkout@v2
- name: Download renamer
Expand All @@ -36,3 +36,43 @@ jobs:
tag_name: bin-${{ github.ref_name }}
files: |
${{ steps.artifacts.outputs.artifact }}
kmod-build:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install dkms linux-headers-`uname -r` build-essential devscripts dh-make
- run: source dkms.conf && echo "BUILT_MODULE_NAME=$BUILT_MODULE_NAME" >> $GITHUB_ENV && echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
- run: echo "DKMS_DIR=/usr/src/${BUILT_MODULE_NAME}-${PACKAGE_VERSION}" >> $GITHUB_ENV
- run: sudo mkdir $DKMS_DIR
- run: sudo cp -r * $DKMS_DIR
- run: sudo dkms build -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION
- run: sudo dkms mktarball -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION --source-only
- run: sudo dkms mkdeb -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION --source-only
- name: Find debian package
id: dkms_path
run: |
export F="$(sudo find /var/lib/dkms/${BUILT_MODULE_NAME}/${PACKAGE_VERSION}/deb/${BUILT_MODULE_NAME}-dkms_${PACKAGE_VERSION}*.deb)"
echo "::set-output name=path::$F"
echo "::set-output name=name::$(basename $F)"
- name: Find tarball
id: tarball_path
run: |
export F="$(sudo find /var/lib/dkms/${BUILT_MODULE_NAME}/${PACKAGE_VERSION}/tarball/${BUILT_MODULE_NAME}-${PACKAGE_VERSION}*.tar.gz)"
echo "::set-output name=path::$F"
echo "::set-output name=name::$(basename $F)"
- name: Upload deb artifact
uses: softprops/action-gh-release@v1
with:
tag_name: bin-${{ github.ref_name }}
files: |
${{ steps.dkms_path.outputs.path }}
- name: Upload tarball
uses: softprops/action-gh-release@v1
with:
tag_name: bin-${{ github.ref_name }}
files: |
${{ steps.tarball_path.outputs.path }}

0 comments on commit 0292cff

Please sign in to comment.