]>
Commit | Line | Data |
---|---|---|
b6461792 | 1 | # Copyright 2021-2024 The OpenSSL Project Authors. All Rights Reserved. |
08d8c2d8 P |
2 | # |
3 | # Licensed under the Apache License 2.0 (the "License"). You may not use | |
4 | # this file except in compliance with the License. You can obtain a copy | |
5 | # in the file LICENSE in the source distribution or at | |
6 | # https://www.openssl.org/source/license.html | |
7 | ||
6ec37db5 SL |
8 | name: Windows GitHub CI |
9 | ||
10 | on: [pull_request, push] | |
11 | ||
c6e7f427 VS |
12 | permissions: |
13 | contents: read | |
14 | ||
6ec37db5 | 15 | jobs: |
d7c18395 | 16 | shared: |
69d8cf70 TM |
17 | # Run a job for each of the specified target architectures: |
18 | strategy: | |
19 | matrix: | |
dd53c297 | 20 | os: |
c37ebbd6 | 21 | - windows-2019 |
c87a4dd7 | 22 | - windows-2022 |
25eeab01 RL |
23 | platform: |
24 | - arch: win64 | |
e98940d6 | 25 | config: enable-fips |
25eeab01 | 26 | - arch: win32 |
e98940d6 | 27 | config: --strict-warnings no-fips |
ce42b72c | 28 | runs-on: ${{ github.server_url == 'https://github.com' && matrix.os || format('{0}-self-hosted', matrix.os) }} |
d7c18395 | 29 | steps: |
d4231af6 | 30 | - uses: actions/checkout@v4 |
1ac0464d TM |
31 | - name: checkout fuzz/corpora submodule |
32 | run: git submodule update --init --depth 1 fuzz/corpora | |
d7c18395 | 33 | - uses: ilammy/msvc-dev-cmd@v1 |
69d8cf70 | 34 | with: |
25eeab01 | 35 | arch: ${{ matrix.platform.arch }} |
69d8cf70 TM |
36 | - uses: ilammy/setup-nasm@v1 |
37 | with: | |
25eeab01 | 38 | platform: ${{ matrix.platform.arch }} |
d7c18395 TM |
39 | - name: prepare the build directory |
40 | run: mkdir _build | |
41 | - name: config | |
42 | working-directory: _build | |
43 | run: | | |
25eeab01 | 44 | perl ..\Configure --banner=Configured no-makedepend ${{ matrix.platform.config }} |
d7c18395 TM |
45 | perl configdata.pm --dump |
46 | - name: build | |
47 | working-directory: _build | |
d0196ddc | 48 | run: nmake /S |
2d374e1c | 49 | - name: download coreinfo |
62ecad53 | 50 | uses: suisei-cn/actions-download-file@v1.6.0 |
2d374e1c DM |
51 | with: |
52 | url: "https://download.sysinternals.com/files/Coreinfo.zip" | |
53 | target: _build/coreinfo/ | |
54 | - name: get cpu info | |
55 | working-directory: _build | |
4ace8248 | 56 | continue-on-error: true |
2d374e1c DM |
57 | run: | |
58 | 7z.exe x coreinfo/Coreinfo.zip | |
59 | ./Coreinfo64.exe -accepteula -f | |
60 | ./apps/openssl.exe version -c | |
796e5f96 NH |
61 | - name: Check platform symbol usage |
62 | working-directory: _build | |
63 | run: perl ../util/checkplatformsyms.pl ../util/platform_symbols/windows-symbols.txt libcrypto-3-x64.dll ./libssl-3-x64.dll | |
d7c18395 TM |
64 | - name: test |
65 | working-directory: _build | |
86825c99 | 66 | run: nmake test VERBOSE_FAILURE=yes TESTS=-test_fuzz* HARNESS_JOBS=4 |
31131927 TM |
67 | - name: install |
68 | # Run on 64 bit only as 32 bit is slow enough already | |
25eeab01 | 69 | if: $${{ matrix.platform.arch == 'win64' }} |
31131927 TM |
70 | run: | |
71 | mkdir _dest | |
72 | nmake install DESTDIR=_dest | |
73 | working-directory: _build | |
d7c18395 | 74 | plain: |
dd53c297 RL |
75 | strategy: |
76 | matrix: | |
77 | os: | |
c37ebbd6 | 78 | - windows-2019 |
c87a4dd7 | 79 | - windows-2022 |
ce42b72c | 80 | runs-on: ${{ github.server_url == 'https://github.com' && matrix.os || format('{0}-self-hosted', matrix.os) }} |
d7c18395 | 81 | steps: |
d4231af6 | 82 | - uses: actions/checkout@v4 |
1ac0464d TM |
83 | - name: checkout fuzz/corpora submodule |
84 | run: git submodule update --init --depth 1 fuzz/corpora | |
d7c18395 TM |
85 | - uses: ilammy/msvc-dev-cmd@v1 |
86 | - name: prepare the build directory | |
87 | run: mkdir _build | |
88 | - name: config | |
89 | working-directory: _build | |
90 | run: | | |
44f05ded | 91 | perl ..\Configure --banner=Configured enable-demos no-makedepend no-shared no-fips enable-md2 enable-rc5 enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-trace enable-crypto-mdebug VC-WIN64A-masm |
d7c18395 TM |
92 | perl configdata.pm --dump |
93 | - name: build | |
94 | working-directory: _build | |
d0196ddc | 95 | run: nmake /S |
2d374e1c | 96 | - name: download coreinfo |
62ecad53 | 97 | uses: suisei-cn/actions-download-file@v1.6.0 |
2d374e1c DM |
98 | with: |
99 | url: "https://download.sysinternals.com/files/Coreinfo.zip" | |
100 | target: _build/coreinfo/ | |
101 | - name: get cpu info | |
102 | working-directory: _build | |
4ace8248 | 103 | continue-on-error: true |
2d374e1c DM |
104 | run: | |
105 | 7z.exe x coreinfo/Coreinfo.zip | |
106 | ./Coreinfo64.exe -accepteula -f | |
107 | ./apps/openssl.exe version -c | |
d7c18395 TM |
108 | - name: test |
109 | working-directory: _build | |
451c2a95 | 110 | run: nmake test VERBOSE_FAILURE=yes HARNESS_JOBS=4 |
6ec37db5 | 111 | minimal: |
dd53c297 RL |
112 | strategy: |
113 | matrix: | |
114 | os: | |
c37ebbd6 | 115 | - windows-2019 |
c87a4dd7 | 116 | - windows-2022 |
ce42b72c | 117 | runs-on: ${{ github.server_url == 'https://github.com' && matrix.os || format('{0}-self-hosted', matrix.os) }} |
6ec37db5 | 118 | steps: |
d4231af6 | 119 | - uses: actions/checkout@v4 |
1ac0464d TM |
120 | - name: checkout fuzz/corpora submodule |
121 | run: git submodule update --init --depth 1 fuzz/corpora | |
6ec37db5 SL |
122 | - uses: ilammy/msvc-dev-cmd@v1 |
123 | - name: prepare the build directory | |
124 | run: mkdir _build | |
125 | - name: config | |
126 | working-directory: _build | |
127 | run: | | |
44f05ded | 128 | perl ..\Configure --banner=Configured enable-demos no-makedepend no-bulk no-deprecated no-fips no-asm no-threads -DOPENSSL_SMALL_FOOTPRINT |
6ec37db5 SL |
129 | perl configdata.pm --dump |
130 | - name: build | |
131 | working-directory: _build | |
d0196ddc | 132 | run: nmake # verbose, so no /S here |
2d374e1c | 133 | - name: download coreinfo |
62ecad53 | 134 | uses: suisei-cn/actions-download-file@v1.6.0 |
2d374e1c DM |
135 | with: |
136 | url: "https://download.sysinternals.com/files/Coreinfo.zip" | |
137 | target: _build/coreinfo/ | |
138 | - name: get cpu info | |
139 | working-directory: _build | |
4ace8248 | 140 | continue-on-error: true |
2d374e1c DM |
141 | run: | |
142 | 7z.exe x coreinfo/Coreinfo.zip | |
143 | ./Coreinfo64.exe -accepteula -f | |
144 | ./apps/openssl.exe version -c | |
6ec37db5 SL |
145 | - name: test |
146 | working-directory: _build | |
86825c99 | 147 | run: nmake test VERBOSE_FAILURE=yes TESTS=-test_fuzz* HARNESS_JOBS=4 |
e3b01eb6 MB |
148 | cygwin: |
149 | # Run a job for each of the specified target architectures: | |
150 | strategy: | |
151 | matrix: | |
152 | os: | |
153 | - windows-2019 | |
154 | # really worth while running, too? cygwin should mask this | |
155 | # - windows-2022 | |
156 | platform: | |
157 | - arch: win64 | |
44f05ded | 158 | config: -DCMAKE_C_COMPILER=gcc --strict-warnings enable-demos no-fips |
e3b01eb6 MB |
159 | # are we really learning sth new from win32? So let's save some CO2 for now disabling this |
160 | # - arch: win32 | |
8a764202 | 161 | # config: -DCMAKE_C_COMPILER=gcc --strict-warnings no-fips |
ce42b72c | 162 | runs-on: ${{ github.server_url == 'https://github.com' && matrix.os || format('{0}-self-hosted', matrix.os) }} |
e3b01eb6 MB |
163 | env: |
164 | CYGWIN_NOWINPATH: 1 | |
165 | SHELLOPTS: igncr | |
166 | # Don't overwhelm github CI VMs: | |
167 | MAKE_PARAMS: -j 4 | |
168 | steps: | |
169 | # Checkout before cygwin can mess with PATH... | |
d4231af6 | 170 | - uses: actions/checkout@v4 |
e3b01eb6 MB |
171 | - uses: cygwin/cygwin-install-action@master |
172 | with: | |
173 | packages: perl git make gcc-core | |
174 | - name: Check repo | |
175 | run: cygcheck -V | |
176 | - name: Full cygcheck status | |
177 | run: cygcheck -s -v -r -h | |
178 | # Activate this if checkout action fails: | |
179 | # - name: Clone repo | |
180 | # run: bash -c "pwd && git clone --branch ${{ github.ref_name }} --depth 1 https://github.com/${{ github.repository }}.git" | |
181 | - name: Full build | |
182 | run: bash -c "gcc --version && ./config ${{ matrix.platform.config }} && make $MAKE_PARAMS" | |
183 | # Disable testing for now. TBD: Need local cygwin installation to debug . | |
184 | # - name: Run openssl tests | |
185 | # run: bash -c "cd openssl && make V=1 test" |