Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"integrity": "sha256:6e0bb2ce80caca1d94f44dab5d0653d88a1c00984e590adb7c6bce012d0ade6e"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "2.12.2",
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:842d2ed40827dc91b95ef727771e170b0e52272404f00dba063cee94eafac4bb",
"integrity": "sha256:842d2ed40827dc91b95ef727771e170b0e52272404f00dba063cee94eafac4bb"
"version": "2.12.4",
"resolved": "ghcr.io/devcontainers/features/docker-in-docker@sha256:7f32d985aac6929b4f37cf8a0bdb9196473e9e192281a3d708207a70633f83df",
"integrity": "sha256:7f32d985aac6929b4f37cf8a0bdb9196473e9e192281a3d708207a70633f83df"
},
"ghcr.io/devcontainers/features/git-lfs:1": {
"version": "1.2.5",
Expand Down
55 changes: 44 additions & 11 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,52 @@
#!/usr/bin/env bash
set -euxo pipefail

IMAGES=("--image-name \"ghcr.io/eclipse-score/devcontainer:main\"")
if [ "$#" -gt 0 ]; then
IMAGES=()
for arg in "$@"; do
IMAGES+=("--image-name \"ghcr.io/eclipse-score/devcontainer:${arg}\"")
# Define target architectures
ARCHITECTURES=("amd64" "arm64")

# Prepare manifest creation command
MANIFEST_MAIN_CALL="docker manifest create ghcr.io/eclipse-score/devcontainer:main"

for ARCH in "${ARCHITECTURES[@]}"; do
echo "Building for architecture: ${ARCH}"

# Prepare image names - they should include the architectures and also tags if provided
IMAGES=("--image-name \"ghcr.io/eclipse-score/devcontainer:main-${ARCH}\"")
# Handle additional tags if provided
if [ "$#" -gt 0 ]; then
IMAGES=()
for arg in "$@"; do
IMAGES+=("--image-name \"ghcr.io/eclipse-score/devcontainer:${arg}\"")
done
fi

# Prepare devcontainer build command
DEVCONTAINER_CALL="devcontainer build --push --workspace-folder src/s-core-devcontainer --cache-from ghcr.io/eclipse-score/devcontainer"

# Append image names to the build command
for IMAGE in "${IMAGES[@]}"; do
DEVCONTAINER_CALL+=" $IMAGE"
done
fi

DEVCONTAINER_CALL="devcontainer build --push --workspace-folder src/s-core-devcontainer --cache-from ghcr.io/eclipse-score/devcontainer"
# Execute the build for the specific architecture
eval "$DEVCONTAINER_CALL --platform linux/${ARCH}"

for IMAGE in "${IMAGES[@]}"; do
DEVCONTAINER_CALL+=" $IMAGE"
# Append the architecture-specific image to the manifest creation command (those need to be merged into *one* manifest)
MANIFEST_MAIN_CALL+="ghcr.io/eclipse-score/devcontainer:main-${ARCH}"
done

eval "$DEVCONTAINER_CALL --platform linux/arm64"
eval "$DEVCONTAINER_CALL --platform linux/amd64"
# Create and push the manifest for 'main' tag
eval "$MANIFEST_MAIN_CALL"
docker manifest push ghcr.io/eclipse-score/devcontainer:main

# If additional tags are provided: merge metadata and push those as well
if [ "$#" -gt 0 ]; then
for arg in "$@"; do
MANIFEST_TAG_CALL="docker manifest create ghcr.io/eclipse-score/devcontainer:${arg}"
for ARCH in "${ARCHITECTURES[@]}"; do
MANIFEST_TAG_CALL+=" ghcr.io/eclipse-score/devcontainer:${arg}-${ARCH}"
done
eval "$MANIFEST_TAG_CALL"
docker manifest push ghcr.io/eclipse-score/devcontainer:${arg}
done
fi
10 changes: 0 additions & 10 deletions src/s-core-devcontainer/.devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:00fd45550f578d9d515044d9e2226e908dbc3d7aa6fcb9dee4d8bdb60be114cf",
"integrity": "sha256:00fd45550f578d9d515044d9e2226e908dbc3d7aa6fcb9dee4d8bdb60be114cf"
},
"ghcr.io/devcontainers/features/git": {
"version": "1.3.4",
"resolved": "ghcr.io/devcontainers/features/git@sha256:f24645e64ad39a596131a50ec96f7d5cf7a2a87544cce772dd4b7182a233e98a",
"integrity": "sha256:f24645e64ad39a596131a50ec96f7d5cf7a2a87544cce772dd4b7182a233e98a"
},
"ghcr.io/devcontainers/features/git-lfs": {
"version": "1.2.5",
"resolved": "ghcr.io/devcontainers/features/git-lfs@sha256:71c2b371cf12ab7fcec47cf17369c6f59156100dad9abf9e4c593049d789de72",
"integrity": "sha256:71c2b371cf12ab7fcec47cf17369c6f59156100dad9abf9e4c593049d789de72"
},
"ghcr.io/devcontainers/features/rust": {
"version": "1.5.0",
"resolved": "ghcr.io/devcontainers/features/rust@sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c",
Expand Down
10 changes: 0 additions & 10 deletions src/s-core-devcontainer/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
"context": "."
},
"features": {
"ghcr.io/devcontainers/features/git": {
"version": "2.49.0",
"ppa": "true"
},
"ghcr.io/devcontainers/features/git-lfs": {
"version": "3.7.0",
"autoPull": "false" // do not automatically pull LFS files when creating the container
},
"ghcr.io/devcontainers/features/common-utils": {
// Installs latest version from the Distribution
"installZsh": "false",
Expand Down Expand Up @@ -42,8 +34,6 @@
"overrideFeatureInstallOrder": [
// this order makes it more convenient to develop the s-core-local feature, since it will be installed last
// which means changes to it will be applied without needing to rebuild all other features
"ghcr.io/devcontainers/features/git",
"ghcr.io/devcontainers/features/git-lfs",
"ghcr.io/devcontainers/features/common-utils",
"ghcr.io/devcontainers-community/features/llvm",
"ghcr.io/devcontainers/features/rust",
Expand Down
4 changes: 4 additions & 0 deletions src/s-core-devcontainer/.devcontainer/s-core-local/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ apt-get install -y graphviz="${graphviz_version}*"
# Protobuf compiler, via APT (needed by FEO)
apt-get install -y protobuf-compiler="${protobuf_compiler_version}*"

# Git and Git LFS, via APT
apt-get install -y git
apt-get install -y git-lfs

# Python, via APT
apt-get install -y python${python_version} python3-pip python3-venv
# The following packages correspond to the list of packages installed by the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ check "validate graphviz has the correct version" bash -c "dpkg -s graphviz | gr
# Other build-related tools
check "validate protoc is working and has the correct version" bash -c "protoc --version | grep 'libprotoc ${protobuf_compiler_version}'"

# Common tooling
check "validate git is working and has the correct version" bash -c "git --version | grep '${git_version}'"
check "validate git-lfs is working and has the correct version" bash -c "git lfs version | grep '${git_lfs_version}'"

# Python-related tools (a selected sub-set; others may be added later)
check "validate python3 is working and has the correct version" bash -c "python3 --version | grep '${python_version}'"
check "validate pip3 is working and has the correct version" bash -c "pip3 --version | grep '${python_version}'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ qemu_system_arm:
sshpass:
version: 1.09

git:
version: "2.43.0"

git_lfs:
version: "3.4.1"

python:
version: "3.12"

Expand Down
4 changes: 0 additions & 4 deletions src/s-core-devcontainer/test-project/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ SCRIPT_PATH=$(readlink -f "$0")
SCRIPT_DIR=$(dirname -- "${SCRIPT_PATH}")
source "${SCRIPT_DIR}/../../../scripts/test-utils.sh" vscode

# Common tooling
check "validate git is working and has the correct version" bash -c "git --version | grep '2.49.0'"
check "validate git-lfs is working and has the correct version" bash -c "git lfs version | grep '3.7.0'"

# C++ tooling
check "validate clangd is working and has the correct version" bash -c "clangd --version | grep '20.1.8'"
check "validate clang-format is working and has the correct version" bash -c "clang-format --version | grep '20.1.8'"
Expand Down