windows.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. name: Windows GitHub CI
  8. on: [pull_request, push]
  9. permissions:
  10. contents: read
  11. jobs:
  12. shared:
  13. # Run a job for each of the specified target architectures:
  14. strategy:
  15. matrix:
  16. os:
  17. - windows-2019
  18. - windows-2022
  19. platform:
  20. - arch: win64
  21. config: enable-fips
  22. - arch: win32
  23. config: --strict-warnings no-fips
  24. runs-on: ${{matrix.os}}
  25. steps:
  26. - uses: actions/checkout@v3
  27. - name: checkout fuzz/corpora submodule
  28. run: git submodule update --init --depth 1 fuzz/corpora
  29. - uses: ilammy/msvc-dev-cmd@v1
  30. with:
  31. arch: ${{ matrix.platform.arch }}
  32. - uses: ilammy/setup-nasm@v1
  33. with:
  34. platform: ${{ matrix.platform.arch }}
  35. - uses: shogo82148/actions-setup-perl@v1
  36. - name: prepare the build directory
  37. run: mkdir _build
  38. - name: config
  39. working-directory: _build
  40. run: |
  41. perl ..\Configure --banner=Configured no-makedepend ${{ matrix.platform.config }}
  42. perl configdata.pm --dump
  43. - name: build
  44. working-directory: _build
  45. run: nmake /S
  46. - name: test
  47. working-directory: _build
  48. run: nmake test VERBOSE_FAILURE=yes TESTS=-test_fuzz* HARNESS_JOBS=4
  49. - name: install
  50. # Run on 64 bit only as 32 bit is slow enough already
  51. if: $${{ matrix.platform.arch == 'win64' }}
  52. run: |
  53. mkdir _dest
  54. nmake install DESTDIR=_dest
  55. working-directory: _build
  56. plain:
  57. strategy:
  58. matrix:
  59. os:
  60. - windows-2019
  61. - windows-2022
  62. runs-on: ${{matrix.os}}
  63. steps:
  64. - uses: actions/checkout@v3
  65. - name: checkout fuzz/corpora submodule
  66. run: git submodule update --init --depth 1 fuzz/corpora
  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@v3
  91. - name: checkout fuzz/corpora submodule
  92. run: git submodule update --init --depth 1 fuzz/corpora
  93. - uses: ilammy/msvc-dev-cmd@v1
  94. - uses: shogo82148/actions-setup-perl@v1
  95. - name: prepare the build directory
  96. run: mkdir _build
  97. - name: config
  98. working-directory: _build
  99. run: |
  100. perl ..\Configure --banner=Configured no-makedepend no-bulk no-deprecated no-fips no-asm no-threads -DOPENSSL_SMALL_FOOTPRINT
  101. perl configdata.pm --dump
  102. - name: build
  103. working-directory: _build
  104. run: nmake # verbose, so no /S here
  105. - name: test
  106. working-directory: _build
  107. run: nmake test VERBOSE_FAILURE=yes TESTS=-test_fuzz* HARNESS_JOBS=4
  108. cygwin:
  109. # Run a job for each of the specified target architectures:
  110. strategy:
  111. matrix:
  112. os:
  113. - windows-2019
  114. # really worth while running, too? cygwin should mask this
  115. # - windows-2022
  116. platform:
  117. - arch: win64
  118. config: -DCMAKE_C_COMPILER=gcc --strict-warnings no-fips
  119. # are we really learning sth new from win32? So let's save some CO2 for now disabling this
  120. # - arch: win32
  121. # config: -DCMAKE_C_COMPILER=gcc --strict-warnings no-fips
  122. runs-on: ${{matrix.os}}
  123. env:
  124. CYGWIN_NOWINPATH: 1
  125. SHELLOPTS: igncr
  126. # Don't overwhelm github CI VMs:
  127. MAKE_PARAMS: -j 4
  128. steps:
  129. # Checkout before cygwin can mess with PATH...
  130. - uses: actions/checkout@v3
  131. - uses: cygwin/cygwin-install-action@master
  132. with:
  133. packages: perl git make gcc-core
  134. - name: Check repo
  135. run: cygcheck -V
  136. - name: Full cygcheck status
  137. run: cygcheck -s -v -r -h
  138. # Activate this if checkout action fails:
  139. # - name: Clone repo
  140. # run: bash -c "pwd && git clone --branch ${{ github.ref_name }} --depth 1 https://github.com/${{ github.repository }}.git"
  141. - name: Full build
  142. run: bash -c "gcc --version && ./config ${{ matrix.platform.config }} && make $MAKE_PARAMS"
  143. # Disable testing for now. TBD: Need local cygwin installation to debug .
  144. # - name: Run openssl tests
  145. # run: bash -c "cd openssl && make V=1 test"