mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-11-23 15:00:52 +07:00
ci: Use a container and expand versions
Use containers to build/test so it's not restricted to the OS versions supported by Github runners. A few changes are needed to the workflow to support using containers: 1) No need for sudo, so remove it 2) Explicitly install missing zlib 3) Explicitly pass KDIR= while building kernel modules, since it won't match `uname -r`. This assumes the container has just one kernel installed and so /usr/lib/modules/*/build can be used as the single symlink to the kernel headers. This should be common to other distros to be added, too. Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com> Reviewed-by: Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/44
This commit is contained in:
parent
da6345d17a
commit
e9f4600bd0
5
.github/actions/setup-ubuntu/action.yml
vendored
5
.github/actions/setup-ubuntu/action.yml
vendored
@ -6,8 +6,8 @@ runs:
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --yes \
|
||||
apt-get update
|
||||
apt-get install --yes \
|
||||
build-essential \
|
||||
autoconf \
|
||||
automake \
|
||||
@ -19,4 +19,5 @@ runs:
|
||||
libzstd-dev \
|
||||
linux-headers-generic \
|
||||
scdoc \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
|
11
.github/workflows/main.yml
vendored
11
.github/workflows/main.yml
vendored
@ -9,6 +9,13 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
container: ['ubuntu:22.04', 'ubuntu:24.04']
|
||||
|
||||
container:
|
||||
image: ${{ matrix.container }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup-ubuntu
|
||||
@ -27,7 +34,7 @@ jobs:
|
||||
- name: test
|
||||
run: |
|
||||
cd build
|
||||
make -j$(nproc) check
|
||||
make KDIR=/usr/lib/modules/*/build -j$(nproc) check
|
||||
|
||||
- name: install
|
||||
run: |
|
||||
@ -37,4 +44,4 @@ jobs:
|
||||
- name: distcheck
|
||||
run: |
|
||||
cd build
|
||||
make distcheck
|
||||
make KDIR=/usr/lib/modules/*/build distcheck
|
||||
|
Loading…
Reference in New Issue
Block a user