forked from benirose/O_C-BenisphereSuite
-
Notifications
You must be signed in to change notification settings - Fork 37
45 lines (36 loc) · 1001 Bytes
/
firmware.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
name: PlatformIO CI
on:
push:
paths:
- 'software/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup env
run: |
echo "OC_ARTIFACT_TAG=${GITHUB_REF_NAME}-$(git rev-parse --short HEAD)" | tr '/' '_' >> $GITHUB_ENV
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- run: |
pip3 install --upgrade pip
pip3 install -r .github/workflows/requirements.txt
- name: Build firmware
working-directory: software/
run: |
pio run
- name: Copy artifact
uses: actions/upload-artifact@v4
with:
name: o_C-${{env.OC_ARTIFACT_TAG}}
path: software/.pio/build/*/*.hex