-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
96 lines (89 loc) · 3.37 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
stages:
- build
- sign
- release
build:
image: cr.gluon.hu/mihaly/vsbuildtools:2022-wdk
needs: []
stage: build
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- bleedblack/x64
- blipcsrv/x64
- driver/bleedblack/x64
- examples/cpp/BleedBlackCpp/x64
- examples/csharp/BleedBlackCSharp/obj
- managed/bleedblack.net/obj
script:
- msbuild bleedblack.sln -t:bleedblack,blipcsrv,driver\bleedblack,examples\cpp\BleedblackCpp -p:Configuration=Release -p:Platform=x64 -r -m
- msbuild bleedblack.sln -t:managed\bleedblack_net,examples\csharp\BleedblackCSharp -p:Configuration=Release -p:Platform=x64 -r -m
artifacts:
name: "${CI_PROJECT_NAME}_rawbuild_${CI_BUILD_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${CI_JOB_ID}"
expire_in: 1 week
paths:
- exec/x64_release
- managed/bleedblack.net/bin/Release/netstandard2.0
- examples\csharp\BleedBlackCSharp\bin\Release
tags:
- windows
variables:
GIT_SUBMODULE_STRATEGY: recursive
sign:
image: cr.gluon.hu/mihaly/osslsigncode:latest
stage: sign
variables:
SECURE_FILES_DOWNLOAD_PATH: './secure'
needs:
- job: build
artifacts: true
script:
- |
curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
unzip ./secure/certificates.zip -d ./secure/certificates
ls -la
osslsigncode sign -ac ./secure/certificates/bundle/ca.cer -certs ./secure/certificates/bundle/cert.crt -key ./secure/certificates/bundle/pvk.key -h sha256 -in exec/x64_release/bleedblack.sys -out bleedblack_signed.sys
artifacts:
name: "${CI_PROJECT_NAME}_driver_${CI_BUILD_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${CI_JOB_ID}"
paths:
- bleedblack_signed.sys
expose_as: "signed driver"
expire_in: 1 week
tags:
- linux
package:
image: cr.gluon.hu/mihaly/vsbuildtools:2022-wdk
needs:
- job: build
artifacts: true
- job: sign
artifacts: true
stage: release
script:
- |
Remove-Item -Recurse -Force -Path .\release -ErrorAction SilentlyContinue
New-Item -Path .\release -ItemType Directory
Copy-Item -Path bleedblack_signed.sys .\release\bleedblack.sys
New-Item -Path .\release\include -ItemType Directory
Copy-Item -Recurse -Path .\include\bleedblack\ -Destination .\release\include
New-Item -Path .\release\examples -ItemType Directory
Copy-Item -Path .\exec\x64_release\bleedblack.dll .\release\examples
Copy-Item -Path .\managed\bleedblack.net\bin\Release\netstandard2.0\bleedblack.net.dll .\release\examples
Copy-Item -Path .\managed\KdlCore.Native.Commons\KdlCore.Native.Commons\bin\Release\netstandard2.0\KdlCore.Native.Commons.dll .\release\examples
Copy-Item -Path .\exec\x64_release\blipcsrv.exe .\release\examples
Copy-Item -Path .\exec\x64_release\BleedBlackCpp.exe .\release\examples
Copy-Item -Path .\examples\csharp\BleedBlackCSharp\bin\Release\BleedBlackCSharp.exe .\release\examples
New-Item -Path .\release\lib -ItemType Directory
Copy-Item -Path .\exec\x64_release\bleedblack.lib .\release\lib
Write-Output "Release ${env:CI_PROJECT_NAME}_SDK_${env:CI_BUILD_REF_NAME}_${env:CI_COMMIT_SHORT_SHA}_${env:CI_JOB_STARTED_AT} contents:"
Get-ChildItem -Recurse .\release
artifacts:
name: "${CI_PROJECT_NAME}_SDK_${CI_BUILD_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${CI_JOB_STARTED_AT}"
paths:
- release
expose_as: "bleedblack sdk"
expire_in: 1 week
rules:
- when: manual
tags:
- windows