-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.57 KB
/
build.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
name: Release
on:
pull_request:
branches:
- main
env:
WDK_URL: https://go.microsoft.com/fwlink/p/?LinkID=253170
LIBUSB_VER: 90278c538a8fb5fd82aab25ae7f5a9887ca468ce
jobs:
VS2022-Build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# for all commit, tags, and logs
fetch-depth: 0
- name: Checkout libwdi repository
uses: actions/checkout@v3
with:
repository: pbatard/libwdi
path: libwdi
fetch-depth: 0
ref: ${{ env.LIBUSB_VER }}
submodules: recursive
- name: Download WDK
shell: cmd
run: |
curl -L ${{ env.WDK_URL }} -o wdk-redist.msi
msiexec /a wdk-redist.msi /qn TARGETDIR=%CD%\wdk
rm wdk-redist.msi
cd wdk
rename "Windows Kits" "windows-kits"
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Apply patch
shell: bash
run: |
cd libwdi
mv ../diff.patch diff.patch
git apply diff.patch
- name: libwdi build
run: |
cd libwdi
msbuild libwdi.sln /p:Configuration=Release /p:Platform=x64
- name: winusb installer build
run: |
mkdir build && cd build
cmake -G "Visual Studio 17 2022" -A x64 ../ -DPROJECT_ROOT=${{ github.workspace }} -DLIBWDI_ROOT=${{ github.workspace }}\libwdi -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\build\package_contents
cmake --build . --config Release