-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (43 loc) · 1.38 KB
/
main.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
name: CI
on:
[push, pull_request]
jobs:
build-msvc:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Build tpm2-send-tbs
run: cl /W4 /WX src/tpm2-send-tbs.c /link tbs.lib
- name: Copy tpm.lib
run: dir -path "C:\Program Files (x86)\Windows Kits\10\Lib\*\um\x64" -recurse -include 'tbs.lib' | Copy-Item -Destination .
- name: Copy tpm.h
run: dir -path "C:\Program Files (x86)\Windows Kits\10\Include\*\shared" -recurse -include 'tbs.h' | Copy-Item -Destination .
- name: Archive tpm2-send-tbs.exe
uses: actions/upload-artifact@v3
with:
path: tpm2-send-tbs.exe
if-no-files-found: error
- name: Archive tbs.lib
uses: actions/upload-artifact@v3
with:
path: tbs.lib
if-no-files-found: error
- name: Archive tbs.h
uses: actions/upload-artifact@v3
with:
path: tbs.h
if-no-files-found: error
build-mingw:
needs: build-msvc
runs-on: ubuntu-latest
# download tbs.lib, tbs.h from previous job
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: artifact
- name: Install dependencies
run: sudo apt install -y mingw-w64 tpm2-tools
- name: Build using make
run: make LDFLAGS=-L.