]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
CI: Build and test on Windows (MSVC)
authorVitaly Chikunov <vt@altlinux.org>
Thu, 2 Dec 2021 00:38:27 +0000 (03:38 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Sat, 11 Dec 2021 16:45:14 +0000 (19:45 +0300)
Uses actions/cache to speed up engine rebuilds.

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
.editorconfig
.github/workflows/windows.yml [new file with mode: 0644]

index 22d449b2cf162432619c37c486a5765c162e7e5e..cde16c3e0c6dc108a2040890bc41dbbcb022653e 100644 (file)
@@ -15,6 +15,10 @@ indent_style = space
 indent_size = 2
 indent_style = space
 
+[*.yml]
+indent_size = 4
+indent_style = space
+
 [COMMIT_EDITMSG]
 indent_size = 2
 indent_style = space
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644 (file)
index 0000000..78b724c
--- /dev/null
@@ -0,0 +1,48 @@
+name: CI (windows)
+on: [push, pull_request]
+
+jobs:
+    msvc-openssl:
+        runs-on: windows-latest
+        outputs:
+            openssl-head: ${{ steps.openssl.outputs.head }}
+        steps:
+            - uses: actions/checkout@v2
+              with:
+                  repository: openssl/openssl
+                  fetch-depth: 0
+            - run: echo "::set-output name=head::$(git describe --always --long)"
+              id: openssl
+            - uses: actions/cache@v2
+              id: cache
+              with:
+                  path: _dest
+                  key: ${{ runner.os }}-openssl-${{ steps.openssl.outputs.head }}
+            - uses: ilammy/msvc-dev-cmd@v1
+            - name: Build OpenSSL
+              if: steps.cache.outputs.cache-hit != 'true'
+              run: |
+                  perl Configure no-makedepend no-tests no-asm
+                  perl configdata.pm --dump
+                  nmake /S build_libs build_programs
+                  nmake /S install_sw DESTDIR=_dest
+
+    msvc-engine:
+        needs: msvc-openssl
+        runs-on: windows-latest
+        steps:
+            - uses: actions/checkout@v2
+              with:
+                  submodules: true
+            - uses: actions/cache@v2
+              with:
+                  path: _dest
+                  key: ${{ runner.os }}-openssl-${{ needs.msvc-openssl.outputs.openssl-head }}
+            - run: cmake -DOPENSSL_ROOT_DIR="_dest\Program Files\OpenSSL" -DOPENSSL_ENGINES_DIR=bin .
+            - run: cmake --build .
+            - name: Run tests
+              run: |
+                  $env:PATH = "$env:PATH;$pwd\_dest\Program Files\OpenSSL\bin"
+                  $env:OPENSSL_ENGINES = "$pwd\bin\Debug"
+                  $env:OPENSSL_MODULES = "$pwd\bin\Debug"
+                  ctest -C Debug --output-on-failure