-
Notifications
You must be signed in to change notification settings - Fork 62
73 lines (58 loc) · 2.13 KB
/
windows_x86_build.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
name: Windows x86 build
on:
workflow_call:
workflow_dispatch:
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- uses: ilammy/[email protected]
- name: Update Submodules
working-directory: ${{runner.workspace}}/grpc-labview
run: git submodule update --init --recursive
- name: Create Build Environment
run: mkdir ${{runner.workspace}}\grpc-labview\build
- name: Configure CMake
working-directory: ${{runner.workspace}}\grpc-labview\build
run: cmake -G "Visual Studio 16 2019" -A Win32 ..
- name: Build
working-directory: ${{runner.workspace}}\grpc-labview\build
run: cmake --build . --config ${{env.BUILD_TYPE}} -j 16
- if: ${{ always() }}
name: Print CMakeTests logs
run: |
$directory = "${{runner.workspace}}/grpc-labview/tests/CMakeTests/logs"
# Check if the folder exists
if (Test-Path $directory -PathType Container) {
# Recursively iterate through all files in subfolders
Get-ChildItem -Path $directory -File -Recurse | Group-Object Directory | ForEach-Object {
$subfolderName = $_.Name
Write-Host "Folder: $subfolderName"
$_.Group | ForEach-Object {
$file = $_
# Print the content of the file
Get-Content $file.FullName
Write-Host ""
}
Write-Host ""
}
} else {
Write-Host "CMakeTests log folder (grpc-labview/tests/CmakeTests/logs) does not exist."
}
- name: Tar Build Artifacts
run: >-
tar -czvf labview-grpc-server-windows-x86.tar.gz -C ${{runner.workspace}}\grpc-labview\build\Release
labview_grpc_server.dll
labview_grpc_generator.dll
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: labview-grpc-server-windows-x86
path: labview-grpc-server-windows-x86.tar.gz
retention-days: 5