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

Merge branch 'tmp' into 'master'

Build docker images from Proton github repository

See merge request proton/soldier/sdk!1
parents b95fce61 5621842b
No related branches found
No related tags found
No related merge requests found
variables: variables:
BASE_IMAGE: registry.gitlab.steamos.cloud/steamrt/soldier/sdk PROTON_SOURCE: https://github.com/ValveSoftware/Proton
PROTON_COMMIT: 7c91f57ec93b1ebf07799651b993e01b88ce30b8
stages:
- checkout
- build-base
- binutils
- mingw
- gcc
- proton
default: default:
image: "${BASE_IMAGE}" tags:
- docker
build: - linux
tags: image:
- docker name: gcr.io/kaniko-project/executor:debug
- linux entrypoint: [""]
stage: build before_script:
script: | - mkdir -p /kaniko/.docker
set -eu - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
set -o pipefail
# TODO: Put something useful here
checkout:
image: registry.gitlab.steamos.cloud/steamrt/soldier/sdk
stage: checkout
before_script:
script:
- git clone $PROTON_SOURCE proton
- git -C proton checkout $PROTON_COMMIT
- make -C proton/docker DOCKER=true SOURCES_URLBASE=SOURCES_URLBASE | grep 'true build' > commands
- grep 'f build-base-i686' commands > build-base-i686.sh
- grep 'f build-base-x86_64' commands > build-base-x86_64.sh
- grep 'f binutils-i686-w64' commands > binutils-i686-w64.sh
- grep 'f binutils-i686-linux' commands > binutils-i686-linux.sh
- grep 'f binutils-x86_64-w64' commands > binutils-x86_64-w64.sh
- grep 'f binutils-x86_64-linux' commands > binutils-x86_64-linux.sh
- grep 'f mingw-.*-i686' commands > mingw-i686.sh
- grep 'f mingw-.*-x86_64' commands > mingw-x86_64.sh
- grep 'f gcc-i686-w64' commands > gcc-i686-w64.sh
- grep 'f gcc-i686-linux' commands > gcc-i686-linux.sh
- grep 'f gcc-x86_64-w64' commands > gcc-x86_64-w64.sh
- grep 'f gcc-x86_64-linux' commands > gcc-x86_64-linux.sh
- grep 'f proton' commands > proton.sh
- sed -i '0,/SOURCES_URLBASE/s@.*SOURCES_URLBASE@ARG SOURCES_URLBASE\n&@;' proton/docker/*.Dockerfile
- sed -i 's@wget -q SOURCES_URLBASE@wget -q $SOURCES_URLBASE@' proton/docker/*.Dockerfile
- sed -re 's@true build@rm /build -rf; mkdir -p /build; /kaniko/executor --reproducible --cleanup --build-arg SOURCES_URLBASE@g' -i *.sh
- sed -re 's@-f @--dockerfile @g' -i *.sh
- sed -re 's@-t @--destination @g' -i *.sh
- sed -re 's@--cache-from=[^ ]+ @--cache @g' -i *.sh
- sed -re 's@build$@--context /build@g' -i *.sh
- sed -re 's@--reproducible @@g' -i proton.sh
- mv proton/docker/*.Dockerfile ./
artifacts:
paths:
- "*.Dockerfile"
- "*.sh"
build-base-i686:
stage: build-base
script: sh -eux build-base-i686.sh
build-base-x86_64:
stage: build-base
script: sh -eux build-base-x86_64.sh
binutils-i686-w64:
stage: binutils
script: sh -eux binutils-i686-w64.sh
binutils-i686-linux:
stage: binutils
script: sh -eux binutils-i686-linux.sh
binutils-x86_64-w64:
stage: binutils
script: sh -eux binutils-x86_64-w64.sh
binutils-x86_64-linux:
stage: binutils
script: sh -eux binutils-x86_64-linux.sh
mingw-i686:
stage: mingw
script: sh -eux mingw-i686.sh
mingw-x86_64:
stage: mingw
script: sh -eux mingw-x86_64.sh
gcc-i686-w64:
stage: gcc
script: sh -eux gcc-i686-w64.sh
gcc-i686-linux:
stage: gcc
script: sh -eux gcc-i686-linux.sh
gcc-x86_64-w64:
stage: gcc
script: sh -eux gcc-x86_64-w64.sh
gcc-x86_64-linux:
stage: gcc
script: sh -eux gcc-x86_64-linux.sh
proton:
stage: proton
script: sh -eux proton.sh
Proton (soldier) SDK Proton (soldier) SDK
-------------------- --------------------
This project will eventually build Docker images based on This project builds Docker images based on
<https://gitlab.steamos.cloud/steamrt/soldier/sdk>, with the addition <https://gitlab.steamos.cloud/steamrt/soldier/sdk>, with the addition
of Proton build-dependencies. of Proton build-dependencies.
There's no code here yet. This is mostly just a CI script, that clones
<https://github.com/ValveSoftware/Proton> and builds the same docker
images as what `make protonsdk` does there. It does a bit of magic to
create a set of commands usable by `kaniko` instead of docker, as this
CI runs on Google Compute instances.
To trigger a new build and publish a new image, clone this repository,
update the `PROTON_COMMIT` variable in `.gitlab-ci.yml`, commit, push
and wait.
The image version tag that will be created is the value of the
`PROTONSDK_VERSION` variable in `docker/Makefile` in the `Proton`
source. If an image with the same tag already exists, it will be
overwritten, so make sure to edit this variable to some new value
after a new version has been published.
The SteamRT SDK image version that is used as a base, is defined
using the `STEAMRT_VERSION` variable in the same `Makefile`. The
`PROTONSDK_VERSION` variable is usually a combination of this plus
an additional number, but it's not required to be.
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