@@ -10,26 +10,22 @@ 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
3125 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
3531 echo "Initramfs built successfully at freemyipod/initramfs.cpio.gz"
@@ -62,20 +58,39 @@ jobs:
6258 libncurses-dev \
6359 device-tree-compiler \
6460 python3 \
65- python3-pip
61+ python3-pip \
62+ ccache
6663
6764 - name : Install Python dependencies for dtbs_check
6865 run : |
6966 pip3 install --upgrade pip
7067 pip3 install dtschema yamllint
7168
69+ - name : Restore global ccache
70+ uses : actions/cache@v5
71+ with :
72+ path : ~/.ccache
73+ key : ccache-global
74+ restore-keys : ccache-global
75+
76+ - name : Setup ccache
77+ run : |
78+ export PATH="/usr/lib/ccache:$PATH"
79+ ccache --zero-stats
80+ ccache --max-size=256M
81+ echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
82+
7283 - name : Configure kernel
7384 run : |
7485 make ARCH=arm apple_n31_defconfig
7586
7687 - name : Build kernel
7788 run : |
89+ export PATH="/usr/lib/ccache:$PATH"
90+ export CC="ccache arm-none-eabi-gcc"
91+ export HOSTCC="ccache gcc"
7892 make ARCH=arm CROSS_COMPILE=arm-none-eabi- -j $(nproc) dtbs_check dtbs zImage
93+ ccache --show-stats
7994
8095 - name : Copy kernel and DTB to /freemyipod
8196 run : |
@@ -100,13 +115,13 @@ jobs:
100115 uses : actions/checkout@v6
101116
102117 - name : Download initramfs artifact
103- uses : actions/download-artifact@v3
118+ uses : actions/download-artifact@v8
104119 with :
105120 name : initramfs
106121 path : freemyipod
107122
108123 - name : Download kernel artifacts
109- uses : actions/download-artifact@v3
124+ uses : actions/download-artifact@v8
110125 with :
111126 name : kernel
112127 path : freemyipod
0 commit comments