Skip to content

Commit be9505b

Browse files
authored
Merge pull request #375 from aminya/ubuntu-base-versions
feat: add Ubuntu 20 and 24 docker builds
2 parents fd0d475 + 2428548 commit be9505b

13 files changed

+81
-80
lines changed

.github/workflows/CI.yml

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ jobs:
228228
node ./dist/legacy/setup-cpp.js --gcc true --cmake true
229229
230230
Docker:
231-
name: Docker-${{ matrix.container.image }}-${{ matrix.platform }}
231+
name: Docker-${{ matrix.container.image }}-${{ matrix.platform }}-${{ matrix.container.tag }}
232232
needs: [Build]
233233
runs-on: ${{ matrix.os }}
234234
strategy:
@@ -239,13 +239,21 @@ jobs:
239239
platform:
240240
- linux/amd64
241241
container:
242-
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04-1.2.2" }
242+
- { distro: "ubuntu", image: "setup-cpp-ubuntu", BASE_VERSION: "24.04", tag: "24.04-1.2.2" }
243+
- { distro: "ubuntu", image: "setup-cpp-ubuntu", BASE_VERSION: "22.04", tag: "22.04-1.2.2" }
244+
- { distro: "ubuntu", image: "setup-cpp-ubuntu", BASE_VERSION: "20.04", tag: "20.04-1.2.2" }
243245
- { distro: "fedora", image: "setup-cpp-fedora", tag: "40-1.2.2" }
244246
- { distro: "arch", image: "setup-cpp-arch", tag: "base-1.2.2" }
245247
include:
246248
- os: ubuntu-24.04-arm
247249
platform: linux/arm64
248-
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04-1.2.2" }
250+
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", BASE_VERSION: "24.04", tag: "24.04-1.2.2" }
251+
- os: ubuntu-24.04-arm
252+
platform: linux/arm64
253+
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", BASE_VERSION: "22.04", tag: "22.04-1.2.2" }
254+
- os: ubuntu-24.04-arm
255+
platform: linux/arm64
256+
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", BASE_VERSION: "20.04", tag: "20.04-1.2.2" }
249257
steps:
250258
- uses: actions/checkout@v4
251259
with:
@@ -285,6 +293,7 @@ jobs:
285293
tags: aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ steps.platform.outputs.suffix }}
286294
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ steps.platform.outputs.suffix }}
287295
cache-to: type=inline
296+
build-args: BASE_VERSION=${{ matrix.container.BASE_VERSION || '' }}
288297

289298
- name: Tag latest locally
290299
run: |
@@ -432,6 +441,14 @@ jobs:
432441
needs: [Docker]
433442
runs-on: ubuntu-24.04
434443
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
444+
strategy:
445+
fail-fast: false
446+
matrix:
447+
container:
448+
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04-1.2.2", suffix: "", latest: true }
449+
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04-1.2.2", suffix: "-llvm", latest: true }
450+
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04-1.2.2", suffix: "-gcc", latest: true }
451+
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04-1.2.2", suffix: "-mingw", latest: true }
435452
steps:
436453
- name: Set up Docker Buildx
437454
uses: docker/setup-buildx-action@v3
@@ -444,53 +461,16 @@ jobs:
444461

445462
- uses: Noelware/[email protected]
446463
with:
447-
inputs: aminya/setup-cpp-ubuntu:22.04-1.2.2
448-
images: aminya/setup-cpp-ubuntu:22.04-1.2.2-amd64,aminya/setup-cpp-ubuntu:22.04-1.2.2-arm64
449-
push: true
450-
amend: true
451-
- uses: Noelware/[email protected]
452-
with:
453-
inputs: aminya/setup-cpp-ubuntu:latest
454-
images: aminya/setup-cpp-ubuntu:22.04-1.2.2-amd64,aminya/setup-cpp-ubuntu:22.04-1.2.2-arm64
455-
push: true
456-
amend: true
457-
458-
- uses: Noelware/[email protected]
459-
with:
460-
inputs: aminya/setup-cpp-ubuntu-llvm:22.04-1.2.2
461-
images: aminya/setup-cpp-ubuntu-llvm:22.04-1.2.2-amd64,aminya/setup-cpp-ubuntu-llvm:22.04-1.2.2-arm64
462-
push: true
463-
amend: true
464-
- uses: Noelware/[email protected]
465-
with:
466-
inputs: aminya/setup-cpp-ubuntu-llvm:latest
467-
images: aminya/setup-cpp-ubuntu-llvm:22.04-1.2.2-amd64,aminya/setup-cpp-ubuntu-llvm:22.04-1.2.2-arm64
464+
inputs: aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}
465+
images: aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-amd64,aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-arm64
468466
push: true
469467
amend: true
470468

471469
- uses: Noelware/[email protected]
470+
if: ${{ matrix.container.latest }}
472471
with:
473-
inputs: aminya/setup-cpp-ubuntu-gcc:22.04-1.2.2
474-
images: aminya/setup-cpp-ubuntu-gcc:22.04-1.2.2-amd64,aminya/setup-cpp-ubuntu-gcc:22.04-1.2.2-arm64
475-
push: true
476-
amend: true
477-
- uses: Noelware/[email protected]
478-
with:
479-
inputs: aminya/setup-cpp-ubuntu-gcc:latest
480-
images: aminya/setup-cpp-ubuntu-gcc:22.04-1.2.2-amd64,aminya/setup-cpp-ubuntu-gcc:22.04-1.2.2-arm64
481-
push: true
482-
amend: true
483-
484-
- uses: Noelware/[email protected]
485-
with:
486-
inputs: aminya/setup-cpp-ubuntu-mingw:22.04-1.2.2
487-
images: aminya/setup-cpp-ubuntu-mingw:22.04-1.2.2-amd64,aminya/setup-cpp-ubuntu-mingw:22.04-1.2.2-arm64
488-
push: true
489-
amend: true
490-
- uses: Noelware/[email protected]
491-
with:
492-
inputs: aminya/setup-cpp-ubuntu-mingw:latest
493-
images: aminya/setup-cpp-ubuntu-mingw:22.04-1.2.2-amd64,aminya/setup-cpp-ubuntu-mingw:22.04-1.2.2-arm64
472+
inputs: aminya/${{ matrix.container.image }}:latest
473+
images: aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-amd64,aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-arm64
494474
push: true
495475
amend: true
496476

dev/docker/ci/ubuntu-gcc.dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ FROM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-gcc
44
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
55
--compiler gcc && \
66
# cleanup
7-
nala autoremove -y && \
8-
nala autopurge -y && \
9-
apt-get clean && \
10-
nala clean --lists && \
7+
apt-get clean autoclean && \
8+
apt-get autoremove -y && \
119
rm -rf /var/lib/apt/lists/* && \
1210
rm -rf /tmp/*
1311

dev/docker/ci/ubuntu-llvm.dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ FROM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-llvm
44
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
55
--compiler llvm && \
66
# cleanup
7-
nala autoremove -y && \
8-
nala autopurge -y && \
9-
apt-get clean && \
10-
nala clean --lists && \
7+
apt-get clean autoclean && \
8+
apt-get autoremove -y && \
119
rm -rf /var/lib/apt/lists/* && \
1210
rm -rf /tmp/*
1311

dev/docker/ci/ubuntu-mingw.dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
55
--compiler mingw \
66
--powershell true && \
77
# cleanup
8-
nala autoremove -y && \
9-
nala autopurge -y && \
10-
apt-get clean && \
11-
nala clean --lists && \
8+
apt-get clean autoclean && \
9+
apt-get autoremove -y && \
1210
rm -rf /var/lib/apt/lists/* && \
1311
rm -rf /tmp/*
1412

dev/docker/ci/ubuntu.dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
ARG BASE_VERSION=22.04
2+
13
#### Base Image with Node.js
2-
FROM --platform=$BUILDPLATFORM ubuntu:22.04 AS ubuntu-nodejs
4+
FROM --platform=$BUILDPLATFORM ubuntu:${BASE_VERSION} AS ubuntu-nodejs
35

46
# install latest nodejs
57
RUN apt-get update -qq && \
68
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
79
mkdir -p /etc/apt/keyrings && \
810
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
9-
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
11+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
1012
apt-get update -qq && \
1113
apt-get install -y --no-install-recommends nodejs && \
1214
# cleanup
@@ -21,7 +23,6 @@ COPY "./dist/modern" "/usr/lib/setup-cpp/"
2123

2224
# install the cpp tools
2325
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
24-
--nala true \
2526
--cmake true \
2627
--ninja true \
2728
--task true \
@@ -36,10 +37,8 @@ RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
3637
--cmakelang true \
3738
--meson true && \
3839
# cleanup
39-
nala autoremove -y && \
40-
nala autopurge -y && \
41-
apt-get clean && \
42-
nala clean --lists && \
40+
apt-get clean autoclean && \
41+
apt-get autoremove -y && \
4342
rm -rf /var/lib/apt/lists/* && \
4443
rm -rf /tmp/*
4544

dev/docker/setup-cpp/setup-cpp-ubuntu-20.0.4-llvm.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN apt-get update -qq && \
77
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
88
mkdir -p /etc/apt/keyrings && \
99
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
10-
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
10+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
1111
apt-get update -qq && \
1212
apt-get install -y --no-install-recommends nodejs && \
1313
# install setup-cpp

dev/docker/setup-cpp/setup-cpp-ubuntu-llvm.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN apt-get update -qq && \
66
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
77
mkdir -p /etc/apt/keyrings && \
88
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
9-
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
9+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
1010
apt-get update -qq && \
1111
apt-get install -y --no-install-recommends nodejs && \
1212
# install setup-cpp

dev/docker/setup-cpp/setup-cpp-ubuntu-mingw.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN apt-get update -qq && \
66
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
77
mkdir -p /etc/apt/keyrings && \
88
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
9-
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
9+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
1010
apt-get update -qq && \
1111
apt-get install -y --no-install-recommends nodejs && \
1212
# install setup-cpp

dist/legacy/setup-cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)