forked from Beckhoff/ADS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
134 lines (118 loc) · 3.06 KB
/
.gitlab-ci.yml
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
stages:
- build
- test:clang-fbsd
- test:clang
- test:gcc
- test:gcc-i386
- test:clang-macOS
cache:
paths:
- apt-cache/
.build-meson: &build-meson
stage: build
script:
- meson setup build ${BHF_CI_MESON_OPTIONS}
- ninja -C build
- meson setup example/build example ${BHF_CI_MESON_OPTIONS}
- ninja -C example/build
artifacts:
paths:
- build/libAdsLib.a
- build/libTcAdsLib.a
- build/AdsLibTest
- build/AdsLibTest.exe
- build/AdsLibOOITest
- build/AdsLibOOITest.exe
- example/build/example
- example/build/example.exe
- example/build/tcexample
- example/build/tcexample.exe
.build-meson-docker: &build-meson-docker
<<: *build-meson
tags:
- docker
image: ${REGISTRY_HOST}/beckhoff/docker-mxe:25861
build:clang:
<<: *build-meson-docker
variables:
CXX: clang++
build:clang-fbsd:
<<: *build-meson
tags:
- freebsd13_4_build_vm
before_script:
- doas pkg install -y meson
- curl https://tcbsd.beckhoff.com/\?dir\=TCBSD/12/stable/packages/All | grep -o 'href=".*ADS-Comm-Lib.*"' | head -1 | sed -e 's/"//g' -e 's|href=|https://tcbsd.beckhoff.com/|g' | xargs fetch
- doas pkg install -y -f TF6000-ADS-Comm-Lib-*
variables:
BHF_CI_MESON_OPTIONS: '-Dtcadsdll_include=/usr/local/include -Dtcadsdll_lib=/usr/local/lib'
build:clang-macOS:
<<: *build-meson
tags:
- macOS
variables:
BHF_CI_MESON_OPTIONS: '-Dcpp_std=c++11'
build:gcc:
<<: *build-meson-docker
build:gcc-i386:
<<: *build-meson-docker
variables:
BHF_CI_MESON_OPTIONS: '--cross-file meson.cross.amd64-linux.i386'
build:mxe:
<<: *build-meson-docker
variables:
BHF_CI_MESON_OPTIONS: '--cross-file meson.cross.amd64-linux.win32 -Dcpp_std=c++11'
build:win10:
<<: *build-meson
tags:
- MD_TWINCAT_XAE
before_script:
- C:\ProgramData\chocolatey\bin\choco install --no-progress -y meson ninja
- $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
- $env:BHF_CI_MESON_OPTIONS = '-Dtcadsdll_include=c:\TwinCAT\AdsApi\TcAdsDll\Include', '-Dtcadsdll_lib=c:\TwinCAT\AdsApi\TcAdsDll\x64\lib'
.test-linux: &test-linux
image: debian:buster-slim
tags:
- docker
- host_network
- lbs1
- rack
before_script:
- dpkg --add-architecture i386
- apt-get -o dir::cache::archives="apt-cache" update
- apt-get -o dir::cache::archives="apt-cache" install -y libc6:i386 libstdc++6:i386 ncat
script:
- ./tools/90_run_tests.sh
test:clang:
<<: *test-linux
stage: test:clang
dependencies:
- build:clang
test:gcc:
<<: *test-linux
stage: test:gcc
dependencies:
- build:gcc
test:gcc-i386:
<<: *test-linux
stage: test:gcc-i386
dependencies:
- build:gcc-i386
test:clang-fbsd:
stage: test:clang-fbsd
dependencies:
- build:clang-fbsd
tags:
- fbsd
- rack
script:
- ./tools/90_run_tests.sh
test:clang-macOS:
stage: test:clang-macOS
dependencies:
- build:clang-macOS
tags:
- macOS
- rack
script:
- ./tools/90_run_tests.sh