-
Notifications
You must be signed in to change notification settings - Fork 8
100 lines (86 loc) · 3.5 KB
/
build-on-change-windows.yaml
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
name: Build framework on Windows
on:
# execute on every PR made targeting the branches bellow
pull_request:
branches:
- master
- develop # can be removed on master merge
paths: # we only include paths critical for building to avoid unnecessary runs
- src/**
- include/**
- scripts/cmake/**
- .github/** # only for testing this PR
# execute on every push made targeting the branches bellow
push:
branches:
- master
- develop # can be removed on master merge
paths: # we only include paths critical for building to avoid unnecessary runs
- src/**
- include/**
- scripts/cmake/**
jobs:
build-windows:
runs-on: windows-2019
environment: Build
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
$workingPath = "D:\a"
dir
dir qc-framework
dir "$workingPath\qc-framework\qc-framework"
# - name: Install Qt
# uses: jurplel/[email protected]
# with:
# version: 5.12.2
# host: windows
# target: desktop
# - name: Add MSBuild to PATH
# uses: microsoft/setup-msbuild@v2
# - name: Install dependencies
# run: |
# $workingPath = "D:\a"
# Write-Output "Setting up Xerces-C++..."
# $xercesZip = "$workingPath\xerces-c-3.2.5.zip"
# Invoke-WebRequest -Uri "https://dlcdn.apache.org/xerces/c/3/sources/xerces-c-3.2.5.zip" -OutFile $xercesZip
# Expand-Archive -Path $xercesZip -DestinationPath "$workingPath"
# cd "$workingPath\xerces-c-3.2.5"
# mkdir build
# cd build
# cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$workingPath\Xerces-Out" ..
# cmake --build . --config Debug
# cmake --build . --config Debug --target install
# Add-Content $env:GITHUB_PATH "$workingPath\bin\xerces-c_3_2D.dll"
# Add-Content $env:GITHUB_PATH "$workingPath\Xerces-Out\include"
# Add-Content $env:GITHUB_PATH "$workingPath\Xerces-Out\bin"
# Write-Output "Setting up dev_essential..."
# mkdir "$workingPath\dev_essential"
# git clone https://github.com/cariad-tech/dev_essential.git "$workingPath\dev_essential"
# cd "$workingPath\dev_essential"
# mkdir build
# cd build
# cmake -H"$workingPath\dev_essential" -B. -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$workingPath\dev_essential-Out" ..
# cmake --build . --config Release
# cmake --build . --config Release --target install
# shell: pwsh
# - name: Build framework
# run: |
# $workingPath = "D:\a"
# Write-Output "Setting up QC-Framework..."
# cd "$workingPath\qc-framework\qc-framework"
# mkdir ../build
# cmake -B../build -S. `
# -G "Visual Studio 16 2019" -A x64 -T v142 `
# -DCMAKE_INSTALL_PREFIX="$workingPath\QC-Framework-Out" `
# -DENABLE_FUNCTIONAL_TESTS=OFF `
# -DQt5_ROOT="$Qt5_ROOT" `
# -Ddev_essential_ROOT="$workingPath\dev_essential-Out\lib\cmake\dev_essential" `
# -DXercesC_ROOT="$workingPath\Xerces-Out"
# cmake --build ../build --target install --config Release
# cmake --install ../build
# # Final output
# Write-Output "All installations and setups are complete!"
# shell: pwsh