-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (66 loc) · 2.09 KB
/
test-self-hosted.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
name: Test Self-Hosted Runner
on:
push:
workflow_dispatch:
jobs:
test-self-hosted-setup:
runs-on: self-hosted
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate Matrix
id: generate-matrix
run: |
python3 scripts/actions/generate_matrix.py firmware/projects
echo "matrix=$(cat matrix.json)" >> $GITHUB_OUTPUT
test-self-hosted-build:
runs-on: self-hosted
needs: test-self-hosted-setup
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.test-self-hosted-setup.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build ${{ matrix.project }} for ${{ matrix.platform }}
run: |
cd firmware
make PROJECT=${{ matrix.project }} PLATFORM=${{ matrix.platform }} build
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: Test Build Artifact
# test-self-hosted-build:
# runs-on: self-hosted
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Build for cli
# run: |
# cd firmware
# make PROJECT=Demo/Blink PLATFORM=cli build
# - name: Build for stm32f767
# run: |
# cd firmware
# make PROJECT=Demo/Blink PLATFORM=stm32f767 build
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: Test Build Artifact
# path: firmware/build/
# test-self-hosted-deploy:
# needs: test-self-hosted-build
# runs-on: self-hosted
# # environment: test-deploy
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v4
# with:
# name: Test Build Artifact
# - name: Deploy to Raspberry Pi
# run: |
# echo "Deploying to Raspberry Pi"
# scp -r 'Test Build Deploy' [email protected]: