@@ -10,29 +10,24 @@ jobs:
1010 outputs :
1111 artifact-path : freemyipod/initramfs.cpio.gz
1212 steps :
13- - name : Checkout source
14- uses : actions/checkout@v6
15-
16- - name : Install system dependencies
17- run : |
18- sudo apt-get update
19- sudo apt-get install -y \
20- qemu-user-static \
21- systemd-container
22-
23- - name : Cache initramfs
13+ - name : Restore initramfs from cache
2414 id : cache
2515 uses : actions/cache@v5
2616 with :
2717 path : freemyipod/initramfs.cpio.gz
2818 key : initramfs-${{ hashFiles('freemyipod/build-initramfs.sh') }}
2919
20+ - name : Checkout source if cache miss
21+ if : ${{ steps.cache.outputs.cache-hit != 'true' }}
22+ uses : actions/checkout@v6
23+
3024 - name : Build initramfs if cache miss
31- if : steps.cache.outputs.cache-hit != 'true'
25+ if : ${{ steps.cache.outputs.cache-hit != 'true' }}
3226 run : |
27+ sudo apt-get update
28+ sudo apt-get install -y qemu-user-static systemd-container
3329 chmod +x freemyipod/build-initramfs.sh
3430 freemyipod/build-initramfs.sh
35- echo "Initramfs built successfully at freemyipod/initramfs.cpio.gz"
3631
3732 - name : Upload initramfs artifact
3833 uses : actions/upload-artifact@v7
@@ -62,20 +57,39 @@ jobs:
6257 libncurses-dev \
6358 device-tree-compiler \
6459 python3 \
65- python3-pip
60+ python3-pip \
61+ ccache
6662
6763 - name : Install Python dependencies for dtbs_check
6864 run : |
6965 pip3 install --upgrade pip
7066 pip3 install dtschema yamllint
7167
68+ - name : Restore global ccache
69+ uses : actions/cache@v5
70+ with :
71+ path : ~/.ccache
72+ key : ccache-global
73+ restore-keys : ccache-global
74+
75+ - name : Setup ccache
76+ run : |
77+ export PATH="/usr/lib/ccache:$PATH"
78+ ccache --zero-stats
79+ ccache --max-size=256M
80+ echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
81+
7282 - name : Configure kernel
7383 run : |
7484 make ARCH=arm apple_n31_defconfig
7585
7686 - name : Build kernel
7787 run : |
88+ export PATH="/usr/lib/ccache:$PATH"
89+ export CC="ccache arm-none-eabi-gcc"
90+ export HOSTCC="ccache gcc"
7891 make ARCH=arm CROSS_COMPILE=arm-none-eabi- -j $(nproc) dtbs_check dtbs zImage
92+ ccache --show-stats
7993
8094 - name : Copy kernel and DTB to /freemyipod
8195 run : |
@@ -100,13 +114,13 @@ jobs:
100114 uses : actions/checkout@v6
101115
102116 - name : Download initramfs artifact
103- uses : actions/download-artifact@v3
117+ uses : actions/download-artifact@v8
104118 with :
105119 name : initramfs
106120 path : freemyipod
107121
108122 - name : Download kernel artifacts
109- uses : actions/download-artifact@v3
123+ uses : actions/download-artifact@v8
110124 with :
111125 name : kernel
112126 path : freemyipod
0 commit comments