forked from normaldotcom/cangaroo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
59 lines (48 loc) · 2.03 KB
/
.gitlab-ci.yml
File metadata and controls
59 lines (48 loc) · 2.03 KB
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
# --------------------------------------------------------
# Base Windows Job Template
# Contains shared configuration for Windows-based jobs
# --------------------------------------------------------
.windows_job:
tags:
# Runner tags; uncomment and adjust as needed
#- saas-windows-medium-amd64
- win10-musterbau
before_script:
# Capture current time
- Set-Variable -Name "time" -Value (date -Format "%H:%m")
- echo ${time}
# Print user who triggered the pipeline - just for testing and debugging
- echo "started by ${GITLAB_USER_NAME} / @${GITLAB_USER_LOGIN}"
- echo "started for project dir ${CI_PROJECT_DIR}"
# Print the computer name of the runner - just for testing and debugging
- 'Write-Output "Running on computer: $env:COMPUTERNAME"'
# --------------------------------------------------------
# Build Job
# --------------------------------------------------------
build:
extends:
- .windows_job # Inherit configuration from base Windows job
stage: build # Pipeline stage
rules:
- if: $CI_COMMIT_TAG # Run when a tag is created
- if: $CI_PIPELINE_SOURCE == "push" # Also run on normal branch pushes
variables:
GIT_SUBMODULE_STRATEGY: recursive # Ensure submodules are updated
script:
# Set up Qt6 MSVC22 environment - on the build machine there should be a script to do this
- '& "C:\bat\qt6_msvc22_env.ps1"'
# Configure CMake build - cmake should be in the PATH of the build machine
- cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
# Build the project
- cmake --build build
# Deploy Qt runtime dependencies for cangaroo.exe
# to have a runnable test application in Runtime folder
- windeployqt build\bin\cangaroo.exe
# Zip the Runtime folder
- powershell -Command "Compress-Archive -Path 'build\bin\*' -DestinationPath 'cangaroo_alt.zip' -Force"
artifacts:
name: "cangaroo_${CI_COMMIT_TAG:-$CI_COMMIT_SHA}"
expire_in: 7 days
paths:
- cangaroo_alt.zip
when: always