gitlab: Initial version of the Gitlab CI scripts.
[wine.git] / tools / gitlab / build.yml
blob4f1ff0eddc50ea79f1d05642f3464e7d52beb75b
1 # CI script for building Wine
3 .wine-build:
4   stage: build
5   image: $CI_REGISTRY/wine/wine:debian-bullseye
6   interruptible: true
7   cache:
8     - paths:
9         - ccache/
10     - key:
11         files:
12           - configure.ac
13       paths:
14         - build32/config.cache
15         - build64/config.cache
16   before_script:
17     - export CCACHE_BASEDIR="$PWD"
18     - export CCACHE_DIR="$PWD/ccache"
19     - export CCACHE_COMPILERCHECK=content
20     - export PATH="/usr/lib/ccache:$PATH"
21     - mkdir -p build32 build64
23 build-all:
24   extends: .wine-build
25   rules:
26     - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
27   artifacts:
28     when: on_failure
29     paths:
30       - build64/config.log
31       - build32/config.log
32   script:
33     - ./tools/make_requests
34     - ./tools/make_makefiles
35     - autoreconf
36     - cd build64
37     - ../configure -C --enable-win64 --enable-werror --with-mingw
38     - make -s -j$(nproc)
39     - cd ../build32
40     - ../configure -C --enable-werror --with-mingw
41     - make -s -j$(nproc)
43 build-winetest:
44   extends: .wine-build
45   rules:
46     - if: $CI_PIPELINE_SOURCE == 'trigger' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
47   artifacts:
48     name: winetest
49     paths:
50       - winetest.exe
51       - winetest64.exe
52   script:
53     - cd build64
54     - ../configure -C --enable-win64 --with-mingw
55     - make -s -j$(nproc) programs/winetest/winetest.exe
56     - cd ../build32
57     - ../configure -C --with-mingw
58     - make -s -j$(nproc) programs/winetest/winetest.exe
59     - cd ..
60     - mv build32/programs/winetest/winetest.exe winetest.exe
61     - mv build64/programs/winetest/winetest.exe winetest64.exe
62     - chmod 644 winetest.exe winetest64.exe