-
Notifications
You must be signed in to change notification settings - Fork 24
118 lines (114 loc) · 3.95 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
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
109
110
111
112
113
114
115
116
117
118
name: Build
on: [workflow_call]
permissions: {}
jobs:
generate-bindings:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: true
- name: Generate bindings
run: python3 ci/build_libtelio.py bindings --dockerized
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: libtelio-bindings
path: dist/
build-native:
strategy:
matrix:
include:
- arch: x86_64
target_os: macos
runner: macos-13
- arch: aarch64
target_os: macos
runner: macos-14
- arch: aarch64
target_os: ios
runner: macos-13
- arch: x86_64
target_os: windows
runner: windows-2022
- arch: aarch64
target_os: windows
runner: windows-2022
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: true
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
with:
key: ${{ matrix.target_os }}-${{ matrix.arch }}
- name: Setup MSVC
uses: egor-tensin/vs-shell@9a932a62d05192eae18ca370155cf877eecc2202 # v2.1
if: ${{ matrix.target_os == 'windows' }}
- name: install python3-requests
run: pip3 install requests==2.32.3 --break-system-packages
- name: Build libtelio
run: python3 ci/build_libtelio.py build ${{ matrix.target_os }} ${{ matrix.arch }} --msvc
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: libtelio-build-${{ matrix.target_os }}-${{ matrix.arch }}
path: dist/
build-docker:
strategy:
matrix:
include:
- arch: x86_64
target_os: linux
- arch: i686
target_os: linux
- arch: aarch64
target_os: linux
- arch: armv7hf
target_os: linux
- arch: armv5
target_os: linux
- arch: x86_64
target_os: android
- arch: i686
target_os: android
- arch: aarch64
target_os: android
- arch: armv7
target_os: android
- arch: x86_64
target_os: windows
runs-on: ubuntu-22.04
container: |-
${{ matrix.target_os == 'linux' && 'ghcr.io/nordsecurity/build-linux-rust1.77.2:v0.0.4' ||
matrix.target_os == 'android' && 'ghcr.io/nordsecurity/build-android-rust1.77.2:v0.0.2' ||
'ghcr.io/nordsecurity/build-windows-rust1.77.2:v0.0.2' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: true
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
with:
key: ${{ matrix.target_os }}-${{ matrix.arch }}
- name: Build libtelio
run: python3 ci/build_libtelio.py build ${{ matrix.target_os }} ${{ matrix.arch }}
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: libtelio-build-${{ matrix.target_os }}-${{ matrix.arch }}
path: dist/
build-tclid:
strategy:
matrix:
include:
- arch: x86_64
- arch: aarch64
runs-on: ubuntu-22.04
container: |-
${{ 'ghcr.io/nordsecurity/build-linux-rust1.77.2:v0.0.4' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
submodules: true
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
with:
key: linux-${{ matrix.arch }}
- name: Build tclid
run: cargo build -p tcli --bin tclid --features="tclid" --target ${{ matrix.arch }}-unknown-linux-gnu