-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (75 loc) · 3.38 KB
/
windows_latest.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
name: windows_latest
on: [push]
env:
BUILD_TYPE: Release
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest MinGW",
os: windows-latest,
artifact: "windows_mingw.7z",
build_type: "Release",
cc: "gcc",
cxx: "g++",
archiver: "7z a",
generators: "Ninja"
}
steps:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Checkout Repository and Submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake Windows
working-directory: ${{runner.workspace}}/build
shell: pwsh
run: cmake ../instrument_control_lib -GNinja -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
- name: Copy Windows DLLs
working-directory: ${{runner.workspace}}/instrument_control_lib/common_tools_lib
run: cp libs/windows/* ${{runner.workspace}}/build/common_tools_lib; cp libs/windows/* ${{runner.workspace}}/build/tests
- name: Build project
working-directory: ${{runner.workspace}}/build
shell: pwsh
run: cmake --build . --config ${{ matrix.config.build_type }} --target all
- name: Pip install
working-directory: ${{runner.workspace}}
shell: pwsh
run: $env:cc = 'gcc'; $env:cxx = 'g++'; pip install ${{runner.workspace}}/instrument_control_lib
- name: Pip wheel
working-directory: ${{runner.workspace}}
shell: pwsh
run: $env:cc = 'gcc'; $env:cxx = 'g++'; pip wheel ${{runner.workspace}}/instrument_control_lib
- name: Execute UnitTests Common Tools Lib
working-directory: ${{runner.workspace}}/build
run: .\common_tools_lib\SocketUnitTest.exe GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ctest -V;
.\common_tools_lib\ExceptionUnitTest.exe GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ctest -V;
.\common_tools_lib\FileHandlingUnitTest.exe GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ctest -V
.\common_tools_lib\ThreadingUnitTest.exe GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ctest -V
- name: Execute UnitTests Instrument Control Lib
working-directory: ${{runner.workspace}}/build
run: .\tests\device_unit_test.exe GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ctest -V;
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: instrument_control_lib_win_x64
path: |
${{ runner.workspace }}/build/python_interface/py_instrument_control_lib*.pyd
${{ runner.workspace }}/build/*.dll
${{ runner.workspace }}/build/*.a
${{ runner.workspace }}/build/*.lib
${{ runner.workspace }}/build/*.exe
${{ runner.workspace }}/build/common_tools_lib/*.dll
${{ runner.workspace }}/build/common_tools_lib/*.a
${{ runner.workspace }}/build/common_tools_lib/*.lib
${{ runner.workspace }}/build/common_tools_lib/*.exe
${{runner.workspace}}/build/common_tools_lib/test-results/**/*.xml