Skip to content

Commit 9b2b35e

Browse files
Merge pull request #1047 from lightpanda-io/ci-cache-libiconv
ci: cache libiconv
2 parents e790bde + 3b51ca3 commit 9b2b35e

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/actions/install/action.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,23 @@ runs:
6767
mkdir -p v8/out/${{ inputs.os }}/release/obj/zig/
6868
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/release/obj/zig/libc_v8.a
6969
70-
- name: libiconv
70+
- name: Cache libiconv
71+
id: cache-libiconv
72+
uses: actions/cache@v4
73+
env:
74+
cache-name: cache-libiconv
75+
with:
76+
path: ${{ inputs.cache-dir }}/libiconv
77+
key: vendor/libiconv/libiconv-1.17
78+
79+
- name: download libiconv
80+
if: ${{ steps.cache-libiconv.outputs.cache-hit != 'true' }}
81+
shell: bash
82+
run: make download-libiconv
83+
84+
- name: build libiconv
7185
shell: bash
72-
run: make install-libiconv
86+
run: make build-libiconv
7387

7488
- name: build mimalloc
7589
shell: bash

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,14 +199,16 @@ download-libiconv:
199199
ifeq ("$(wildcard vendor/libiconv/libiconv-1.17)","")
200200
@mkdir -p vendor/libiconv
201201
@cd vendor/libiconv && \
202-
curl https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz | tar -xvzf -
202+
curl -L https://github.com/lightpanda-io/libiconv/releases/download/1.17/libiconv-1.17.tar.gz | tar -xvzf -
203203
endif
204204

205-
install-libiconv: download-libiconv clean-libiconv
205+
build-libiconv: clean-libiconv
206206
@cd vendor/libiconv/libiconv-1.17 && \
207207
./configure --prefix=$(ICONV) --enable-static && \
208208
make && make install
209209

210+
install-libiconv: download-libiconv build-libiconv
211+
210212
clean-libiconv:
211213
ifneq ("$(wildcard vendor/libiconv/libiconv-1.17/Makefile)","")
212214
@cd vendor/libiconv/libiconv-1.17 && \

0 commit comments

Comments
 (0)