-
Notifications
You must be signed in to change notification settings - Fork 33
145 lines (123 loc) · 3.53 KB
/
tests.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Tests
on:
release:
types:
- published
push:
branches:
- master
pull_request:
env:
vcpkg-commit: 9d47b24eacbd1cd94f139457ef6cd35e5d92cc84
jobs:
build-linux:
strategy:
matrix:
build-type: ["Debug"]
build-shared:
- { flag: "1", repr: "shared" }
- { flag: "0", repr: "static" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore from cache and install vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.vcpkg-commit }}
- name: deps
run: |
sudo apt-get update
sudo apt-get install -y build-essential clang
- name: configure
run: |
mkdir build && cd build
cmake \
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DBUILD_SHARED_LIBS=${{ matrix.build-shared.flag }} \
-DBUILD_SVCLI=1 \
-DBUILD_TESTS=1 \
..
- name: build
working-directory: build
run: cmake --build .
- name: tests
working-directory: build
run: ./test/uthenticode_test
build-macos:
strategy:
matrix:
build-type: ["Debug"]
build-shared:
- { flag: "1", repr: "shared" }
- { flag: "0", repr: "static" }
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Restore from cache and install vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.vcpkg-commit }}
- name: configure
run: |
mkdir build && cd build
cmake \
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DBUILD_SHARED_LIBS=${{ matrix.build-shared.flag }} \
-DBUILD_SVCLI=1 \
-DBUILD_TESTS=1 \
..
- name: build
working-directory: build
run: cmake --build .
- name: tests
working-directory: build
run: ./test/uthenticode_test
build-windows:
strategy:
matrix:
build-arch:
- { arch: "x64", triplet: "x64-windows" }
- { arch: "Win32", triplet: "x86-windows" }
build-type: ["Debug"]
runs-on: windows-latest
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.build-arch.triplet }}
steps:
- uses: actions/checkout@v4
- name: Restore from cache and install vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: ${{ env.vcpkg-commit }}
- name: configure
shell: bash
run: |
mkdir build
cd build
cmake \
-G "Visual Studio 17 2022" \
-A ${{ matrix.build-arch.arch }} \
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
-DBUILD_SVCLI=1 \
-DBUILD_TESTS=1 \
..
- name: build
working-directory: build
run: cmake --build . --config ${{ matrix.build-type }}
- name: tests
working-directory: build
run: |
./test/${{ matrix.build-type }}/uthenticode_test
all-tests-pass:
if: always()
needs:
- build-linux
- build-macos
- build-windows
runs-on: ubuntu-latest
steps:
- name: check test jobs
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}