build: focal->jammy, llvm-14->llvm-15 (#1369)

This commit is contained in:
LongYinan 2022-11-21 14:44:53 +08:00 committed by GitHub
parent 9f025ca980
commit 91890456da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 25 deletions

View file

@ -1,6 +1,6 @@
FROM ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine FROM ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
ARG ZIG_VERSION=0.9.1 ARG ZIG_VERSION=0.10.0
RUN apk add xz && \ RUN apk add xz && \
rustup target add x86_64-unknown-linux-gnu && \ rustup target add x86_64-unknown-linux-gnu && \

View file

@ -12,16 +12,16 @@ ENV RUSTUP_HOME=/usr/local/rustup \
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --fix-missing --no-install-recommends gpg-agent ca-certificates openssl && \ 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 - && \ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" >> /etc/apt/sources.list && \ echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" >> /etc/apt/sources.list && \
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" >> /etc/apt/sources.list && \ echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" >> /etc/apt/sources.list && \
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y --fix-missing --no-install-recommends \ apt-get install -y --fix-missing --no-install-recommends \
curl \ curl \
llvm-14 \ llvm-15 \
clang-14 \ clang-15 \
lld-14 \ lld-15 \
libc++-14-dev \ libc++-15-dev \
libc++abi-14-dev \ libc++abi-15-dev \
nodejs \ nodejs \
xz-utils \ xz-utils \
rcs \ rcs \
@ -35,7 +35,7 @@ RUN apt-get update && \
npm install -g yarn pnpm lerna && \ npm install -g yarn pnpm lerna && \
npm cache clean --force && \ npm cache clean --force && \
npm cache verify && \ npm cache verify && \
ln -sf /usr/bin/clang-14 /usr/bin/clang && \ ln -sf /usr/bin/clang-15 /usr/bin/clang && \
ln -sf /usr/bin/clang++-14 /usr/bin/clang++ && \ ln -sf /usr/bin/clang++-15 /usr/bin/clang++ && \
ln -sf /usr/bin/lld-14 /usr/bin/lld && \ ln -sf /usr/bin/lld-15 /usr/bin/lld && \
ln -sf /usr/bin/clang-14 /usr/bin/cc ln -sf /usr/bin/clang-15 /usr/bin/cc

View file

@ -1,6 +1,6 @@
FROM ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian FROM ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
ARG ZIG_VERSION=0.9.1 ARG ZIG_VERSION=0.10.0
RUN wget https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \ 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 && \ tar -xvf zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \

View file

@ -9,21 +9,22 @@ ENV RUSTUP_HOME=/usr/local/rustup \
CXX=clang++ \ CXX=clang++ \
CC_x86_64_unknown_linux_gnu=clang \ CC_x86_64_unknown_linux_gnu=clang \
CXX_x86_64_unknown_linux_gnu=clang++ \ CXX_x86_64_unknown_linux_gnu=clang++ \
RUST_TARGET=x86_64-unknown-linux-gnu RUST_TARGET=x86_64-unknown-linux-gnu \
LDFLAGS="-fuse-ld=lld"
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y --fix-missing --no-install-recommends gpg-agent ca-certificates openssl && \ 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 - && \ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" >> /etc/apt/sources.list && \ echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" >> /etc/apt/sources.list && \
echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" >> /etc/apt/sources.list && \ echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" >> /etc/apt/sources.list && \
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y --fix-missing --no-install-recommends \ apt-get install -y --fix-missing --no-install-recommends \
curl \ curl \
llvm-14 \ llvm-15 \
clang-14 \ clang-15 \
lld-14 \ lld-15 \
libc++-14-dev \ libc++-15-dev \
libc++abi-14-dev \ libc++abi-15-dev \
nodejs \ nodejs \
xz-utils \ xz-utils \
rcs \ rcs \
@ -34,10 +35,10 @@ RUN apt-get update && \
apt-get autoremove -y && \ apt-get autoremove -y && \
curl https://sh.rustup.rs -sSf | sh -s -- -y && \ curl https://sh.rustup.rs -sSf | sh -s -- -y && \
npm install -g yarn pnpm lerna && \ npm install -g yarn pnpm lerna && \
ln -sf /usr/bin/clang-14 /usr/bin/clang && \ ln -sf /usr/bin/clang-15 /usr/bin/clang && \
ln -sf /usr/bin/clang++-14 /usr/bin/clang++ && \ ln -sf /usr/bin/clang++-15 /usr/bin/clang++ && \
ln -sf /usr/bin/lld-14 /usr/bin/lld && \ ln -sf /usr/bin/lld-15 /usr/bin/lld && \
ln -sf /usr/bin/clang-14 /usr/bin/cc ln -sf /usr/bin/clang-15 /usr/bin/cc
RUN wget https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.xz && \ RUN wget https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.xz && \
tar -xf nasm-${NASM_VERSION}.tar.xz && \ tar -xf nasm-${NASM_VERSION}.tar.xz && \