build: upgrade toolchain in Docker (#1810)

- llvm 16
- zig 0.11.0
This commit is contained in:
LongYinan 2023-11-14 09:58:58 +08:00 committed by GitHub
parent 2fa0e62376
commit 68faeb6d60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 29 deletions

View file

@ -51,11 +51,11 @@ jobs:
apt-get update &&
apt-get install -y wget gnupg2 &&
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - &&
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" >> /etc/apt/sources.list &&
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" >> /etc/apt/sources.list &&
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" >> /etc/apt/sources.list &&
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" >> /etc/apt/sources.list &&
apt-get update &&
apt-get install libc++-15-dev libc++abi-15-dev -y --fix-missing --no-install-recommends &&
rm /usr/lib/llvm-15/lib/libc++abi.so
apt-get install libc++-16-dev libc++abi-16-dev -y --fix-missing --no-install-recommends &&
rm /usr/lib/llvm-16/lib/libc++abi.so
- name: Build and push debian aarch64 cross
uses: docker/build-push-action@v5

View file

@ -1,6 +1,6 @@
FROM ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
ARG ZIG_VERSION=0.10.1
ARG ZIG_VERSION=0.11.0
RUN apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing xz xz-dev && \
rustup target add x86_64-unknown-linux-gnu && \

View file

@ -9,21 +9,21 @@ 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-15
ADD ./lib/llvm-15 /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-15 main" >> /etc/apt/sources.list && \
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" >> /etc/apt/sources.list && \
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 \
llvm-15 \
clang-15 \
lld-15 \
libc++-15-dev \
libc++abi-15-dev \
llvm-16 \
clang-16 \
lld-16 \
libc++-16-dev \
libc++abi-16-dev \
nodejs \
xz-utils \
rcs \
@ -37,7 +37,7 @@ RUN apt-get update && \
npm install -g yarn pnpm lerna && \
npm cache clean --force && \
npm cache verify && \
ln -sf /usr/bin/clang-15 /usr/bin/clang && \
ln -sf /usr/bin/clang++-15 /usr/bin/clang++ && \
ln -sf /usr/bin/lld-15 /usr/bin/lld && \
ln -sf /usr/bin/clang-15 /usr/bin/cc
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 && \
ln -sf /usr/bin/clang-16 /usr/bin/cc

View file

@ -1,6 +1,6 @@
FROM ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
ARG ZIG_VERSION=0.10.1
ARG ZIG_VERSION=0.11.0
RUN wget https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \
tar -xvf zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \

View file

@ -15,16 +15,16 @@ ENV RUSTUP_HOME=/usr/local/rustup \
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-15 main" >> /etc/apt/sources.list && \
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" >> /etc/apt/sources.list && \
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 \
llvm-15 \
clang-15 \
lld-15 \
libc++-15-dev \
libc++abi-15-dev \
llvm-16 \
clang-16 \
lld-16 \
libc++-16-dev \
libc++abi-16-dev \
nodejs \
xz-utils \
rcs \
@ -35,10 +35,10 @@ RUN apt-get update && \
apt-get autoremove -y && \
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
npm install -g yarn pnpm lerna && \
ln -sf /usr/bin/clang-15 /usr/bin/clang && \
ln -sf /usr/bin/clang++-15 /usr/bin/clang++ && \
ln -sf /usr/bin/lld-15 /usr/bin/lld && \
ln -sf /usr/bin/clang-15 /usr/bin/cc
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 && \
ln -sf /usr/bin/clang-16 /usr/bin/cc
RUN wget https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.xz && \
tar -xf nasm-${NASM_VERSION}.tar.xz && \