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

CI: Make relocatable builds with both production and debug binaries


The production build uses dpkg packages, built with -O2 -g and stripped.
This is similar to what we currently extract from a scout SDK build;
but if we do it here, we can decouple the pressure-vessel release process
from the scout release process, making it possible to issue a new
pressure-vessel release for use with pre-existing scout/soldier runtimes
much quicker than the time needed to do an entire scout release.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 2e7664bc
No related branches found
No related tags found
No related merge requests found
Pipeline #13910 canceled
This commit is part of merge request !317. Comments created here will be created in the context of that merge request.
...@@ -3,7 +3,6 @@ include: ...@@ -3,7 +3,6 @@ include:
file: '/steam-gitlab-ci-common.yml' file: '/steam-gitlab-ci-common.yml'
variables: variables:
BUILD_IMAGE: registry.gitlab.steamos.cloud/steamrt/scout/sdk:beta
STEAM_CI_USE_BINARIES_FROM: build STEAM_CI_USE_BINARIES_FROM: build
STEAM_CI_DEPENDENCIES: >- STEAM_CI_DEPENDENCIES: >-
debhelper debhelper
...@@ -51,6 +50,8 @@ variables: ...@@ -51,6 +50,8 @@ variables:
# different devices # different devices
STEAM_CI_TMPDIR: "${CI_PROJECT_DIR}/debian/tmpdir" STEAM_CI_TMPDIR: "${CI_PROJECT_DIR}/debian/tmpdir"
BUILD_IMAGE: '${SCOUT_DOCKER_REGISTRY}/${SCOUT_DOCKER_IMAGE}'
stages: stages:
- build - build
- relocatable-install - relocatable-install
...@@ -59,6 +60,7 @@ stages: ...@@ -59,6 +60,7 @@ stages:
package: package:
extends: .build_package extends: .build_package
variables: variables:
BUILD_IMAGE: '${SCOUT_DOCKER_REGISTRY}/${SCOUT_DOCKER_IMAGE}'
STEAM_CI_DEB_BUILD: full # debuild --build=full, aka -F STEAM_CI_DEB_BUILD: full # debuild --build=full, aka -F
STEAM_CI_INSTALL_SCRIPT: | STEAM_CI_INSTALL_SCRIPT: |
apt-get -y install pkg-create-dbgsym apt-get -y install pkg-create-dbgsym
...@@ -66,7 +68,7 @@ package: ...@@ -66,7 +68,7 @@ package:
package:i386: package:i386:
extends: .build_package extends: .build_package
variables: variables:
BUILD_IMAGE: registry.gitlab.steamos.cloud/steamrt/scout/sdk/i386:beta BUILD_IMAGE: '${SCOUT_DOCKER_REGISTRY}/${SCOUT_I386_DOCKER_IMAGE}'
STEAM_CI_DEB_BUILD: any # debuild --build=any, aka -B STEAM_CI_DEB_BUILD: any # debuild --build=any, aka -B
STEAM_CI_INSTALL_SCRIPT: | STEAM_CI_INSTALL_SCRIPT: |
apt-get -y install pkg-create-dbgsym apt-get -y install pkg-create-dbgsym
...@@ -199,7 +201,7 @@ build:scout-i386: ...@@ -199,7 +201,7 @@ build:scout-i386:
- _build/scout-i386/meson-logs/*.txt - _build/scout-i386/meson-logs/*.txt
when: always when: always
relocatable-install: relocatable-install:debug:
stage: relocatable-install stage: relocatable-install
needs: needs:
- build:scout - build:scout
...@@ -213,30 +215,84 @@ relocatable-install: ...@@ -213,30 +215,84 @@ relocatable-install:
- | - |
apt-get -y --no-install-recommends install \ apt-get -y --no-install-recommends install \
bubblewrap \ bubblewrap \
libglib2.0-dev \ libglib2.0-dev:amd64 \
libxau-dev \ libglib2.0-dev:i386 \
libxau-dev:amd64 \
libxau-dev:i386 \
meson \ meson \
waffle-utils-multiarch:amd64 \
waffle-utils-multiarch:i386 \
${NULL+} ${NULL+}
rm -fr _build/scout/relocatable-install rm -fr _build/debug/relocatable-install
mkdir -p _build/debug
_build/scout/prefix/lib/pressure-vessel/relocatable/bin/pressure-vessel-build-relocatable-install \ _build/scout/prefix/lib/pressure-vessel/relocatable/bin/pressure-vessel-build-relocatable-install \
--output _build/scout/relocatable-install \ --output _build/debug/relocatable-install \
--archive "$(pwd)/_build/scout" \ --archive "$(pwd)/_build/debug" \
${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \
${NULL+}
prove -epython3.5 -v ./tests/pressure-vessel/relocatable-install.py :: \
"$(pwd)/_build/debug/relocatable-install"
artifacts:
paths:
- _build/debug/pressure-vessel-*-bin.tar.gz
- _build/debug/pressure-vessel-*-bin+src.tar.gz
when: on_success
relocatable-install:production:
stage: relocatable-install
needs:
- package
- package:i386
tags:
- docker
- linux
image: "${SCOUT_DOCKER_REGISTRY}/${SCOUT_DOCKER_IMAGE}"
script:
- *prepare_scout
- |
apt-get -y --no-install-recommends install \
bubblewrap \
libglib2.0-dev:amd64 \
libglib2.0-dev:i386 \
libxau-dev:amd64 \
libxau-dev:i386 \
meson \
waffle-utils-multiarch:amd64 \
waffle-utils-multiarch:i386 \
${NULL+}
dpkg -i \
debian/tmp/artifacts/build/*_amd64.deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-0-dbgsym_*_i386.*deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-0_*_i386.deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-dev_*_i386.deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-helpers-dbgsym_*_i386.*deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-helpers_*_i386.deb \
debian/tmp/artifacts/build/libsteam-runtime-tools-0-relocatable-libs_*_i386.deb \
debian/tmp/artifacts/build/pressure-vessel-libs-*.deb \
${NULL+}
rm -fr _build/production/relocatable-install
mkdir -p _build/production
/usr/lib/pressure-vessel/relocatable/bin/pressure-vessel-build-relocatable-install \
--output _build/production/relocatable-install \
--archive "$(pwd)/_build/production" \
${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \ ${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \
${NULL+} ${NULL+}
prove -epython3.5 -v ./tests/pressure-vessel/relocatable-install.py :: \ prove -epython3.5 -v ./tests/pressure-vessel/relocatable-install.py :: \
"$(pwd)/_build/scout/relocatable-install" "$(pwd)/_build/production/relocatable-install"
artifacts: artifacts:
paths: paths:
- _build/scout/pressure-vessel-*-bin.tar.gz - _build/production/pressure-vessel-*-bin.tar.gz
- _build/scout/pressure-vessel-*-bin+src.tar.gz - _build/production/pressure-vessel-*-bin+src.tar.gz
when: on_success when: on_success
.prepare_test: &prepare_test .prepare_test: &prepare_test
- | - |
set -eux set -eux
PRESSURE_VESSEL=$(ls _build/scout/pressure-vessel-*-bin.tar.gz | head -1) PRESSURE_VESSEL=$(ls _build/production/pressure-vessel-*-bin.tar.gz | head -1)
mkdir -p _build/depot-template/common mkdir -p _build/depot-template/common
if [ -n "${IMAGES_DOWNLOAD_URL}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL}" ]; then if [ -n "${IMAGES_DOWNLOAD_URL}" ] && [ -n "${IMAGES_DOWNLOAD_CREDENTIAL}" ]; then
...@@ -276,7 +332,7 @@ relocatable-install: ...@@ -276,7 +332,7 @@ relocatable-install:
.test_template: .test_template:
needs: needs:
- relocatable-install - relocatable-install:production
stage: test stage: test
tags: tags:
- docker - docker
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment