Merge pull request #353 from aminya/modern

fix: use the modern bundle in the docker images
This commit is contained in:
Amin Ya 2025-03-02 11:47:18 -08:00 committed by GitHub
commit 50c4edcfba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 17 additions and 17 deletions

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-arch:latest AS setup-cpp-arch-gcc
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler gcc && \
# arch cleanup
pacman -Scc --noconfirm && \

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-arch:latest AS setup-cpp-arch-llvm
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler llvm && \
# arch cleanup
pacman -Scc --noconfirm && \

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-arch:latest AS setup-cpp-arch-mingw
# install mingw/powershell
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler mingw \
--powershell true && \
# arch cleanup

View File

@ -15,12 +15,12 @@ RUN pacman -Syuu --noconfirm && \
FROM --platform=$BUILDPLATFORM arch-nodejs AS setup-cpp-arch
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
COPY "./dist/modern" "/usr/lib/setup-cpp/"
# install the cpp tools
RUN pacman -Syuu --noconfirm && \
pacman-db-upgrade && \
node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--cmake true \
--ninja true \
--task true \

View File

@ -7,8 +7,8 @@ async function main() {
const dockerFileContent = await readFile(`./dev/docker/setup-cpp/setup-cpp-${name}.dockerfile`, "utf-8")
const modifiedDockerFile = dockerFileContent
// load the externally built setup-cpp
.replace(/FROM (.*)/g, `FROM $1\n\nCOPY "./dist/legacy" "/usr/lib/setup-cpp/"`)
.replace("setup-cpp ", "node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js ")
.replace(/FROM (.*)/g, `FROM $1\n\nCOPY "./dist/modern" "/usr/lib/setup-cpp/"`)
.replace("setup-cpp ", "node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs ")
// remove the npm install line
.replace(/# install setup-cpp\n\s*npm install -g setup-cpp.*\n/, "")

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-gcc
# install gcc
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler gcc && \
# cleanup
dnf clean all && \

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-llvm
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler llvm && \
# cleanup
dnf clean all && \

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-mingw
# install mingw
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler mingw \
--powershell true && \
# cleanup

View File

@ -9,10 +9,10 @@ RUN dnf -y install nodejs npm && \
FROM --platform=$BUILDPLATFORM fedora-nodejs AS setup-cpp-fedora
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
COPY "./dist/modern" "/usr/lib/setup-cpp/"
# install the cpp tools
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--cmake true \
--ninja true \
--task true \

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-gcc
# install gcc
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler gcc && \
# cleanup
nala autoremove -y && \

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-llvm
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler llvm && \
# cleanup
nala autoremove -y && \

View File

@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-mingw
# install mingw/powershell
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler mingw \
--powershell true && \
# cleanup

View File

@ -17,10 +17,10 @@ RUN apt-get update -qq && \
#### Base Image with Tools
FROM --platform=$BUILDPLATFORM ubuntu-nodejs AS setup-cpp-ubuntu
COPY "./dist/legacy" "/usr/lib/setup-cpp/"
COPY "./dist/modern" "/usr/lib/setup-cpp/"
# install the cpp tools
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.js \
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--nala true \
--cmake true \
--ninja true \