-
Notifications
You must be signed in to change notification settings - Fork 1
157 lines (150 loc) · 4.79 KB
/
continuous_build.yaml
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
---
name: Continuous Build
on:
pull_request:
branches:
- main
workflow_call:
jobs:
Core_Library_std:
name: TMAG5273 Library
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Building Core Library for std
run: |
echo "Building Core Library"
cargo build --lib --features=std
Core_Library_rpi:
name: TMAG5273 Library (self-hosted)
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Building Core Library for Raspberry Pi
run: |
echo "Building Core Library"
source "$HOME"/.cargo/env
cargo build --lib --features=rpi
Utils_std:
name: TMAG5273 Utils
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Building Utils for std
run: |
echo "Building Utils for std"
cargo build -p utils --features=std
Utils_rpi:
name: TMAG5273 Utils (self-hosted)
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Building Utils for Raspberry Pi
run: |
echo "Building Utils for Raspberry Pi"
source "$HOME"/.cargo/env
cargo build -p utils --features=rpi
# Due to issues around installing windows driver in CI, we are not compiling the FT232 examples on Windows
FT232_Examples:
name: FT232 Examples
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install FTDI Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install libftdi1 libftdi1-dev -y
- name: Install FTDI Dependencies (MacOS)
if: runner.os == 'MacOS'
run: |
brew install libftdi
- name: Building FT232 Example 1
run: |
echo "Building Example 1"
cargo build --example example_1_basic_readings --features=std
- name: Building FT232 Example 2
run: |
echo "Building Example 2"
cargo build --example example_2_interrupts --features=std
- name: Building FT232 Example 3
run: |
echo "Building Example 3"
cargo build --example example_3_angle_calculations --features=std
- name: Building FT232 Example 4
run: |
echo "Building Example 4"
cargo build --example example_4_i2c_settings --features=std
Raspberry_Pi_Examples:
name: Raspberry Pi Examples
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Building Raspberry Pi Example 1
run: |
echo "Building Example 1"
source "$HOME"/.cargo/env
cargo build --example example_1_basic_readings --features=rpi
- name: Building Raspberry Pi Example 2
run: |
echo "Building Example 2"
source "$HOME"/.cargo/env
cargo build --example example_2_interrupts --features=rpi
- name: Building Raspberry Pi Example 3
run: |
echo "Building Example 3"
source "$HOME"/.cargo/env
cargo build --example example_3_angle_calculations --features=rpi
- name: Building Raspberry Pi Example 4
run: |
echo "Building Example 4"
source "$HOME"/.cargo/env
cargo build --example example_4_i2c_settings --features=rpi
ESP32_Example:
name: ESP32 Example
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, self-hosted]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
if: runner.os == 'Linux'
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Building ESP32 Example (Linux/MacOS)
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
echo "Building ESP32 Example"
source "$HOME"/.cargo/env
cd examples/esp32c3
cargo build
- name: Building ESP32 Example (Windows)
if: runner.os == 'Windows'
run: |
echo "Building ESP32 Example"
cd examples/esp32c3
cargo build