Skip to content

Commit 06c7147

Browse files
committed
feat(core): Add support for musllinux_1_2
1 parent 0635a2f commit 06c7147

File tree

11 files changed

+159
-4
lines changed

11 files changed

+159
-4
lines changed

components/core/src/clp/SQLitePreparedStatement.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef CLP_SQLITEPREPAREDSTATEMENT_HPP
22
#define CLP_SQLITEPREPAREDSTATEMENT_HPP
33

4+
#include <cstdint>
45
#include <string>
56

67
#include <sqlite3/sqlite3.h>

components/core/src/clp_s/Utils.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <array>
55
#include <charconv>
6+
#include <cstdint>
67
#include <cstring>
78
#include <sstream>
89
#include <string>

components/core/src/glt/SQLitePreparedStatement.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef GLT_SQLITEPREPAREDSTATEMENT_HPP
22
#define GLT_SQLITEPREPAREDSTATEMENT_HPP
33

4+
#include <cstdint>
45
#include <string>
56

67
#include <sqlite3/sqlite3.h>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM quay.io/pypa/musllinux_1_2_aarch64
2+
3+
WORKDIR /root
4+
5+
RUN mkdir -p ./tools/scripts/lib_install
6+
COPY ./tools/scripts/lib_install ./tools/scripts/lib_install
7+
8+
RUN ./tools/scripts/lib_install/musllinux_1_2/install-all.sh
9+
10+
# Remove cached files
11+
RUN apk cache clean && rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
12+
13+
# NOTE: Don't flatten the image or else we'll lose any environment modifications from the base
14+
# image.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
set -o pipefail
5+
6+
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
7+
component_root="${script_dir}/../../../"
8+
9+
build_cmd=(
10+
docker buildx build
11+
--platform linux/arm64
12+
--tag clp-core-dependencies-arm64-musllinux_1_2:dev
13+
"$component_root"
14+
--file "${script_dir}/Dockerfile"
15+
--load
16+
)
17+
18+
if command -v git >/dev/null && git -C "$script_dir" rev-parse --is-inside-work-tree >/dev/null ;
19+
then
20+
build_cmd+=(
21+
--label "org.opencontainers.image.revision=$(git -C "$script_dir" rev-parse HEAD)"
22+
--label "org.opencontainers.image.source=$(git -C "$script_dir" remote get-url origin)"
23+
)
24+
fi
25+
26+
echo "Running: ${build_cmd[*]}"
27+
"${build_cmd[@]}"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM quay.io/pypa/musllinux_1_2_x86_64
2+
3+
WORKDIR /root
4+
5+
RUN mkdir -p ./tools/scripts/lib_install
6+
COPY ./tools/scripts/lib_install ./tools/scripts/lib_install
7+
8+
RUN ./tools/scripts/lib_install/musllinux_1_2/install-all.sh
9+
10+
# Remove cached files
11+
RUN apk cache clean && rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
12+
13+
# NOTE: Don't flatten the image or else we'll lose any environment modifications from the base
14+
# image.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
set -o pipefail
5+
6+
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
7+
component_root="${script_dir}/../../../"
8+
9+
build_cmd=(
10+
docker buildx build
11+
--platform linux/amd64
12+
--tag clp-core-dependencies-x86-musllinux_1_2:dev
13+
"$component_root"
14+
--file "${script_dir}/Dockerfile"
15+
--load
16+
)
17+
18+
if command -v git >/dev/null && git -C "$script_dir" rev-parse --is-inside-work-tree >/dev/null ;
19+
then
20+
build_cmd+=(
21+
--label "org.opencontainers.image.revision=$(git -C "$script_dir" rev-parse HEAD)"
22+
--label "org.opencontainers.image.source=$(git -C "$script_dir" remote get-url origin)"
23+
)
24+
fi
25+
26+
echo "Running: ${build_cmd[*]}"
27+
"${build_cmd[@]}"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
set -o pipefail
5+
6+
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
7+
8+
"${script_dir}/install-prebuilt-packages.sh"
9+
"${script_dir}/install-packages-from-source.sh"
10+
11+
# TODO: https://github.com/y-scope/clp/issues/795
12+
"${script_dir}/../check-cmake-version.sh"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
set -o pipefail
5+
6+
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
7+
lib_install_scripts_dir="${script_dir}/.."
8+
9+
# NOTE: The remaining installation scripts depend on boost, so we install it beforehand.
10+
"${lib_install_scripts_dir}/install-boost.sh" 1.87.0
11+
12+
# NOTE:
13+
# 1. libarchive may statically link with LZMA, LZ4, and Zstandard, so we install them beforehand.
14+
# 2. The versions of libarchive, LZMA, LZ4, and Zstandard available in manylinux_2_28's package
15+
# repositories are either dated or don't include static libraries, so we install more recent
16+
# versions from source.
17+
"${lib_install_scripts_dir}/liblzma.sh" 5.8.1
18+
"${lib_install_scripts_dir}/lz4.sh" 1.10.0
19+
"${lib_install_scripts_dir}/zstandard.sh" 1.5.7
20+
"${lib_install_scripts_dir}/libarchive.sh" 3.8.0
21+
22+
"${lib_install_scripts_dir}/msgpack.sh" 7.0.0
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
set -o pipefail
5+
6+
apk update && apk add \
7+
openjdk11-jdk \
8+
jq \
9+
curl-dev \
10+
bzip2-dev \
11+
bzip2-static \
12+
mariadb-connector-c-dev \
13+
openssl-dev \
14+
zlib-dev \
15+
zlib-static
16+
17+
# Install `task`
18+
# NOTE: We lock `task` to a version < 3.43 to avoid https://github.com/y-scope/clp/issues/
19+
VERSION=3.42.1
20+
ARCH=$(uname -m)
21+
case "$ARCH" in
22+
x86_64) ARCH=amd64 ;;
23+
aarch64) ARCH=arm64 ;;
24+
*) echo "Unsupported architecture: $ARCH"; exit 1 ;;
25+
esac
26+
27+
wget -O /tmp/task.tar.gz \
28+
"https://github.com/go-task/task/releases/download/v${VERSION}/task_linux_${ARCH}.tar.gz"
29+
30+
tar -C /usr/local/bin -xzf /tmp/task.tar.gz task
31+
chmod +x /usr/local/bin/task
32+
rm /tmp/task.tar.gz
33+
34+
# Downgrade to CMake v3 to work around https://github.com/y-scope/clp/issues/795
35+
pipx uninstall cmake
36+
pipx install cmake~=3.31

0 commit comments

Comments
 (0)