1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
# CI script for building Wine
.wine-build:
stage: build
image: $CI_REGISTRY/wine/wine:debian-bookworm
interruptible: true
variables:
GIT_DEPTH: 0
cache:
- key: $CI_JOB_NAME-ccache
paths:
- ccache/
- key:
files:
- configure.ac
prefix: $CI_JOB_NAME-config
paths:
- build32/config.cache
- build64/config.cache
before_script:
- export BASEDIR="$PWD"
- export CCACHE_BASEDIR="$BASEDIR"
- export CCACHE_DIR="$BASEDIR/ccache"
- export CCACHE_COMPILERCHECK=content
- export PATH="/usr/lib/ccache:$PATH"
- git config --global --add safe.directory $CI_PROJECT_DIR
- git fetch --tags
- mkdir -p build32 build64
- rm -fr .git/rebase-merge # in case a previous CI run failed in git rebase
build-linux:
extends: .wine-build
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
tags:
- build
artifacts:
expire_in: 1 day
paths:
- usr/local/
script:
- git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./tools/gitlab/build-linux
- git diff --name-only $CI_MERGE_REQUEST_DIFF_BASE_SHA | sed -re '/\/tests\//!d; s@/tests/.*@/tests/Makefile.in@' |
(xargs -r ls 2>/dev/null || true) | xargs -r sed '/TESTDLL/!d; s@.dll@@; s@.*= *@@' >usr/local/share/wine/winetest.args
build-clang:
extends: .wine-build
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
tags:
- build
script:
- ./tools/gitlab/build-clang
build-mac:
extends: .wine-build
image: winehq-sonoma-pristine
variables:
TART_EXECUTOR_SSH_USERNAME: "gitlab"
TART_EXECUTOR_SSH_PASSWORD: "gitlab"
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
tags:
- mac
artifacts:
when: on_failure
paths:
- build64/config.log
- build32/config.log
script:
- git rebase $CI_MERGE_REQUEST_DIFF_BASE_SHA --exec ./tools/gitlab/build-mac
build-sast:
extends: .wine-build
rules:
- if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
tags:
- build
artifacts:
reports:
codequality: gl-code-quality-report.json
variables:
SASTFLAGS: >-
-Xclang -analyzer-disable-checker=core.CallAndMessage
-Xclang -analyzer-disable-checker=core.DivideZero
-Xclang -analyzer-disable-checker=core.NullDereference
-Xclang -analyzer-disable-checker=core.UndefinedBinaryOperatorResult
-Xclang -analyzer-disable-checker=core.uninitialized.Assign
-Xclang -analyzer-disable-checker=deadcode.DeadStores
-Xclang -analyzer-disable-checker=unix.Malloc
script:
- ./tools/make_requests
- ./tools/make_specfiles
- ./tools/make_makefiles
- autoreconf -f
- cd build64
- ../configure -q -C --enable-sast --enable-win64
- make -s gl-code-quality-report.json SASTFLAGS="${SASTFLAGS}"
- mv gl-code-quality-report.json $BASEDIR
build-winetest:
stage: build
image: $CI_REGISTRY/wine/wine:debian-bookworm
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
needs:
- job: build-linux
variables:
GIT_STRATEGY: none
artifacts:
name: winetest
paths:
- winetest.args
- winetest.exe
- winetest64.exe
script:
- mv usr/local/share/wine/winetest.args winetest.args
- mv usr/local/lib/wine/i386-windows/winetest.exe winetest.exe
- mv usr/local/lib/wine/x86_64-windows/winetest.exe winetest64.exe
build-daily-linux:
extends: .wine-build
rules:
- if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
tags:
- build
artifacts:
expire_in: 1 day
paths:
- usr/local/
script:
- ./tools/gitlab/build-linux
build-daily-mac:
extends: .wine-build
image: winehq-sonoma-pristine
variables:
TART_EXECUTOR_SSH_USERNAME: "gitlab"
TART_EXECUTOR_SSH_PASSWORD: "gitlab"
rules:
- if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
tags:
- mac
artifacts:
expire_in: 1 day
paths:
- usr/local/
script:
- ./tools/gitlab/build-mac
build-daily-winetest:
stage: build
image: $CI_REGISTRY/wine/wine:debian-bookworm
rules:
- if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
needs:
- job: build-daily-linux
variables:
GIT_STRATEGY: none
artifacts:
name: winetest
paths:
- winetest.exe
- winetest64.exe
script:
- mv usr/local/lib/wine/i386-windows/winetest.exe winetest.exe
- mv usr/local/lib/wine/x86_64-windows/winetest.exe winetest64.exe
|