@@ -13,6 +13,8 @@ permissions:
1313 contents : read
1414
1515jobs :
16+ # MinGW GCC does not support FIPS because it lacks support for MSVC-specific
17+ # pragmas (code_seg, data_seg, etc.) required for FIPS section placement.
1618 mingw :
1719 if : github.repository_owner == 'aws'
1820 runs-on : windows-latest
5254 clang :
5355 if : github.repository_owner == 'aws'
5456 runs-on : windows-latest
57+ strategy :
58+ fail-fast : false
59+ matrix :
60+ fips :
61+ - 0
62+ - 1
63+ name : clang${{ matrix.fips == 1 && ' FIPS' || '' }}
5564 steps :
5665 - name : Install NASM
5766 uses : ilammy/setup-nasm@v1.5.1
7382 CMAKE_SYSTEM_NAME=Windows \
7483 CMAKE_SYSTEM_PROCESSOR=x86_64 \
7584 CMAKE_BUILD_TYPE=Release \
85+ BUILD_SHARED_LIBS=${{ matrix.fips }} \
86+ FIPS=${{ matrix.fips }} \
7687 - name : Build Project
7788 run : cmake --build ./build --target all
7889 - name : Run tests
8596 target :
8697 - x64
8798 - x64_arm64
99+ fips :
100+ - 0
101+ - 1
102+ exclude :
103+ - target : x64_arm64
104+ fips : 1
88105 runs-on : windows-latest
106+ name : clang-cl-msbuild ${{ matrix.target }}${{ matrix.fips == 1 && ' FIPS' || '' }}
89107 env :
90108 CMAKE_GENERATOR : " Visual Studio 17 2022"
91109 CMAKE_GENERATOR_TOOLSET : " ClangCL,host=x64"
@@ -104,6 +122,8 @@ jobs:
104122 with :
105123 options : |
106124 CMAKE_BUILD_TYPE=Release \
125+ BUILD_SHARED_LIBS=${{ matrix.fips }} \
126+ FIPS=${{ matrix.fips }} \
107127 - if : ${{ matrix.target == 'x64_arm64' }}
108128 name : Setup CMake
109129 uses : threeal/cmake-action@v1.3.0
@@ -113,6 +133,9 @@ jobs:
113133 CMAKE_SYSTEM_NAME=Windows \
114134 CMAKE_SYSTEM_PROCESSOR=ARM64 \
115135 CMAKE_BUILD_TYPE=Release \
136+ - if : ${{ matrix.fips == 1 }}
137+ name : Build FIPS module
138+ run : cmake --build ./build --target fips_empty_main
116139 - name : Build Project
117140 run : cmake --build ./build --target all_tests
118141 - if : ${{ matrix.target == 'x64' }}
@@ -126,7 +149,14 @@ jobs:
126149 target :
127150 - x64
128151 - x64_arm64
152+ fips :
153+ - 0
154+ - 1
155+ exclude :
156+ - target : x64_arm64
157+ fips : 1
129158 runs-on : windows-latest
159+ name : clang-cl-ninja ${{ matrix.target }}${{ matrix.fips == 1 && ' FIPS' || '' }}
130160 steps :
131161 - if : ${{ matrix.target == 'x64' }}
132162 name : Install NASM
@@ -147,6 +177,8 @@ jobs:
147177 cxx-compiler : clang-cl
148178 options : |
149179 CMAKE_BUILD_TYPE=Release \
180+ BUILD_SHARED_LIBS=${{ matrix.fips }} \
181+ FIPS=${{ matrix.fips }} \
150182 - if : ${{ matrix.target == 'x64_arm64' }}
151183 name : Setup CMake
152184 uses : threeal/cmake-action@v1.3.0
@@ -193,7 +225,6 @@ jobs:
193225 run :
194226 ./tests/ci/run_cross_mingw_tests.sh x86_64 w64-mingw32 "-DCMAKE_BUILD_TYPE=Release"
195227 msys2 :
196- name : msys2 ${{ matrix.sys }} - ${{ matrix.generator }}
197228 if : github.repository_owner == 'aws'
198229 runs-on : windows-latest
199230 strategy :
@@ -207,6 +238,15 @@ jobs:
207238 - ' Ninja'
208239 - ' MinGW Makefiles'
209240 - ' MSYS Makefiles'
241+ fips :
242+ - 0
243+ # FIPS is excluded for all msys2 configurations. The MinGW toolchain
244+ # (used by all msys2 environments including clang64) does not support
245+ # PE grouped sections ($a/$b/$z ordering), __declspec(allocate()), or
246+ # COFF .lib archives — all of which are required for FIPS section
247+ # placement. FIPS on Windows requires the MSVC toolchain (link.exe or
248+ # lld-link in MSVC mode).
249+ name : msys2 ${{ matrix.sys }} - ${{ matrix.generator }}${{ matrix.fips == 1 && ' FIPS' || '' }}
210250 steps :
211251 - name : Install MSYS2
212252 uses : msys2/setup-msys2@v2
0 commit comments