From 68faeb6d600711840274d85c1e24ed9551ba6dc3 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 14 Nov 2023 09:58:58 +0800 Subject: [PATCH] build: upgrade toolchain in Docker (#1810) - llvm 16 - zig 0.11.0 --- .github/workflows/docker.yaml | 8 ++++---- alpine-zig.Dockerfile | 2 +- debian-aarch64.Dockerfile | 24 ++++++++++++------------ debian-zig.Dockerfile | 2 +- debian.Dockerfile | 22 +++++++++++----------- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 54bc4802..0e76c859 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -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 diff --git a/alpine-zig.Dockerfile b/alpine-zig.Dockerfile index 593631e7..bb8c9539 100644 --- a/alpine-zig.Dockerfile +++ b/alpine-zig.Dockerfile @@ -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 && \ diff --git a/debian-aarch64.Dockerfile b/debian-aarch64.Dockerfile index 93a01eb9..983b1edf 100644 --- a/debian-aarch64.Dockerfile +++ b/debian-aarch64.Dockerfile @@ -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 diff --git a/debian-zig.Dockerfile b/debian-zig.Dockerfile index 0d337d0e..40e0eb2a 100644 --- a/debian-zig.Dockerfile +++ b/debian-zig.Dockerfile @@ -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 && \ diff --git a/debian.Dockerfile b/debian.Dockerfile index 2c1922a8..94d82e33 100644 --- a/debian.Dockerfile +++ b/debian.Dockerfile @@ -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 && \