-
Notifications
You must be signed in to change notification settings - Fork 90
81 lines (63 loc) · 2.35 KB
/
windows.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
name: Windows
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
# CMake release build with shared library (msbuild)
release-cmake-msvc-msbuild:
env:
BUILD_TYPE: Release
runs-on: windows-latest
steps:
- name: Setup NASM
uses: ilammy/setup-nasm@13cbeb366c45c4379d3478cdcbadd8295feb5028 # v1.5.1
- name: Checkout repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
repository: 'intel/intel-ipsec-mb'
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@c26a08ba26249b81327e26f6ef381897b6a8754d # v1.0.2
- name: Setup environment
run: |
New-Item -ItemType Directory -Path "$pwd\build"
New-Item -ItemType Directory -Path "$pwd\build\bin"
"BUILD_DIR=$pwd\build" >> $env:GITHUB_ENV
"BINARY_DIR=$pwd\build\bin" >> $env:GITHUB_ENV
$env:PATH += "$pwd\build\bin;"
- name: Configure CMake
run: cmake -A x64 -DIMB_BIN_DIR=${{env.BINARY_DIR}} -B ${{env.BUILD_DIR}}
- name: Build
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}}
- name: Test
run: ctest -j 5 -C ${{env.BUILD_TYPE}} --test-dir ${{env.BUILD_DIR}}
# CMake debug build with shared library (msbuild)
debug-cmake-msvc-msbuild:
env:
BUILD_TYPE: Debug
runs-on: windows-latest
steps:
- name: Setup NASM
uses: ilammy/setup-nasm@13cbeb366c45c4379d3478cdcbadd8295feb5028 # v1.5.1
- name: Checkout repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
repository: 'intel/intel-ipsec-mb'
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@c26a08ba26249b81327e26f6ef381897b6a8754d # v1.0.2
- name: Setup environment
run: |
New-Item -ItemType Directory -Path "$pwd\build"
New-Item -ItemType Directory -Path "$pwd\build\bin"
"BUILD_DIR=$pwd\build" >> $env:GITHUB_ENV
"BINARY_DIR=$pwd\build\bin" >> $env:GITHUB_ENV
$env:PATH += "$pwd\build\bin;"
- name: Configure CMake
run: cmake -A x64 -DIMB_BIN_DIR=${{env.BINARY_DIR}} -B ${{env.BUILD_DIR}}
- name: Build
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}}
- name: Test
run: ctest -j 5 -C ${{env.BUILD_TYPE}} --test-dir ${{env.BUILD_DIR}}