@@ -22,36 +22,38 @@ jobs:
22
22
sudo apt-get update
23
23
sudo apt-get install -y wget tar libncurses-dev bison flex libssl-dev libelf-dev bc zstd unzip
24
24
25
- # Cache the 'kext' directory to avoid re-downloading and extracting kernel on subsequent runs
26
- - name : Cache kernel and firmware
25
+ # Cache the 'kext' directory to avoid re-downloading kernel on each run
26
+ - name : Cache kernel source
27
27
28
28
with :
29
29
path : kext/
30
- key : ${{ runner.os }}-kext-${{ hashFiles('kext/** ') }}
30
+ key : ${{ runner.os }}-kext-${{ hashFiles('kernel-url ') }}
31
31
restore-keys : |
32
32
${{ runner.os }}-kext-
33
33
34
- # Download kernel and firmware files, extract and build
35
- - name : Download, extract and build kernel
34
+ # Download, extract, and build kernel, always running make
35
+ - name : Download, extract, and build kernel
36
36
run : |
37
- if [ ! -f "kext/arch/x86/boot/bzImage" ]; then
38
- # If the kernel hasn't been built or cached, proceed with download and build
37
+ # Download the kernel source only if it's not cached
38
+ if [ ! -d "kext" ]; then
39
39
wget -q -i kernel-url -O kernel.tar.xz
40
40
mkdir -p kext
41
41
tar -xf kernel.tar.xz -C kext --strip-components=1
42
- cp .config kext/
42
+ fi
43
+
44
+ # Copy the .config file and update configuration
45
+ cp .config kext/
46
+ cd kext
43
47
44
- # Download firmware (ensure the URL is correct)
48
+ # Download firmware if necessary
49
+ if [ ! -f "inspiron-351-fw-main" ]; then
45
50
wget https://github.com/kzwkt/inspiron-351-fw/archive/refs/heads/main.zip
46
51
unzip -q main.zip -d kext/
47
-
48
- # Build the kernel
49
- cd kext
50
- make -j$(nproc)
51
- else
52
- echo "Kernel already built. Skipping download and build."
53
52
fi
54
53
54
+ # Run make every time, even if cached
55
+ make -j$(nproc)
56
+
55
57
# Upload the kernel artifact
56
58
- name : Upload kernel
57
59
uses : actions/upload-artifact@v3
0 commit comments