File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,11 @@ jobs:
1818 fail-fast : false
1919 matrix :
2020 baseimage : ['debian:bullseye', 'ubuntu:20.04', 'ubuntu:22.04']
21+ go : [1.23, 1.24]
2122 steps :
2223 - uses : actions/checkout@v4
2324 - name : Run tests in container
24- run : ./scripts/ci-runner.sh run_in_ct ${{ matrix.baseimage }}
25+ run : ./scripts/ci-runner.sh run_in_ct ${{ matrix.baseimage }} ${{ matrix.go }}
2526
2627 all-done :
2728 needs :
Original file line number Diff line number Diff line change @@ -25,19 +25,31 @@ function build_tests {
2525
2626function run_in_ct {
2727 local image=$1
28+ local gover=$2
2829 local name=" go-systemd/container-tests"
2930 local cidfile=/tmp/cidfile.$$
3031 local cid
3132
33+ # Figure out Go URL, based on $gover.
34+ local prefix=" https://go.dev/dl/" filename
35+ filename=$( curl -fsSL " ${prefix} ?mode=json&include=all" |
36+ jq -r --arg Ver " go$gover " ' . | map(select(.version | contains($Ver))) | first | .files[] | select(.os == "linux" and .arch == "amd64" and .kind == "archive") | .filename' )
37+ gourl=" ${prefix}${filename} "
38+
3239 set -x
3340 docker pull " $image "
3441 docker run -i --privileged --cidfile=" $cidfile " " $image " /bin/bash -e -x << EOF
3542export DEBIAN_FRONTEND=noninteractive
3643apt-get -qq update
3744apt-get -qq install -y -o Dpkg::Use-Pty=0 \
38- sudo build-essential git golang dbus libsystemd-dev libpam-systemd systemd-container
45+ sudo build-essential curl git dbus libsystemd-dev libpam-systemd systemd-container
3946# Fixup git.
4047git config --global --add safe.directory /src
48+ # Install Go.
49+ curl -fsSL "$gourl " | tar Cxz /usr/local
50+ ln -s /usr/local/go/bin/go /usr/local/bin/go
51+ go version
52+ go env
4153EOF
4254 cid=$( cat " $cidfile " )
4355 rm -f " $cidfile "
You can’t perform that action at this time.
0 commit comments