Skip to content

Commit 500f2b1

Browse files
committed
Trying to improve runtime builds and testing in linux.
1 parent 30dacb4 commit 500f2b1

File tree

4 files changed

+68
-10
lines changed

4 files changed

+68
-10
lines changed

.github/workflows/docker-hub.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
push:
99
branches:
1010
- master
11-
- develop
1211
tags:
1312
- 'v*.*.*'
1413

@@ -45,6 +44,9 @@ jobs:
4544
bash ./docker-compose.sh push
4645
elif [[ "${{ contains(github.ref, 'refs/tags/') }}" = true ]]; then
4746
bash ./docker-compose.sh version
47+
else
48+
echo "Failed to push the docker images"
49+
exit 1
4850
fi
4951
5052
- name: Logout from DockerHub

.github/workflows/linux-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
fetch-depth: 0
3232

3333
- name: Install, build and run tests
34-
run: ./docker-compose.sh test
34+
run: ./docker-compose.sh build
3535
env:
3636
METACALL_BUILD_TYPE: ${{ matrix.build }}
3737
METACALL_BASE_IMAGE: ${{ matrix.image }}

tools/metacall-environment.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,8 @@ sub_c(){
607607

608608
case ${LINUX_DISTRO} in
609609
debian)
610-
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ] || [ "${VERSION_CODENAME}" = "bookworm" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
611-
# TODO: For now, bookworm || trixie == sid, change when bookworm || trixie is released
610+
# For now trixie == sid, change when trixie is released
611+
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
612612
CODENAME="unstable"
613613
LINKNAME=""
614614
else
@@ -779,8 +779,8 @@ sub_clangformat(){
779779

780780
case ${LINUX_DISTRO} in
781781
debian)
782-
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ] || [ "${VERSION_CODENAME}" = "bookworm" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
783-
# TODO: For now, bookworm || trixie == sid, change when bookworm || trixie is released
782+
# For now trixie == sid, change when trixie is released
783+
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
784784
CODENAME="unstable"
785785
LINKNAME=""
786786
else

tools/metacall-runtime.sh

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,37 @@ sub_file(){
202202
sub_rpc(){
203203
echo "configure rpc"
204204

205-
sub_apt_install_hold libcurl4
205+
if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then
206+
if [ "${LINUX_DISTRO}" = "debian" ] || [ "${LINUX_DISTRO}" = "ubuntu" ]; then
207+
UBUNTU_CODENAME=""
208+
CODENAME_FROM_ARGUMENTS=""
209+
210+
# Obtain VERSION_CODENAME and UBUNTU_CODENAME (for Ubuntu and its derivatives)
211+
. /etc/os-release
212+
213+
case ${LINUX_DISTRO} in
214+
debian)
215+
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ]; then
216+
CODENAME="unstable"
217+
else
218+
CODENAME="${VERSION_CODENAME}"
219+
fi
220+
;;
221+
*)
222+
# Ubuntu and its derivatives
223+
if [ -n "${UBUNTU_CODENAME}" ]; then
224+
CODENAME="${UBUNTU_CODENAME}"
225+
fi
226+
;;
227+
esac
228+
229+
if [ "${CODENAME}" = "trixie" ] || [ "${CODENAME}" = "unstable" ]; then
230+
sub_apt_install_hold libcurl4t64
231+
else
232+
sub_apt_install_hold libcurl4
233+
fi
234+
fi
235+
fi
206236
}
207237

208238
# WebAssembly
@@ -235,8 +265,8 @@ sub_c(){
235265

236266
case ${LINUX_DISTRO} in
237267
debian)
238-
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ] || [ "${VERSION_CODENAME}" = "bookworm" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
239-
# TODO: For now, bookworm || trixie == sid, change when bookworm || trixie is released
268+
# For now trixie == sid, change when trixie is released
269+
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ] || [ "${VERSION_CODENAME}" = "trixie" ]; then
240270
CODENAME="unstable"
241271
LINKNAME=""
242272
else
@@ -293,7 +323,33 @@ sub_backtrace(){
293323

294324
if [ "${OPERATIVE_SYSTEM}" = "Linux" ]; then
295325
if [ "${LINUX_DISTRO}" = "debian" ] || [ "${LINUX_DISTRO}" = "ubuntu" ]; then
296-
sub_apt_install_hold libdw1
326+
UBUNTU_CODENAME=""
327+
CODENAME_FROM_ARGUMENTS=""
328+
329+
# Obtain VERSION_CODENAME and UBUNTU_CODENAME (for Ubuntu and its derivatives)
330+
. /etc/os-release
331+
332+
case ${LINUX_DISTRO} in
333+
debian)
334+
if [ "${VERSION:-}" = "unstable" ] || [ "${VERSION:-}" = "testing" ]; then
335+
CODENAME="unstable"
336+
else
337+
CODENAME="${VERSION_CODENAME}"
338+
fi
339+
;;
340+
*)
341+
# Ubuntu and its derivatives
342+
if [ -n "${UBUNTU_CODENAME}" ]; then
343+
CODENAME="${UBUNTU_CODENAME}"
344+
fi
345+
;;
346+
esac
347+
348+
if [ "${CODENAME}" = "trixie" ] || [ "${CODENAME}" = "unstable" ]; then
349+
sub_apt_install_hold libdw1t64 libelf1t64
350+
else
351+
sub_apt_install_hold libdw1
352+
fi
297353
elif [ "${LINUX_DISTRO}" = "alpine" ]; then
298354
$SUDO_CMD apk add --no-cache binutils
299355
fi

0 commit comments

Comments
 (0)