-
Notifications
You must be signed in to change notification settings - Fork 7
83 lines (83 loc) · 2.61 KB
/
build_manual .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
name: Build ffef firmware
on:
workflow_dispatch:
inputs:
branch:
description: 'Which branch?'
required: true
default: 'nightly'
make_options:
description: 'Make Options'
required: true
default: '-j3'
type: choice
options:
- '-j3'
- '-j2'
- '-j1'
- 'V=s'
jobs:
Configcheck:
outputs:
matrix: ${{ steps.setmatrix.outputs.matrix }}
runs-on: ubuntu-20.04
steps:
- name: Auschecken
uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.branch }}
submodules: true
- name: Konfigcheck
uses: nebularg/[email protected]
with:
files: site.conf
args: --config ./gluon/.luacheckrc
- name: Buildmatrix
id: setmatrix
run: |
ln -s ../ site
matrix=$( make -s list-targets BROKEN=1 | /bin/sed 's/$/"}/' | /bin/sed 's/^/{"target":"/' | /bin/sed ':a;N;$!ba;s/\n/,/g' )
echo "Targets: $matrix"
echo "matrix={\"include\":[$(echo $matrix)]}" >> $GITHUB_OUTPUT
working-directory: gluon
build_firmware:
needs: Configcheck
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.Configcheck.outputs.matrix) }}
runs-on: ubuntu-20.04
steps:
- name: Auschecken
uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.branch }}
submodules: true
- name: Permissions
run: chmod +x contrib/actions/run-build.sh contrib/actions/install-dependencies.sh
- name: Install Dependencies
run: sudo contrib/actions/install-dependencies.sh
- name: Build
run: |
mkdir output logs
ln -s ../ site
../contrib/actions/run-build.sh ${{ matrix.target }} ${{ inputs.make_options }}
working-directory: gluon
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}_logs
path: gluon/logs
- name: Archive build output
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}_output
path: gluon/output
- name: upload
if: github.repository == 'FreifunkErfurt/site-ffef'
env:
SSH_KEY: ${{ secrets.GITSYNC_PRIVATE_KEY }}
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${SSH_KEY}"
rsync -avz '-e ssh -o StrictHostKeyChecking=no -p2215' gluon/output/ [email protected]:/hotfolder/${{ github.event.inputs.branch }}/