-
Notifications
You must be signed in to change notification settings - Fork 10
139 lines (135 loc) · 3.61 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
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
name: "Build & test"
on:
push:
pull_request:
schedule:
- cron: '0 3 * * *'
jobs:
build_desktop:
name: "Build suite desktop"
runs-on: ubuntu-20.04
strategy:
matrix:
environment: [Debug, Release]
image: [ghcr.io/paradise-fi/rofi.debian, ghcr.io/paradise-fi/rofi.ubuntu]
defaults:
run:
shell: bash
container:
image: ${{ matrix.image }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
source setup.sh ${{ matrix.environment }}
rcfg desktop
rmake desktop
- name: Run tests
run: |
source setup.sh ${{ matrix.environment }}
rmake --test --all
build_esp32:
name: "Build suite esp32"
runs-on: ubuntu-20.04
strategy:
matrix:
environment: [Debug, Release]
container:
image: ghcr.io/paradise-fi/rofi.debian
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
source setup.sh -i ${{ matrix.environment }}
# Provide secrets
export ROFI_SSID="N/A"
export ROFI_WIFI_PASS=""
export ROFI_WLAN_USER=""
export RoFI_WLAN_PASS=""
# Configure and build
rcfg esp32
rmake esp32
build_stm32:
name: "Build suite stm32"
runs-on: ubuntu-20.04
strategy:
matrix:
environment: [Debug, Release]
container:
image: ghcr.io/paradise-fi/rofi.debian
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
source setup.sh ${{ matrix.environment }}
# Configure and build
rcfg stm32
rmake stm32
build_doc:
name: "Build documentation"
runs-on: ubuntu-20.04
container:
image: ghcr.io/paradise-fi/rofi.doc
defaults:
run:
shell: bash
steps:
# Work-around for https://github.com/actions/runner-images/issues/6775
- name: Change Owner of Container Working Directory
run: chown root:root .
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
source setup.sh Debug
rcfg doc
rmake doc
- name: Build other branches
if: github.ref == 'refs/heads/master'
run: |
echo ::group::Setting up repository for building all branches
source setup.sh Debug
# Fetch all branches
git fetch --all
git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | \
while read remote
do git branch --track "${remote#origin/}" "$remote" || true
done
git pull --all
echo ::endgroup::
releng/doc/buildAllBranches.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: build.Debug/doc/web
retention-days: 14
deploy:
name: "Deploy documentation"
runs-on: ubuntu-20.04
needs: build_doc
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout # Required for GH-pages deployment
uses: actions/checkout@v3
- name: "Download web"
uses: actions/download-artifact@v3
with:
name: documentation
path: documentation
- run: ls documentation
- name: Deploy to GH Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: documentation
single-commit: true