xref: /openssl/.github/workflows/windows.yml (revision c6e7f427)
1# Copyright 2021 The OpenSSL Project Authors. All Rights Reserved.
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
8name: Windows GitHub CI
9
10on: [pull_request, push]
11
12permissions:
13  contents: read
14
15jobs:
16  shared:
17    # Run a job for each of the specified target architectures:
18    strategy:
19      matrix:
20        os:
21          - windows-2019
22          - windows-2022
23        platform:
24          - arch: win64
25            config: VC-WIN64A enable-fips
26          - arch: win32
27            config: VC-WIN32 --strict-warnings no-fips
28    runs-on: ${{matrix.os}}
29    steps:
30    - uses: actions/checkout@v2
31    - uses: ilammy/msvc-dev-cmd@v1
32      with:
33        arch: ${{ matrix.platform.arch }}
34    - uses: ilammy/setup-nasm@v1
35      with:
36        platform: ${{ matrix.platform.arch }}
37    - uses: shogo82148/actions-setup-perl@v1
38    - name: prepare the build directory
39      run: mkdir _build
40    - name: config
41      working-directory: _build
42      run: |
43        perl ..\Configure --banner=Configured no-makedepend ${{ matrix.platform.config }}
44        perl configdata.pm --dump
45    - name: build
46      working-directory: _build
47      run: nmake /S
48    - name: test
49      working-directory: _build
50      run: nmake test VERBOSE_FAILURE=yes TESTS=-test_fuzz* HARNESS_JOBS=4
51    - name: install
52      # Run on 64 bit only as 32 bit is slow enough already
53      if: $${{ matrix.platform.arch == 'win64' }}
54      run: |
55        mkdir _dest
56        nmake install DESTDIR=_dest
57      working-directory: _build
58  plain:
59    strategy:
60      matrix:
61        os:
62          - windows-2019
63          - windows-2022
64    runs-on: ${{matrix.os}}
65    steps:
66    - uses: actions/checkout@v2
67    - uses: ilammy/msvc-dev-cmd@v1
68    - uses: shogo82148/actions-setup-perl@v1
69    - name: prepare the build directory
70      run: mkdir _build
71    - name: config
72      working-directory: _build
73      run: |
74        perl ..\Configure --banner=Configured no-makedepend no-shared no-fips VC-WIN64A-masm
75        perl configdata.pm --dump
76    - name: build
77      working-directory: _build
78      run: nmake /S
79    - name: test
80      working-directory: _build
81      run: nmake test VERBOSE_FAILURE=yes HARNESS_JOBS=4
82  minimal:
83    strategy:
84      matrix:
85        os:
86          - windows-2019
87          - windows-2022
88    runs-on: ${{matrix.os}}
89    steps:
90    - uses: actions/checkout@v2
91    - uses: ilammy/msvc-dev-cmd@v1
92    - uses: shogo82148/actions-setup-perl@v1
93    - name: prepare the build directory
94      run: mkdir _build
95    - name: config
96      working-directory: _build
97      run: |
98        perl ..\Configure --banner=Configured no-makedepend no-bulk no-deprecated no-fips no-asm -DOPENSSL_SMALL_FOOTPRINT VC-WIN64A
99        perl configdata.pm --dump
100    - name: build
101      working-directory: _build
102      run: nmake # verbose, so no /S here
103    - name: test
104      working-directory: _build
105      run: nmake test VERBOSE_FAILURE=yes TESTS=-test_fuzz* HARNESS_JOBS=4
106