-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (93 loc) · 2.55 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
name: Compile Firmware and Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up environment
run: |
sudo apt-get update && sudo apt-get install -y cmake build-essential
- name: Build and run tests
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cd build
make
cd ..
./build/googletests | tee googletest.log
- name: Upload test log
uses: actions/upload-artifact@v4
with:
name: test_artifact
path: |
build/googletests
googletest.log
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Compile application
id: compile
uses: particle-iot/compile-action@v1
with:
particle-platform-name: 'tracker'
device-os-version: '5.3.0'
- name: Compile Documentation
id: docs
uses: mattnotmitt/[email protected]
- name: Check outputs
run: |
ls -alh docs/html
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: firmware-artifact
path: |
${{ steps.compile.outputs.firmware-path }}
${{ steps.compile.outputs.target-path }}
docs/html
doxygen.log
release:
needs: [compile, test]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
if: ${{ github.ref == 'refs/heads/main' }}
outputs:
release: ${{ steps.release.outputs.release }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
ref: main
token: ${{ secrets.RELEASER }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Python Dependencies
run: |
python -m pip install -r requirements.txt
- name: Set up NPM
uses: actions/setup-node@v4
with:
node-version: '>=20.8.1'
- name: Install plugins
run: |
npm install @semantic-release/exec @semantic-release/git @semantic-release/changelog -D
- name: Run Semantic Release
id: release
env:
GH_TOKEN : ${{ secrets.RELEASER }}
run: |
npx semantic-release@23