-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
74 lines (66 loc) · 2.05 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
stages:
- build
- deploy
- upload
variables:
WIRESHARK_VERSION: "4.5"
PACKAGE_VERSION: "0.4.0"
LINUX_AMD64_BINARY: "wireshark-lua-plugin-${WIRESHARK_VERSION}-${PACKAGE_VERSION}-x64-linux.tar.gz"
LINUX_AMD64_SHA256: "wireshark-lua-plugin-${WIRESHARK_VERSION}-${PACKAGE_VERSION}-x64-linux.tar.gz.sha256sum.txt"
WINDOWS_AMD64_BINARY: "wireshark-lua-plugin-${WIRESHARK_VERSION}-${PACKAGE_VERSION}-x64-windows.zip"
WINDOWS_AMD64_SHA256: "wireshark-lua-plugin-${WIRESHARK_VERSION}-${PACKAGE_VERSION}-x64-windows.zip.sha256sum.txt"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/wireshark-lua-plugin/${PACKAGE_VERSION}"
compile-gcc:
image: registry.gitlab.com/jvalverde/wireshark-lua-plugin/wireshark-ubuntu-dev
stage: build
script:
- mkdir build
- cd build
- cmake ..
- make
- make install
- make test
- make docs
- make package
artifacts:
paths:
- build/wireshark-lua-plugin-*.tar.gz
- build/wireshark-lua-plugin-*.tar.gz.sha256sum.txt
- build/doc
compile-mingw:
image: registry.gitlab.com/jvalverde/wireshark-lua-plugin/wireshark-mingw-dev
stage: build
script:
- mkdir build
- cd build
- Wireshark_DIR=/opt/wireshark/cmake mingw64-cmake ..
- make
- make package_zip
artifacts:
paths:
- build/wireshark-lua-plugin-*.zip
- build/wireshark-lua-plugin-*.zip.sha256sum.txt
pages:
stage: deploy
dependencies:
- compile-gcc
script:
- mv build/doc public/
artifacts:
paths:
- public
only:
- master
upload:
stage: upload
image: curlimages/curl:latest
rules:
- if: $CI_COMMIT_TAG
dependencies:
- compile-gcc
- compile-mingw
script:
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/${LINUX_AMD64_BINARY} "${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}"
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file build/${LINUX_AMD64_SHA256} "${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_SHA256}"
# The Windows binaries are uploaded manually from an MSYS2 UCRT build.