-
Notifications
You must be signed in to change notification settings - Fork 608
74 lines (63 loc) · 2.4 KB
/
cpp-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
name: C/C++ CI windows
on: [push]
jobs:
build:
strategy:
matrix:
buildtype: [Debug, Release]
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow --tags
- name: pkg
shell: cmd
run: |
choco install --ignorepackagecodes --no-progress -y visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --nocache --installPath %MSVC_PATH%"
git config --global core.autocrlf false
git config --global core.filemode false
env:
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\Community"
- name: depot_tools
shell: bash
run: |
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
- name: fetch webrtc
shell: cmd
run: |
set "PATH=%GITHUB_WORKSPACE%\depot_tools;%PATH%"
mkdir %GITHUB_WORKSPACE%\..\webrtc
cd /d %GITHUB_WORKSPACE%\..\webrtc
fetch --no-history webrtc
env:
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
CLANG_VERSION: ToT
PYTHONIOENCODING: UTF-8
- name: build
shell: cmd
run: |
dir /b /s "C:\Program Files (x86)\vcvars64.bat"
call "%MSVC_PATH%\VC\Auxiliary\Build\vcvars64.bat"
set "PATH=%GITHUB_WORKSPACE%\depot_tools;%GITHUB_WORKSPACE%\..\webrtc\src\third_party\llvm-build\Release+Asserts\bin;%PATH%"
set
cmake -G Ninja -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_MAKE_PROGRAM=ninja.bat -DDETECT_OPENSSL=OFF .
ninja
env:
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\Community"
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
CLANG_VERSION: ToT
PYTHONIOENCODING: UTF-8
- name: cpack
shell: bash
run: |
rm -f *.tar.gz
cpack
echo "artifactPath=$(ls *.tar.gz)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: ${{ env.artifactPath }}
path: ${{ env.artifactPath }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.artifactPath }}