-
-
Notifications
You must be signed in to change notification settings - Fork 243
54 lines (45 loc) · 1.46 KB
/
cross-platform.yml
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
name: Cross-Platform CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- if: matrix.os == 'windows-latest'
run: choco install openssl
- if: matrix.os == 'macos-latest'
run: sudo cp /usr/local/opt/[email protected]/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/
- uses: actions/checkout@v3
- run: cmake -E make_directory ${{ github.workspace }}/build
- name: configure
shell: bash # access regardless of the host operating system
working-directory: ${{ github.workspace }}/build
run: cmake $GITHUB_WORKSPACE -DJWT_BUILD_EXAMPLES=ON
- name: build
working-directory: ${{ github.workspace }}/build
shell: bash
run: cmake --build .
- if: matrix.os != 'windows-latest'
name: test
working-directory: ${{ github.workspace }}/build
shell: bash
run: |
./example/rsa-create
./example/rsa-verify
- if: matrix.os == 'windows-latest'
name: test
working-directory: ${{ github.workspace }}/build
run: |
example\Debug\rsa-create.exe
example\Debug\rsa-verify.exe
- if: github.event_name == 'push' && always()
uses: ./.github/actions/badge
with:
category: cross-platform
label: ${{ matrix.os }}