forked from PokemonAutomation/Arduino-Source
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (66 loc) · 2.57 KB
/
cpp-ci-serial-programs.yml
File metadata and controls
73 lines (66 loc) · 2.57 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
name: C++ CI Serial Programs
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2025, macos-15, macos-15-intel, ubuntu-24.04]
compiler: ['default', 'clang']
qt_version: ['6.10.1']
include:
- qt_version: '6.10.1'
qt_version_major: '6'
qt_modules: 'qtmultimedia qtserialport'
- os: 'windows-2025'
compiler: 'clang'
cmake_additional_param: '-T ClangCL'
- os: 'ubuntu-24.04'
compiler: 'clang'
cmake_additional_param: '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++'
exclude:
- os: 'macos-15'
compiler: 'clang'
- os: 'macos-15-intel'
compiler: 'clang'
# Excluded because macos default toolset is already clang
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_version }}
modules: ${{ matrix.qt_modules }}
- name: Install dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt upgrade
sudo apt install libopencv-dev
- name: Install dependencies
if: startsWith(matrix.os, 'mac')
run: |
brew install opencv onnxruntime
- name: Generate binaries
run: |
cd SerialPrograms
mkdir bin
cd bin
cmake .. -DQT_MAJOR:STRING=${{ matrix.qt_version_major }} ${{ matrix.cmake_additional_param }}
cmake --build . --config RelWithDebInfo --parallel 10
- name: Prepare upload folder
if: startsWith(matrix.os, 'windows')
run: |
del SerialPrograms/bin/RelWithDebInfo/SerialProgramsLib.lib
echo https://github.com/${{github.repository}}/commit/${{github.sha}} > SerialPrograms/bin/RelWithDebInfo/version.txt
copy binding.txt SerialPrograms/bin/RelWithDebInfo/binding.txt
copy SWITCH1.JSON SerialPrograms/bin/RelWithDebInfo/SWITCH1.JSON
copy SWITCH2.JSON SerialPrograms/bin/RelWithDebInfo/SWITCH2.JSON
copy SWITCH3.JSON SerialPrograms/bin/RelWithDebInfo/SWITCH3.JSON
- uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'windows')
with:
name: Serial Programs (os=${{ matrix.os }} - compiler=${{ matrix.compiler }} - qt_version=${{ matrix.qt_version }})
path: SerialPrograms/bin/RelWithDebInfo