Repository navigation
163 lines (142 loc) · 4.19 KB
/
Copy pathcompanion.yml
File metadata and controls
163 lines (142 loc) · 4.19 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Companion
on:
push:
branches:
- 'main'
tags:
- v*
paths:
- '.github/workflows/companion.yml'
- '.github/workflows/wasm_modules.yml'
- '.github/actions/python_dependencies/**'
- '.github/actions/wasi_sdk/**'
- '.github/actions/build_companion/**'
- 'companion/**'
- 'fw.json'
- 'pyproject.toml'
- 'tools/build-companion.sh'
- 'tools/build-wasm-modules.sh'
- 'radio/src/targets/simu/CMakeLists.txt'
- 'radio/src/targets/simu/pch_std.h'
- 'cmake/wasm/CMakeLists.txt'
- 'cmake/FetchWamr.cmake'
- 'cmake/wamr-*.patch'
pull_request:
paths:
- '.github/workflows/companion.yml'
- '.github/workflows/wasm_modules.yml'
- '.github/actions/python_dependencies/**'
- '.github/actions/wasi_sdk/**'
- '.github/actions/build_companion/**'
- 'companion/**'
- 'fw.json'
- 'pyproject.toml'
- 'tools/build-companion.sh'
- 'tools/build-wasm-modules.sh'
- 'radio/src/targets/simu/CMakeLists.txt'
- 'radio/src/targets/simu/pch_std.h'
- 'cmake/wasm/CMakeLists.txt'
- 'cmake/FetchWamr.cmake'
- 'cmake/wamr-*.patch'
workflow_dispatch:
inputs:
target:
description: 'Build target'
required: true
default: 'all'
type: choice
options:
- all
- linux
- macos
- windows
- wasm
jobs:
modules:
name: Modules
uses: ./.github/workflows/wasm_modules.yml
build-linux:
name: Linux Companion
runs-on: ubuntu-latest
needs: modules
if: |
(inputs.target == 'all' || inputs.target == 'linux' || inputs.target == '') &&
(github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci: skip-cpn-linux'))
container:
image: ghcr.io/edgetx/edgetx-dev:latest
volumes:
- ${{ github.workspace }}:/src
steps:
- name: Check out the repo
uses: actions/checkout@v7
with:
submodules: recursive
- name: Download WASM modules
uses: actions/download-artifact@v8
with:
pattern: wasm-modules-*
path: wasm-modules
merge-multiple: true
- name: Setup and Build
uses: ./.github/actions/build_companion
with:
os: 'linux'
- name: Run companion unit tests
shell: bash
run: cmake --build build/native --target tests-companion --parallel
build-macos:
name: macOS Companion
runs-on: macos-15
needs: modules
if: |
(inputs.target == 'all' || inputs.target == 'macos' || inputs.target == '') &&
(github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci: skip-cpn-macos'))
env:
CMAKE_OSX_ARCHITECTURES: 'x86_64;arm64'
CMAKE_OSX_DEPLOYMENT_TARGET: '11.0'
steps:
- name: Check out the repo
uses: actions/checkout@v7
with:
submodules: recursive
- name: Download WASM modules
uses: actions/download-artifact@v8
with:
pattern: wasm-modules-*
path: wasm-modules
merge-multiple: true
- name: Setup and Build
uses: ./.github/actions/build_companion
with:
os: 'macos'
qt-arch: 'clang_64'
build-win64:
name: Windows Companion
runs-on: windows-latest
needs: modules
if: |
(inputs.target == 'all' || inputs.target == 'windows' || inputs.target == '') &&
(github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'ci: skip-cpn-win'))
env:
CMAKE_GENERATOR: 'Ninja'
CXX: 'clang++'
CC: 'clang'
defaults:
run:
shell: bash
steps:
- name: Check out the repo
uses: actions/checkout@v7
with:
submodules: recursive
- name: Download WASM modules
uses: actions/download-artifact@v8
with:
pattern: wasm-modules-*
path: wasm-modules
merge-multiple: true
- name: Setup and Build
uses: ./.github/actions/build_companion
with:
os: 'win64'
qt-arch: 'win64_msvc2022_64'