-
Notifications
You must be signed in to change notification settings - Fork 207
65 lines (58 loc) · 1.98 KB
/
Copy pathwindows.yml
File metadata and controls
65 lines (58 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Windows
on:
push:
branches: [master]
paths:
- 'cmake/**'
- '.github/workflows/windows.yml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'cmake/**'
- '.github/workflows/windows.yml'
workflow_call:
inputs:
caller_run_id:
description: 'run id of the calling workflow; keeps a called run in its own concurrency group'
type: string
default: ''
workflow_dispatch:
concurrency:
group: ${{ inputs.caller_run_id && format('windows-call-{0}', inputs.caller_run_id) || format('windows-{0}', github.ref) }}
cancel-in-progress: ${{ !inputs.caller_run_id }}
permissions:
contents: read
jobs:
windows:
name: cmake hash (MSVC)
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: windows-latest
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
- name: Fetch wolfSSL master
run: bash .github/scripts/git-clone-retry.sh -q --depth 1 --branch master https://github.com/wolfSSL/wolfssl cmake/wolfssl
# Same cmake/ app the Linux cmake job builds; here through MSVC (multi-config,
# so --config Release and the binary lands under a Release/ subdir).
- name: Build (MSVC, Release)
run: |
set -euo pipefail
cd cmake
cmake -S . -B build -DCMAKE_C_FLAGS=-I../include/
cmake --build build --config Release
- name: Run
run: |
set -euo pipefail
cd cmake
bin=$(find build -name hash.exe | head -1)
[ -n "$bin" ] || { echo "FAIL: hash.exe not produced"; exit 1; }
out=$("./$bin" example_string)
echo "$out"
want=9BFB55A8406617FF3E6767EC5D27FC6B5682C3A79C415EF6E084BF7D050273E6
case "$out" in
*"$want"*) echo "verified: sha256 matches on Windows" ;;
*) echo "FAIL: expected $want"; exit 1 ;;
esac