Skip to content

Commit cbf864d

Browse files
committed
ci: use setup-cpp-alpine image for arm64
1 parent 37b3fc6 commit cbf864d

File tree

3 files changed

+19
-29
lines changed

3 files changed

+19
-29
lines changed

.github/workflows/CI.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ jobs:
6868
- os: ubuntu-24.04
6969
node_arch: arm64
7070
cpp_arch: amd64_arm64
71-
distro: alpine_latest
71+
distro: none
72+
base_image: aminya/setup-cpp-alpine-gcc:3.21-1.4.0-arm64
7273
native: false
7374

7475
env:

docker/alpine.dockerfile

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,20 @@
1-
FROM node:18-alpine AS builder
1+
FROM aminya/setup-cpp-alpine-gcc:3.21-1.4.0-amd64 AS builder
22

33
WORKDIR /app
44
COPY ./ ./
55
ENV VCPKG_FORCE_SYSTEM_BINARIES=1
66
RUN \
77
# system dependencies
88
apk add --no-cache \
9-
bash \
10-
build-base \
11-
curl \
12-
git \
13-
g++ \
14-
make \
15-
ninja-build \
16-
pkgconfig \
17-
unzip \
18-
zip \
19-
python3 \
20-
tar \
21-
cmake \
22-
ninja \
23-
musl-dev \
249
automake \
2510
autoconf \
2611
libtool && \
27-
cp /usr/lib/ninja-build/bin/ninja /usr/bin/ninja && \
2812
# build
2913
npm i -g pnpm && \
3014
pnpm install && \
3115
pnpm run build
3216

33-
FROM node:18-alpine
17+
FROM node:alpine3.21
3418
WORKDIR /app
3519

3620
COPY ./ ./

script/install-deps.sh

+15-10
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,21 @@ fi
3737
apk=$(command -v apk || true)
3838
if [ -n "$apk" ]; then
3939
apk update
40-
apk add --no-cache bash build-base curl git g++ make ninja-build pkgconfig unzip zip python3 tar cmake musl-dev automake autoconf libtool nodejs npm
41-
cp /usr/lib/ninja-build/bin/ninja /usr/bin/ninja
42-
43-
# vcpkg
44-
export VCPKG_FORCE_SYSTEM_BINARIES=1
45-
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
46-
cd ~/vcpkg || exit 1
47-
git checkout "$VCPKG_COMMIT"
48-
~/vcpkg/bootstrap-vcpkg.sh
49-
cd - || exit 1
40+
41+
if [ -z "$(command -v setup-cpp || true)" ]; then
42+
apk add --no-cache bash build-base curl git g++ make ninja-build pkgconfig unzip zip python3 tar cmake musl-dev nodejs npm
43+
cp /usr/lib/ninja-build/bin/ninja /usr/bin/ninja
44+
45+
# vcpkg
46+
export VCPKG_FORCE_SYSTEM_BINARIES=1
47+
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
48+
cd ~/vcpkg || exit 1
49+
git checkout "$VCPKG_COMMIT"
50+
~/vcpkg/bootstrap-vcpkg.sh
51+
cd - || exit 1
52+
fi
53+
54+
apk add --no-cache automake autoconf libtool
5055
fi
5156

5257
# Fedora/RHEL

0 commit comments

Comments
 (0)