-
Notifications
You must be signed in to change notification settings - Fork 427
108 lines (105 loc) · 3.66 KB
/
build_windows.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Build CCExtractor on Windows
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
VCPKG_DEFAULT_TRIPLET: x64-windows-static
on:
workflow_dispatch:
push:
paths:
- ".github/workflows/build_windows.yml"
- "**.c"
- "**.h"
- "windows/**"
pull_request:
types: [opened, synchronize, reopened]
paths:
- ".github/workflows/build_windows.yml"
- "**.c"
- "**.h"
- "windows/**"
jobs:
build_release:
runs-on: windows-2019
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.3.1
- name: Install llvm and clang
run: choco install llvm gpac
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Win 10 SDK
uses: ilammy/msvc-dev-cmd@v1
- name: Setup Vcpkg
id: vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: "2023.06.20"
cache-version: "2"
ignore-reserve-cache-error: true
- name: Install dependencies
run: cd vcpkg && vcpkg integrate install && vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static
- name: build Release-Full
env:
LIBCLANG_PATH: "C:\\Program Files\\LLVM\\lib"
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
CARGO_TARGET_DIR: "..\\..\\windows"
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
run: msbuild ccextractor.sln /p:Configuration=Release-Full /p:Platform=x64
working-directory: ./windows
- name: Display version information
run: ./ccextractorwinfull.exe --version
working-directory: ./windows/x64/Release-Full
- uses: actions/upload-artifact@v3
with:
name: CCExtractor Windows Release build
path: |
./windows/x64/Release-Full/ccextractorwinfull.exe
./windows/x64/Release-Full/*.dll
build_debug:
runs-on: windows-2019
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.3.1
- name: Install llvm and clang
run: choco install llvm gpac
- name: Setup Vcpkg
id: vcpkg
uses: friendlyanon/setup-vcpkg@v1
with:
committish: "2023.06.20"
cache-version: "2"
ignore-reserve-cache-error: true
- name: Install dependencies
run: cd vcpkg && vcpkg integrate install && vcpkg install leptonica tesseract ffmpeg --triplet x64-windows-static
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Win 10 SDK
uses: ilammy/msvc-dev-cmd@v1
- name: build Debug-Full
env:
LIBCLANG_PATH: "C:\\Program Files\\LLVM\\lib"
LLVM_CONFIG_PATH: "C:\\Program Files\\LLVM\\bin\\llvm-config"
CARGO_TARGET_DIR: "..\\..\\windows"
BINDGEN_EXTRA_CLANG_ARGS: -fmsc-version=0
VCPKG_ROOT: ${{ github.workspace }}\vcpkg
run: msbuild ccextractor.sln /p:Configuration=Debug-Full /p:Platform=x64
working-directory: ./windows
- name: Display version information
run: ./ccextractorwinfull.exe --version
working-directory: ./windows/x64/Debug-Full
- uses: actions/upload-artifact@v3
with:
name: CCExtractor Windows Debug build
path: |
./windows/x64/Debug-Full/ccextractorwinfull.exe
./windows/x64/Debug-Full/ccextractorwinfull.pdb
./windows/x64/Debug-Full/*.dll