mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
gitlab: Initial version of the Gitlab CI scripts.
Derived in part from the freedesktop.org config.
This commit is contained in:
parent
3c914dc2ae
commit
889fe64d9f
4 changed files with 147 additions and 0 deletions
9
.gitlab-ci.yml
Normal file
9
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
# main Gitlab CI script
|
||||
|
||||
stages:
|
||||
- image
|
||||
- build
|
||||
|
||||
include:
|
||||
- local: "/tools/gitlab/image.yml"
|
||||
- local: "/tools/gitlab/build.yml"
|
62
tools/gitlab/build.yml
Normal file
62
tools/gitlab/build.yml
Normal file
|
@ -0,0 +1,62 @@
|
|||
# CI script for building Wine
|
||||
|
||||
.wine-build:
|
||||
stage: build
|
||||
image: $CI_REGISTRY/wine/wine:debian-bullseye
|
||||
interruptible: true
|
||||
cache:
|
||||
- paths:
|
||||
- ccache/
|
||||
- key:
|
||||
files:
|
||||
- configure.ac
|
||||
paths:
|
||||
- build32/config.cache
|
||||
- build64/config.cache
|
||||
before_script:
|
||||
- export CCACHE_BASEDIR="$PWD"
|
||||
- export CCACHE_DIR="$PWD/ccache"
|
||||
- export CCACHE_COMPILERCHECK=content
|
||||
- export PATH="/usr/lib/ccache:$PATH"
|
||||
- mkdir -p build32 build64
|
||||
|
||||
build-all:
|
||||
extends: .wine-build
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
- build64/config.log
|
||||
- build32/config.log
|
||||
script:
|
||||
- ./tools/make_requests
|
||||
- ./tools/make_makefiles
|
||||
- autoreconf
|
||||
- cd build64
|
||||
- ../configure -C --enable-win64 --enable-werror --with-mingw
|
||||
- make -s -j$(nproc)
|
||||
- cd ../build32
|
||||
- ../configure -C --enable-werror --with-mingw
|
||||
- make -s -j$(nproc)
|
||||
|
||||
build-winetest:
|
||||
extends: .wine-build
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
artifacts:
|
||||
name: winetest
|
||||
paths:
|
||||
- winetest.exe
|
||||
- winetest64.exe
|
||||
script:
|
||||
- cd build64
|
||||
- ../configure -C --enable-win64 --with-mingw
|
||||
- make -s -j$(nproc) programs/winetest/winetest.exe
|
||||
- cd ../build32
|
||||
- ../configure -C --with-mingw
|
||||
- make -s -j$(nproc) programs/winetest/winetest.exe
|
||||
- cd ..
|
||||
- mv build32/programs/winetest/winetest.exe winetest.exe
|
||||
- mv build64/programs/winetest/winetest.exe winetest64.exe
|
||||
- chmod 644 winetest.exe winetest64.exe
|
55
tools/gitlab/image.docker
Normal file
55
tools/gitlab/image.docker
Normal file
|
@ -0,0 +1,55 @@
|
|||
# FROM line will be added dynamically
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
RUN export DEBIAN_FRONTEND=noninteractive; \
|
||||
echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
|
||||
echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
|
||||
echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft && \
|
||||
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf && \
|
||||
echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \
|
||||
echo 'exit 101' >> /usr/sbin/policy-rc.d && \
|
||||
chmod +x /usr/sbin/policy-rc.d && \
|
||||
dpkg --add-architecture i386 && \
|
||||
apt-get update && \
|
||||
apt-get install -y gcc gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 gcc-multilib \
|
||||
git autoconf flex bison perl gettext \
|
||||
libasound2-dev:amd64 libasound2-dev:i386 \
|
||||
libcapi20-dev:amd64 libcapi20-dev:i386 \
|
||||
libcups2-dev:amd64 libcups2-dev:i386 \
|
||||
libdbus-1-dev:amd64 libdbus-1-dev:i386 \
|
||||
libfontconfig-dev:amd64 libfontconfig-dev:i386 \
|
||||
libfreetype6-dev:amd64 libfreetype6-dev:i386 \
|
||||
libgl1-mesa-dev:amd64 libgl1-mesa-dev:i386 \
|
||||
libgnutls28-dev:amd64 libgnutls28-dev:i386 \
|
||||
libgphoto2-dev:amd64 libgphoto2-dev:i386 \
|
||||
libgstreamer-plugins-base1.0-dev:amd64 libgstreamer-plugins-base1.0-dev:i386 \
|
||||
libice-dev:amd64 libice-dev:i386 \
|
||||
libkrb5-dev:amd64 libkrb5-dev:i386 \
|
||||
libldap-dev:amd64 libldap-dev:i386 \
|
||||
libopenal-dev:amd64 libopenal-dev:i386 \
|
||||
libosmesa6-dev:amd64 libosmesa6-dev:i386 \
|
||||
libpcap-dev:amd64 libpcap-dev:i386 \
|
||||
libpulse-dev:amd64 libpulse-dev:i386 \
|
||||
libsane-dev:amd64 libsane-dev:i386 \
|
||||
libsdl2-dev:amd64 libsdl2-dev:i386 \
|
||||
libudev-dev:amd64 libudev-dev:i386 \
|
||||
libusb-1.0-0-dev:amd64 libusb-1.0-0-dev:i386 \
|
||||
libv4l-dev:amd64 libv4l-dev:i386 \
|
||||
libvulkan-dev:amd64 libvulkan-dev:i386 \
|
||||
libx11-dev:amd64 libx11-dev:i386 \
|
||||
libxcomposite-dev:amd64 libxcomposite-dev:i386 \
|
||||
libxcursor-dev:amd64 libxcursor-dev:i386 \
|
||||
libxext-dev:amd64 libxext-dev:i386 \
|
||||
libxi-dev:amd64 libxi-dev:i386 \
|
||||
libxinerama-dev:amd64 libxinerama-dev:i386 \
|
||||
libxrandr-dev:amd64 libxrandr-dev:i386 \
|
||||
libxrender-dev:amd64 libxrender-dev:i386 \
|
||||
libxxf86vm-dev:amd64 libxxf86vm-dev:i386 \
|
||||
linux-libc-dev:amd64 linux-libc-dev:i386 \
|
||||
ocl-icd-opencl-dev:amd64 ocl-icd-opencl-dev:i386 \
|
||||
samba-dev:amd64 \
|
||||
unixodbc-dev:amd64 unixodbc-dev:i386 \
|
||||
x11proto-dev && \
|
||||
apt-get install -y ccache && \
|
||||
apt-get clean
|
21
tools/gitlab/image.yml
Normal file
21
tools/gitlab/image.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
# CI script for creating the docker image used for Wine builds
|
||||
|
||||
build-image:
|
||||
stage: image
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
changes:
|
||||
- tools/gitlab/image.yml
|
||||
- tools/gitlab/image.docker
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
variables:
|
||||
IMAGE_SOURCE: "$CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX/debian:bullseye"
|
||||
IMAGE_LOCAL: "$CI_REGISTRY_IMAGE:debian-bullseye"
|
||||
DOCKER_FILE: "$CI_PROJECT_DIR/tools/gitlab/image.docker"
|
||||
script:
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"},\"$CI_DEPENDENCY_PROXY_SERVER\":{\"auth\":\"$(printf "%s:%s" "$CI_DEPENDENCY_PROXY_USER" "$CI_DEPENDENCY_PROXY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||
- sed -i "1iFROM $IMAGE_SOURCE" "$DOCKER_FILE"
|
||||
- /kaniko/executor --context "$CI_PROJECT_DIR" --dockerfile "$DOCKER_FILE" --destination "$IMAGE_LOCAL"
|
Loading…
Reference in a new issue