Skip to content
Snippets Groups Projects
Commit b6528507 authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'wip/denittis/t22558' into 'master'

gitlab-ci: Run tests/containers.py in CI

See merge request steam/pressure-vessel!76
parents 5671388c be2bcb63
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,9 @@ variables: ...@@ -34,6 +34,9 @@ variables:
# Set non-empty to require # Set non-empty to require
CI_NEED_NEWER_STEAM_RUNTIME_TOOLS: '' CI_NEED_NEWER_STEAM_RUNTIME_TOOLS: ''
IMAGES_DOWNLOAD_URL: ''
IMAGES_DOWNLOAD_CREDENTIAL: ''
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
SCOUT_DOCKER_REGISTRY: registry.gitlab.steamos.cloud SCOUT_DOCKER_REGISTRY: registry.gitlab.steamos.cloud
...@@ -47,6 +50,10 @@ variables: ...@@ -47,6 +50,10 @@ variables:
STEAM_RUNTIME_TOOLS_GIT_REPO: https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.steamos.cloud/steam/steam-runtime-tools.git STEAM_RUNTIME_TOOLS_GIT_REPO: https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.steamos.cloud/steam/steam-runtime-tools.git
STEAM_RUNTIME_TOOLS_GIT_BRANCH: master STEAM_RUNTIME_TOOLS_GIT_BRANCH: master
stages:
- build
- test
build:devel: build:devel:
stage: build stage: build
tags: tags:
...@@ -180,7 +187,147 @@ build: ...@@ -180,7 +187,147 @@ build:
rules: rules:
- if: '$CI_NEED_NEWER_STEAM_RUNTIME_TOOLS == ""' - if: '$CI_NEED_NEWER_STEAM_RUNTIME_TOOLS == ""'
.prepare_test: &prepare_test
- |
set -eux
PRESSURE_VESSEL=$(ls _build/pressure-vessel-*-bin.tar.gz | head -1)
if [ -n "${IMAGES_DOWNLOAD_URL}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL}" ]; then
python3 populate-depot.py \
--depot=_depot \
--include-sdk \
--unpack-runtimes \
--credential-env IMAGES_DOWNLOAD_CREDENTIAL \
--images-uri "${IMAGES_DOWNLOAD_URL}"/steamrt-SUITE/snapshots \
--pressure-vessel "${PRESSURE_VESSEL}" \
scout \
soldier \
${NULL+}
else
python3 populate-depot.py \
--depot=_depot \
--include-sdk \
--unpack-runtimes \
--pressure-vessel "${PRESSURE_VESSEL}" \
--version latest-steam-client-public-beta \
scout \
${NULL+}
fi
.i386_dependencies: &i386_dependencies
- |
set -eux
dpkg --add-architecture i386
apt-get -y update
apt-get -y --no-install-recommends install \
libc6-i386 \
libgl1-mesa-dri:i386 \
${NULL+}
.test_template:
needs:
- "build:scout"
stage: test
tags:
- docker
- linux
variables:
STEAM_CI_DEPENDENCIES: >-
libgl1-mesa-dri
locales
python3
test:buster:
extends: .test_template
image: debian:buster-slim
script:
- *prepare_test
- *i386_dependencies
- |
set -eux
export AUTOPKGTEST_ARTIFACTS="$(pwd)/_buster_test_logs"
export PRESSURE_VESSEL_TEST_CONTAINERS="$(pwd)/_depot"
python3 tests/containers.py
artifacts:
paths:
- _buster_test_logs
test:bionic:
extends: .test_template
image: ubuntu:18.04
script:
- *prepare_test
- *i386_dependencies
- |
set -eux
export AUTOPKGTEST_ARTIFACTS="$(pwd)/_bionic_test_logs"
export PRESSURE_VESSEL_TEST_CONTAINERS="$(pwd)/_depot"
python3 tests/containers.py
artifacts:
paths:
- _bionic_test_logs
test:focal:
extends: .test_template
image: ubuntu:20.04
script:
- *prepare_test
- *i386_dependencies
- |
set -eux
export AUTOPKGTEST_ARTIFACTS="$(pwd)/_ubuntu_focal_test_logs"
export PRESSURE_VESSEL_TEST_CONTAINERS="$(pwd)/_depot"
python3 tests/containers.py
artifacts:
paths:
- _ubuntu_focal_test_logs
test:archlinux:
extends: .test_template
image: archlinux:latest
# TODO this test does not work yet
when: manual
# Do not use the global before_script because it is only for Debian based
# distros
before_script:
- |
set -eux
pacman -Syu --needed --noconfirm --noprogressbar \
base-devel \
git \
python \
python-tappy \
sudo \
${NULL+}
tempdir="$(mktemp -d)"
git clone --branch debian/buster https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.steamos.cloud/packaging/python-debian.git "$tempdir/python-debian"
export PYTHONPATH="$tempdir/python-debian/lib"
script:
- *prepare_test
- |
set -eux
export AUTOPKGTEST_ARTIFACTS="$(pwd)/_archlinux_test_logs"
export PRESSURE_VESSEL_TEST_CONTAINERS="$(pwd)/_depot"
python3 tests/containers.py
artifacts:
paths:
- _archlinux_test_logs
autopkgtest: autopkgtest:
stage: test
variables: variables:
STEAM_CI_INSTALL_SCRIPT: | STEAM_CI_INSTALL_SCRIPT: |
# We need up-to-date packages for the relocatable install to # We need up-to-date packages for the relocatable install to
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment