-
-
Notifications
You must be signed in to change notification settings - Fork 348
155 lines (138 loc) · 4.5 KB
/
Copy pathsigned-plugins.yml
File metadata and controls
155 lines (138 loc) · 4.5 KB
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
146
147
148
149
150
151
152
153
154
155
name: Test Signed Plugins
on:
push:
branches: [ develop ]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'docs/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'LICENSE**'
- '**.md'
pull_request:
branches: [ develop ]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'docs/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'LICENSE**'
- '**.md'
env:
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
# Test signature verification across platforms and configurations
test-signed-plugins:
name: "${{ matrix.config.name }}"
runs-on: ${{ matrix.config.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
config:
# Linux configurations
- name: "Linux Serial (Debug + Shared)"
os: ubuntu-latest
build_type: Debug
shared: ON
parallel: OFF
generator: ""
- name: "Linux Serial (Release + Static)"
os: ubuntu-latest
build_type: Release
shared: OFF
parallel: OFF
generator: ""
- name: "Linux Parallel (Debug + Shared)"
os: ubuntu-latest
build_type: Debug
shared: ON
parallel: ON
generator: ""
# macOS configuration
- name: "macOS Serial (Release + Shared)"
os: macos-latest
build_type: Release
shared: ON
parallel: OFF
generator: ""
# Windows configuration
- name: "Windows Serial (Release + Shared)"
os: windows-latest
build_type: Release
shared: ON
parallel: OFF
generator: "-A x64"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libssl-dev \
zlib1g-dev \
libaec-dev
- name: Install MPI dependencies (Linux)
if: runner.os == 'Linux' && matrix.config.parallel == 'ON'
run: |
sudo apt-get install -y \
libopenmpi-dev \
openmpi-bin
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install openssl@3
- name: Generate test RSA key pair (Unix)
if: runner.os != 'Windows'
run: |
openssl genrsa -out ci-test-private.pem 2048
openssl rsa -in ci-test-private.pem -pubout -out ci-test-public.pem
mkdir -p ci-keystore
cp ci-test-public.pem ci-keystore/
- name: Generate test RSA key pair (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
& openssl genrsa -out ci-test-private.pem 2048
& openssl rsa -in ci-test-private.pem -pubout -out ci-test-public.pem
New-Item -ItemType Directory -Force -Path ci-keystore
Copy-Item ci-test-public.pem ci-keystore/
- name: Configure CMake
shell: bash
run: |
EXTRA_FLAGS=""
if [ "${{ matrix.config.parallel }}" == "ON" ]; then
EXTRA_FLAGS="-DMPIEXEC_PREFLAGS=--oversubscribe"
fi
cmake -B build \
${{ matrix.config.generator }} \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-DHDF5_REQUIRE_SIGNED_PLUGINS:BOOL=ON \
-DHDF5_PLUGIN_KEYSTORE_DIR="${PWD}/ci-keystore" \
-DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.config.parallel }} \
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.config.shared }} \
-DBUILD_STATIC_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DHDF5_BUILD_TOOLS:BOOL=ON \
-DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=${{ runner.os == 'Linux' }} \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=${{ runner.os == 'Linux' }} \
$EXTRA_FLAGS
- name: Build
run: cmake --build build --parallel 4 --config ${{ matrix.config.build_type }}
- name: Copy OpenSSL DLLs (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Copy-Item "C:\Program Files\OpenSSL\bin\libcrypto-3-x64.dll" build\bin\${{ matrix.config.build_type }}\
Copy-Item "C:\Program Files\OpenSSL\bin\libssl-3-x64.dll" build\bin\${{ matrix.config.build_type }}\
- name: Run Tests
shell: bash
run: |
cd build
ctest --build-config ${{ matrix.config.build_type }} --parallel 4 --output-on-failure \
-R "H5SIGN|H5PLUGIN-signature"