Skip to content

Commit

Permalink
Downgrade to jammy again.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Feb 8, 2024
1 parent 88b3909 commit aba40df
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ COMPOSE_PROJECT_NAME='metacall'
# Configure default variables
METACALL_PATH=/usr/local/metacall
METACALL_BUILD_TYPE=relwithdebinfo
METACALL_BASE_IMAGE=debian:trixie-slim # debian:bookworm-slim # ubuntu:mantic # alpine:3.17
METACALL_BASE_IMAGE=debian:trixie-slim # debian:bookworm-slim # ubuntu:jammy # alpine:3.17
2 changes: 1 addition & 1 deletion .github/workflows/linux-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: ["debian:trixie-slim", "debian:bookworm-slim", "ubuntu:mantic"]
image: ["debian:trixie-slim", "debian:bookworm-slim", "ubuntu:jammy"]
sanitizer: [address-sanitizer, thread-sanitizer] # TODO: memory-sanitizer not supported by GCC

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
build: [debug, release]
image: ["debian:trixie-slim", "debian:bookworm-slim", "ubuntu:mantic"] # TODO: "alpine:3.17"
image: ["debian:trixie-slim", "debian:bookworm-slim", "ubuntu:jammy"] # TODO: "alpine:3.17"

steps:
- name: Check out the repository
Expand Down
6 changes: 5 additions & 1 deletion tools/metacall-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ sub_c(){
echo "configure c"

if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then
if [ "${LINUX_DISTRO}" = "debian" ] || [ "${LINUX_DISTRO}" = "ubuntu" ]; then
if [ "${LINUX_DISTRO}" = "debian" ]; then
LLVM_VERSION_STRING=11
UBUNTU_CODENAME=""
CODENAME_FROM_ARGUMENTS=""
Expand Down Expand Up @@ -621,6 +621,10 @@ sub_c(){
$SUDO_CMD sh -c "echo \"deb-src http://apt.llvm.org/${CODENAME}/ llvm-toolchain${LINKNAME}-${LLVM_VERSION_STRING} main\" >> /etc/apt/sources.list"
$SUDO_CMD apt-get update
$SUDO_CMD apt-get install -y --no-install-recommends libffi-dev libclang-${LLVM_VERSION_STRING}-dev
elif [ "${LINUX_DISTRO}" = "ubuntu" ]; then
# LLVM 11 is available on Ubuntu
LLVM_VERSION_STRING=11
$SUDO_CMD apt-get install -y --no-install-recommends libffi-dev libclang-${LLVM_VERSION_STRING}-dev
elif [ "${LINUX_DISTRO}" = "alpine" ]; then
$SUDO_CMD apk add --no-cache libffi-dev
$SUDO_CMD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing tcc
Expand Down
79 changes: 44 additions & 35 deletions tools/metacall-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,41 +218,50 @@ sub_java(){
sub_c(){
echo "configure c"

LLVM_VERSION_STRING=11
UBUNTU_CODENAME=""
CODENAME_FROM_ARGUMENTS=""

# Obtain VERSION_CODENAME and UBUNTU_CODENAME (for Ubuntu and its derivatives)
. /etc/os-release

case ${LINUX_DISTRO} in
debian)
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ] || [ "${VERSION_CODENAME}" = "bookworm" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
# TODO: For now, bookworm || trixie == sid, change when bookworm || trixie is released
CODENAME="unstable"
LINKNAME=""
else
# "stable" Debian release
CODENAME="${VERSION_CODENAME}"
LINKNAME="-${CODENAME}"
fi
;;
*)
# ubuntu and its derivatives
if [ -n "${UBUNTU_CODENAME}" ]; then
CODENAME="${UBUNTU_CODENAME}"
if [ -n "${CODENAME}" ]; then
LINKNAME="-${CODENAME}"
fi
fi
;;
esac

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | $SUDO_CMD apt-key add
$SUDO_CMD sh -c "echo \"deb http://apt.llvm.org/${CODENAME}/ llvm-toolchain${LINKNAME}-${LLVM_VERSION_STRING} main\" >> /etc/apt/sources.list"
$SUDO_CMD sh -c "echo \"deb-src http://apt.llvm.org/${CODENAME}/ llvm-toolchain${LINKNAME}-${LLVM_VERSION_STRING} main\" >> /etc/apt/sources.list"
$SUDO_CMD apt-get update
sub_apt_install_hold libffi libclang-${LLVM_VERSION_STRING}
if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then
LLVM_VERSION_STRING=11

if [ "${LINUX_DISTRO}" = "debian" ]; then
UBUNTU_CODENAME=""
CODENAME_FROM_ARGUMENTS=""

# Obtain VERSION_CODENAME and UBUNTU_CODENAME (for Ubuntu and its derivatives)
. /etc/os-release

case ${LINUX_DISTRO} in
debian)
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ] || [ "${VERSION_CODENAME}" = "bookworm" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
# TODO: For now, bookworm || trixie == sid, change when bookworm || trixie is released
CODENAME="unstable"
LINKNAME=""
else
# "stable" Debian release
CODENAME="${VERSION_CODENAME}"
LINKNAME="-${CODENAME}"
fi
;;
*)
# ubuntu and its derivatives
if [ -n "${UBUNTU_CODENAME}" ]; then
CODENAME="${UBUNTU_CODENAME}"
if [ -n "${CODENAME}" ]; then
LINKNAME="-${CODENAME}"
fi
fi
;;
esac

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | $SUDO_CMD apt-key add
$SUDO_CMD sh -c "echo \"deb http://apt.llvm.org/${CODENAME}/ llvm-toolchain${LINKNAME}-${LLVM_VERSION_STRING} main\" >> /etc/apt/sources.list"
$SUDO_CMD sh -c "echo \"deb-src http://apt.llvm.org/${CODENAME}/ llvm-toolchain${LINKNAME}-${LLVM_VERSION_STRING} main\" >> /etc/apt/sources.list"
$SUDO_CMD apt-get update
sub_apt_install_hold libffi libclang-${LLVM_VERSION_STRING}
elif [ "${LINUX_DISTRO}" = "ubuntu" ]; then
# LLVM 11 is available on Ubuntu
LLVM_VERSION_STRING=11
sub_apt_install_hold libffi libclang-${LLVM_VERSION_STRING}
fi
fi
}

# Cobol
Expand Down

0 comments on commit aba40df

Please sign in to comment.