ci: fix docker build (#1833)

This commit is contained in:
LongYinan 2023-12-03 18:17:09 +08:00 committed by GitHub
parent 14cd222492
commit 61465d4c6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 18 deletions

View file

@ -46,7 +46,7 @@ jobs:
uses: addnab/docker-run-action@v3
with:
image: node:lts-slim
options: '--platform linux/arm64 --user 0:0 -e GITHUB_TOKEN -v ${{ github.workspace }}/lib/llvm-15:/usr/lib/llvm-15'
options: '--platform linux/arm64 --user 0:0 -e GITHUB_TOKEN -v ${{ github.workspace }}/lib/llvm-16:/usr/lib/llvm-16'
run: >-
apt-get update &&
apt-get install -y wget gnupg2 &&

View file

@ -9,16 +9,17 @@ ENV RUSTUP_HOME=/usr/local/rustup \
CXX_aarch64_unknown_linux_gnu="clang++ --sysroot=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot" \
C_INCLUDE_PATH=/usr/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include
ADD ./lib/llvm-15 /usr/aarch64-unknown-linux-gnu/lib/llvm-16
ADD ./lib/llvm-16 /usr/aarch64-unknown-linux-gnu/lib/llvm-16
RUN apt-get update && \
apt-get install -y --fix-missing --no-install-recommends gpg-agent ca-certificates openssl && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list && \
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list && \
curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y --fix-missing --no-install-recommends curl gnupg gpg-agent ca-certificates openssl && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list && \
echo "deb-src [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -y --fix-missing --no-install-recommends \
curl \
llvm-16 \
clang-16 \
lld-16 \
@ -34,9 +35,7 @@ RUN apt-get update && \
apt-get autoremove -y && \
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
rustup target add aarch64-unknown-linux-gnu && \
npm install -g yarn pnpm lerna && \
npm cache clean --force && \
npm cache verify && \
npm install -g npm yarn && \
ln -sf /usr/bin/clang-16 /usr/bin/clang && \
ln -sf /usr/bin/clang++-16 /usr/bin/clang++ && \
ln -sf /usr/bin/lld-16 /usr/bin/lld && \

View file

@ -13,13 +13,15 @@ ENV RUSTUP_HOME=/usr/local/rustup \
LDFLAGS="-fuse-ld=lld"
RUN apt-get update && \
apt-get install -y --fix-missing --no-install-recommends gpg-agent ca-certificates openssl && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list && \
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list && \
curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y --fix-missing --no-install-recommends curl gnupg gpg-agent ca-certificates openssl && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list && \
echo "deb-src [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" >> /etc/apt/sources.list && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -y --fix-missing --no-install-recommends \
curl \
llvm-16 \
clang-16 \
lld-16 \
@ -34,7 +36,7 @@ RUN apt-get update && \
ninja-build && \
apt-get autoremove -y && \
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
npm install -g yarn pnpm lerna && \
npm install -g npm yarn && \
ln -sf /usr/bin/clang-16 /usr/bin/clang && \
ln -sf /usr/bin/clang++-16 /usr/bin/clang++ && \
ln -sf /usr/bin/lld-16 /usr/bin/lld && \