Skip to content

Commit 78dbb7e

Browse files
committed
add ccache
1 parent 31d7459 commit 78dbb7e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ jobs:
3131
- name: Checkout repository
3232
uses: actions/checkout@v4
3333

34+
- name: Backup ccache
35+
uses: actions/cache@v3
36+
with:
37+
path: |
38+
${{ github.workspace }}/ccache
39+
key: ccache-${{ matrix.arch }}
40+
3441
- name: Create Build Environment
3542
run: |
3643
FEDORA_VERSION="${{ matrix.fedora_version }}"
@@ -45,7 +52,11 @@ jobs:
4552
run: |
4653
FEDORA_VERSION="${{ matrix.fedora_version }}"
4754
ARCH="${{ matrix.arch }}"
48-
sudo podman run --rm -v $(pwd):/workspace fedora_builder fedpkg \
55+
sudo podman run --rm -v $(pwd):/workspace \
56+
--env CCACHE_DIR=/workspace/ccache \
57+
--env CCACHE_MAXSIZE=5G \
58+
--env CCACHE_COMPRESS=1 \
59+
fedora_builder fedpkg \
4960
--name kernel --namespace rpms --release "f${FEDORA_VERSION:-41}" \
5061
local --arch ${ARCH:-x86_64} --with baseonly \
5162
--builddir build --buildrootdir buildroot

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ RUN groupadd -g $GID -o builder && \
2323

2424
USER builder
2525

26+
ENV PATH="/usr/lib64/ccache/:$PATH"
27+
2628
WORKDIR /workspace
2729

2830
ENTRYPOINT [ "env" ]

0 commit comments

Comments
 (0)