-
Notifications
You must be signed in to change notification settings - Fork 3
84 lines (74 loc) · 2.66 KB
/
libxp2p_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
name: Windows XP2P CI
on:
push:
paths-ignore: # 有時候不想要改個文档也触发 github actions
- '**.md'
- 'LICENSE'
jobs:
build-and-deploy:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.16.0'
- name: Use cmake
run: echo +++++$(cmake --version)
# - name: RC.exe
# run: |
# function Invoke-VSDevEnvironment {
# $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
# $installationPath = & $vswhere -prerelease -legacy -latest -property installationPath
# $Command = Join-Path $installationPath "Common7\Tools\vsdevcmd.bat"
# & "${env:COMSPEC}" /s /c "`"$Command`" -no_logo && set" | Foreach-Object {
# if ($_ -match '^([^=]+)=(.*)') {
# [System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
# }
# }
# }
# Invoke-VSDevEnvironment
# Get-Command rc.exe | Format-Table -AutoSize
- name: debug build libenet
if: startsWith(github.event.ref, 'refs/heads')
run: |
$branch="${{ github.ref }}"
$branch=$branch.Split("/")[2]
echo $branch
.\.github\script\build_enet_windows.cmd Debug $branch
shell: pwsh
env:
GIT_ACCESS_TOKEN: ${{ secrets.IOT_GITHUB_ACCESS_TOKEN }}
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
- name: release build libenet
if: startsWith(github.event.ref, 'refs/tags')
run: |
$branch="${{ github.ref }}"
$branch=$branch.Split("/")[2]
echo $branch
.\.github\script\build_enet_windows.cmd Release $branch
shell: pwsh
env:
GIT_ACCESS_TOKEN: ${{ secrets.IOT_GITHUB_ACCESS_TOKEN }}
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
- name: Compress SDK Artifacts
run: |
tar.exe -a -c -f xp2p_windows.zip iot-p2p/iot/link/pc_app/p2p_sample
- name: Upload Windows SDK Library
if: startsWith(github.event.ref, 'refs/heads')
uses: actions/upload-artifact@v4
with:
name: xp2p_windows_lib
path: xp2p_windows.zip
- name: Upload binaries to release
if: startsWith(github.event.ref, 'refs/tags')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: xp2p_windows.zip
asset_name: xp2p_windows.zip
tag: ${{ github.ref }}
overwrite: true