.gitlab-ci.yml 2.32 KB
Newer Older
1
image: registry.git.rwth-aachen.de/leander.schulten/lichtsteuerung/build_qt_5.15.2-shared-without-wine-with-gcc-10
Leander Schulten's avatar
Leander Schulten committed
2
3
4

stages:
  - build
5
  - version
Leander Schulten's avatar
Leander Schulten committed
6
7
8
9
  - deploy

build:
  stage: build
Leander Schulten's avatar
Leander Schulten committed
10
  timeout: 3h
Leander Schulten's avatar
Leander Schulten committed
11
  script:
Leander Schulten's avatar
Leander Schulten committed
12
13
    - git submodule update --init --recursive
    - rm -rf vcpkg/packages vcpkg/buildtrees
14
15
    - CC=/usr/bin/gcc-10
    - CXX=/usr/bin/g++-10
Leander Schulten's avatar
Leander Schulten committed
16
17
18
19
    - export VCPKG_BINARY_SOURCES="clear;files,$CI_PROJECT_DIR/vcpkg_cache,readwrite"
    - ./vcpkg/bootstrap-vcpkg.sh
    - cp x64-linux-windows-static.cmake ./vcpkg/triplets/community
    #- ./vcpkg/vcpkg install --triplet=x64-linux-windows-static --feature-flags=manifests
20
21
22
    - cd src/lib
    - ./build_libs.sh
    - cd ../..
Leander Schulten's avatar
Leander Schulten committed
23
24
    - mkdir -p build
    - cd build
Leander Schulten's avatar
Leander Schulten committed
25
26
27
    - ln -s /usr/bin/ninja /usr/bin/ninja-build
    - ninja --version
    - cmake --version
Leander Schulten's avatar
Leander Schulten committed
28
    - apt-get install build-essential libgl1-mesa-dev -y
Leander Schulten's avatar
Leander Schulten committed
29
30
    - cmake -G Ninja .. -DVCPKG_TARGET_TRIPLET=x64-linux-windows-static
    - ninja
Leander Schulten's avatar
Leander Schulten committed
31
    - cd ..
32
  cache:
Leander Schulten's avatar
Leander Schulten committed
33
    key: vcpkg_cache
Leander Schulten's avatar
Leander Schulten committed
34
    when: always
35
    paths:
Leander Schulten's avatar
Leander Schulten committed
36
      - vcpkg_cache/
Leander Schulten's avatar
Leander Schulten committed
37
  artifacts:
Leander Schulten's avatar
Leander Schulten committed
38
    when: always
Leander Schulten's avatar
Leander Schulten committed
39
    paths:
Leander Schulten's avatar
Leander Schulten committed
40
      - build/src/lichtsteuerung.exe
Leander Schulten's avatar
Leander Schulten committed
41
42
      - vcpkg/buildtrees/qtbase/x64-linux-windows-static-dbg
      - vcpkg/buildtrees/qtbase/src
Leander Schulten's avatar
Leander Schulten committed
43
44
45
46
      - vcpkg/buildtrees/*/*.log
      - vcpkg/buildtrees/*/*/*.log
      - vcpkg/buildtrees/*/*/*/*.log
      - vcpkg/buildtrees/*/*/*/*/*.log
Leander Schulten's avatar
Leander Schulten committed
47
48
49
50
51
52
      - vcpkg/buildtrees/*/*/*/*/*/*.log
      - vcpkg/buildtrees/*/*/*/*/*/*/*.log
      - vcpkg/buildtrees/*/*/*/*/*/*/*/*.log
      - vcpkg/buildtrees/*/*/*/*/*/*/*/*/*.log
      - vcpkg/buildtrees/*/*/*/*/*/*/*/*/*/*.log
      - vcpkg/buildtrees/*/*/*/*/*/*/*/*/*/*/*.log
Leander Schulten's avatar
Leander Schulten committed
53
      # - build/vcpkg_installed/
54
55
56
57
58
59
60
61
62
63
64
65
66
67

# we use this version file to check if a new version exists 
version:
  stage: version
  only:
    refs:
      - windows-release
  script:
    - echo $(git rev-parse --short HEAD) > version.txt
  artifacts:
    name: version
    paths:
      - version.txt

Leander Schulten's avatar
Leander Schulten committed
68
69
70
71
72
73
74

deploy:
  stage: deploy
  only:
    refs:
      - windows-release
  script: 
75
76
77
78
79
80
    - cp build/release/Lichtsteuerung.exe windows-release
    - mkdir -p windows-release/modulesHeader
    - cp -r src/modules windows-release/modulesHeader
    - echo "includePath=modulesHeader" >> windows-release/settings.ini
#   - echo "moduleDirPath=modules" >> windows-release/settings.ini
    - cp version.txt windows-release
Leander Schulten's avatar
Leander Schulten committed
81
82
  artifacts:
    paths:
83
      - windows-release