Skip to content

Commit af22983

Browse files
authored
chore(dev): revise CI (#259)
corresponds to nRF24/.github/#23 * use LF everywhere * use doxygen v1.15.0
1 parent d1e5ceb commit af22983

File tree

12 files changed

+308
-191
lines changed

12 files changed

+308
-191
lines changed

.gitattributes

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.py text eol=lf
7+
*.rst text eol=lf
8+
*.sh text eol=lf
9+
*.h text eol=lf
10+
*.cpp text eol=lf
11+
*.c text eol=lf
12+
.yaml text eol=lf
13+
*.yml text eol=lf
14+
*.md text eol=lf
15+
*.txt text eol=lf
16+
*.json text eol=lf
17+
*.properties text eol=lf
18+
LICENSE text eol=lf
19+
nurfile text eol=lf
20+
.gitignore text eol=lf
21+
.gitattributes text eol=lf
22+
.clang-format text eol=lf
23+
.clang-tidy text eol=lf
24+
Makefile text eol=lf
25+
*.svg text eol=lf
26+
*.ino text eol=lf
27+
*.dot text eol=lf
28+
*.cmake text eol=lf
29+
*.css text eol=lf
30+
Doxyfile text eol=lf

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ updates:
1111
directory: "/"
1212
schedule:
1313
interval: "weekly"
14+
cooldown:
15+
default-days: 5
16+
groups:
17+
actions:
18+
patterns:
19+
- "*"

.github/doxygen.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Running this locally will alter the Doxyfile.
55
Such changes SHOULD NOT be pushed to the remote.
66
"""
7+
78
from pathlib import Path
89
import json
910

@@ -17,9 +18,12 @@ def overwrite_doxygen_value():
1718
properties = json.loads(PROPERTIES.read_text(encoding="utf-8"))
1819
assert "version" in properties
1920
config = CONFIG.read_text(encoding="utf-8")
20-
TMP.write_text("PROJECT_NUMBER = {}\n".format(properties["version"]), encoding="utf-8")
21+
TMP.write_text(
22+
"PROJECT_NUMBER = {}\n".format(properties["version"]), encoding="utf-8"
23+
)
2124
config += f"\n@INCLUDE = {str(TMP)}\n"
2225
CONFIG.write_text(config, encoding="utf-8")
2326

27+
2428
if __name__ == "__main__":
2529
overwrite_doxygen_value()
Lines changed: 107 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,107 @@
1-
name: Arduino CLI build
2-
3-
on:
4-
pull_request:
5-
branches: [master, v1.x]
6-
paths:
7-
- ".github/workflows/build_arduino.yml"
8-
- "examples/**"
9-
10-
push:
11-
branches: [master, v1.x]
12-
paths:
13-
- ".github/workflows/build_arduino.yml"
14-
- "examples/**"
15-
16-
jobs:
17-
build:
18-
uses: nRF24/.github/.github/workflows/build_arduino.yaml@main
19-
with:
20-
sketch-paths: |
21-
- examples/helloworld_rx
22-
- examples/helloworld_rx_advanced
23-
- examples/helloworld_tx_advanced
24-
- examples/helloworld_tx
25-
- examples/Network_Priority_RX
26-
- examples/Network_Priority_TX
27-
# - examples/Network_Ping
28-
# - examples/Network_Ping_Sleep
29-
libraries: |
30-
- source-url: https://github.com/nRF24/RF24.git
31-
- source-path: ./
32-
- name: nrf_to_nrf
33-
fqbn: ${{ matrix.fqbn }}
34-
enable-deltas-report: ${{ matrix.enable-deltas-report }}
35-
platforms: |
36-
- name: arduino:avr
37-
- name: arduino:megaavr
38-
- name: arduino:samd
39-
- name: arduino:mbed
40-
# - name: arduino:sam
41-
strategy:
42-
fail-fast: false
43-
matrix:
44-
fqbn:
45-
- "arduino:avr:yun"
46-
- "arduino:avr:uno"
47-
- "arduino:avr:diecimila"
48-
- "arduino:avr:mega"
49-
- "arduino:avr:megaADK"
50-
- "arduino:avr:leonardo"
51-
- "arduino:avr:micro"
52-
- "arduino:avr:esplora"
53-
- "arduino:avr:mini"
54-
- "arduino:avr:ethernet"
55-
- "arduino:avr:fio"
56-
- "arduino:avr:bt"
57-
# - "arduino:avr:LilyPad" # board not found
58-
- "arduino:avr:LilyPadUSB"
59-
- "arduino:avr:pro"
60-
- "arduino:avr:atmegang"
61-
- "arduino:avr:robotControl"
62-
# - "arduino:avr:gemma" # does not support SPI
63-
- "arduino:avr:circuitplay32u4cat"
64-
- "arduino:avr:yunmini"
65-
- "arduino:avr:chiwawa"
66-
- "arduino:avr:one"
67-
- "arduino:avr:unowifi"
68-
- "arduino:mbed:nano33ble"
69-
- "arduino:samd:mkr1000"
70-
- "arduino:samd:mkrwifi1010"
71-
- "arduino:samd:nano_33_iot"
72-
- "arduino:samd:mkrfox1200"
73-
- "arduino:samd:mkrwan1300"
74-
- "arduino:samd:mkrwan1310"
75-
- "arduino:samd:mkrgsm1400"
76-
- "arduino:samd:mkrnb1500"
77-
- "arduino:samd:mkrvidor4000"
78-
- "arduino:samd:adafruit_circuitplayground_m0"
79-
- "arduino:samd:mzero_pro_bl"
80-
- "arduino:samd:mzero_bl"
81-
- "arduino:samd:tian"
82-
- "arduino:megaavr:uno2018"
83-
# - "arduino:megaavr:nano4809" # board not found
84-
# By default, don't generate size deltas data.
85-
enable-deltas-report:
86-
- false
87-
# Generate size deltas data for this board
88-
include:
89-
- fqbn: arduino:avr:nano
90-
enable-deltas-report: true
91-
- fqbn: arduino:samd:mkrzero
92-
enable-deltas-report: true
93-
94-
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report
95-
report:
96-
needs: [build]
97-
if: github.event_name == 'pull_request'
98-
uses: nRF24/.github/.github/workflows/arduino_size_deltas.yaml@main
1+
name: Arduino
2+
3+
on:
4+
pull_request:
5+
branches: [master, v1.x]
6+
paths:
7+
- ".github/workflows/build_arduino.yml"
8+
- "examples/**"
9+
10+
push:
11+
branches: [master, v1.x]
12+
paths:
13+
- ".github/workflows/build_arduino.yml"
14+
- "examples/**"
15+
16+
permissions: {}
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
21+
22+
jobs:
23+
build:
24+
uses: nRF24/.github/.github/workflows/build_arduino.yaml@main
25+
with:
26+
sketch-paths: |
27+
- examples/helloworld_rx
28+
- examples/helloworld_rx_advanced
29+
- examples/helloworld_tx_advanced
30+
- examples/helloworld_tx
31+
- examples/Network_Priority_RX
32+
- examples/Network_Priority_TX
33+
# - examples/Network_Ping
34+
# - examples/Network_Ping_Sleep
35+
libraries: |
36+
- source-url: https://github.com/nRF24/RF24.git
37+
- source-path: ./
38+
- name: nrf_to_nrf
39+
fqbn: ${{ matrix.fqbn }}
40+
enable-deltas-report: ${{ matrix.enable-deltas-report }}
41+
platforms: |
42+
- name: arduino:avr
43+
- name: arduino:megaavr
44+
- name: arduino:samd
45+
- name: arduino:mbed
46+
# - name: arduino:sam
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
fqbn:
51+
- "arduino:avr:yun"
52+
- "arduino:avr:uno"
53+
- "arduino:avr:diecimila"
54+
- "arduino:avr:mega"
55+
- "arduino:avr:megaADK"
56+
- "arduino:avr:leonardo"
57+
- "arduino:avr:micro"
58+
- "arduino:avr:esplora"
59+
- "arduino:avr:mini"
60+
- "arduino:avr:ethernet"
61+
- "arduino:avr:fio"
62+
- "arduino:avr:bt"
63+
# - "arduino:avr:LilyPad" # board not found
64+
- "arduino:avr:LilyPadUSB"
65+
- "arduino:avr:pro"
66+
- "arduino:avr:atmegang"
67+
- "arduino:avr:robotControl"
68+
# - "arduino:avr:gemma" # does not support SPI
69+
- "arduino:avr:circuitplay32u4cat"
70+
- "arduino:avr:yunmini"
71+
- "arduino:avr:chiwawa"
72+
- "arduino:avr:one"
73+
- "arduino:avr:unowifi"
74+
- "arduino:mbed:nano33ble"
75+
- "arduino:samd:mkr1000"
76+
- "arduino:samd:mkrwifi1010"
77+
- "arduino:samd:nano_33_iot"
78+
- "arduino:samd:mkrfox1200"
79+
- "arduino:samd:mkrwan1300"
80+
- "arduino:samd:mkrwan1310"
81+
- "arduino:samd:mkrgsm1400"
82+
- "arduino:samd:mkrnb1500"
83+
- "arduino:samd:mkrvidor4000"
84+
- "arduino:samd:adafruit_circuitplayground_m0"
85+
- "arduino:samd:mzero_pro_bl"
86+
- "arduino:samd:mzero_bl"
87+
- "arduino:samd:tian"
88+
- "arduino:megaavr:uno2018"
89+
# - "arduino:megaavr:nano4809" # board not found
90+
# By default, don't generate size deltas data.
91+
enable-deltas-report:
92+
- false
93+
# Generate size deltas data for this board
94+
include:
95+
- fqbn: arduino:avr:nano
96+
enable-deltas-report: true
97+
- fqbn: arduino:samd:mkrzero
98+
enable-deltas-report: true
99+
100+
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report
101+
report:
102+
needs: [build]
103+
permissions:
104+
# needed to post/update comment on PR threads
105+
pull-requests: write
106+
if: github.event_name == 'pull_request'
107+
uses: nRF24/.github/.github/workflows/arduino_size_deltas.yaml@main

.github/workflows/build_linux.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Linux build
1+
name: Linux
22

33
on:
44
pull_request:
@@ -27,18 +27,22 @@ on:
2727
- "**pyRF24Network/setup.py"
2828
- "**pyRF24Network/*.cpp"
2929
- ".github/workflows/linux_build.yml"
30-
release:
31-
types: [created]
30+
tags: ["*"]
31+
32+
permissions: {}
33+
34+
concurrency:
35+
group: ${{ github.workflow }}-${{ github.ref }}
36+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
3237

3338
jobs:
34-
using_cmake:
39+
build:
3540
uses: nRF24/.github/.github/workflows/build_linux_cmake.yaml@main
3641
with:
3742
rf24network-ref: ${{ github.sha }}
3843
compiler: ${{ matrix.toolchain.compiler }}
3944
usr-dir: ${{ matrix.toolchain.usr_dir }}
4045
examples-path: examples_RPi
41-
deploy-release: ${{ github.event_name == 'release' && (matrix.toolchain.compiler == 'armhf' || matrix.toolchain.compiler == 'arm64') }}
4246
py-wrapper-path: RPi/pyRF24Network
4347
strategy:
4448
fail-fast: false
@@ -54,3 +58,13 @@ jobs:
5458
# usr_dir: "i686-linux-gnu"
5559
- compiler: "default" # github runner is hosted on a "amd64"
5660
usr_dir: "local"
61+
62+
deploy:
63+
name: deploy release assets
64+
needs: [build]
65+
permissions:
66+
# needed for uploading release assets
67+
contents: write
68+
if: startsWith(github.ref, 'refs/tags/')
69+
uses: nRF24/.github/.github/workflows/deploy_cpack_artifacts.yaml@main
70+
secrets: inherit
Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1-
name: nRF52840 build
2-
3-
on:
4-
pull_request:
5-
branches: [master]
6-
push:
7-
branches: [master]
8-
9-
jobs:
10-
build:
11-
uses: nRF24/.github/.github/workflows/build_platformio.yaml@main
12-
with:
13-
example-path: ${{ matrix.example }}
14-
board-id: ${{ matrix.board }}
15-
lib-deps: -l https://github.com/TMRh20/nrf_to_nrf.git
16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
example:
20-
- "examples/nrf_to_nrf/helloworld_rx/helloworld_rx.ino"
21-
- "examples/nrf_to_nrf/helloworld_tx/helloworld_tx.ino"
22-
- "examples/nrf_to_nrf/helloworld_rxEncryption/helloworld_rxEncryption.ino"
23-
- "examples/nrf_to_nrf/helloworld_txEncryption/helloworld_txEncryption.ino"
24-
board:
25-
- "adafruit_feather_nrf52840"
1+
name: nRF52840
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
push:
7+
branches: [master]
8+
9+
permissions: {}
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
14+
15+
jobs:
16+
build:
17+
uses: nRF24/.github/.github/workflows/build_platformio.yaml@main
18+
with:
19+
example-path: ${{ matrix.example }}
20+
board-id: ${{ matrix.board }}
21+
lib-deps: -l https://github.com/TMRh20/nrf_to_nrf.git
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
example:
26+
- "examples/nrf_to_nrf/helloworld_rx/helloworld_rx.ino"
27+
- "examples/nrf_to_nrf/helloworld_tx/helloworld_tx.ino"
28+
- "examples/nrf_to_nrf/helloworld_rxEncryption/helloworld_rxEncryption.ino"
29+
- "examples/nrf_to_nrf/helloworld_txEncryption/helloworld_txEncryption.ino"
30+
board:
31+
- "adafruit_feather_nrf52840"

0 commit comments

Comments
 (0)