Skip to content

Commit 82c1142

Browse files
committed
Fixes conditions
1 parent 82d8ffa commit 82c1142

File tree

4 files changed

+111
-127
lines changed

4 files changed

+111
-127
lines changed

.github/workflows/ArduinoBuild_2.yml

Lines changed: 31 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,44 @@ name: ArduinoBuild(platform-version 2.x)
22

33
env:
44
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
5-
REQUIRED_LIBRARIES: M5Unified
6-
# M5UNITUNIFIED_BRANCH: main
7-
M5UNITUNIFIED_BRANCH: develop
5+
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified
86

97
on:
108
push:
9+
tags-ignore:
10+
- '*.*.*'
11+
branches:
12+
- '*'
1113
paths:
12-
- '**.ino'
13-
- '**.cpp'
14-
- '**.hpp'
15-
- '**.h'
16-
- '**.c'
14+
- 'src/unit/**.cpp'
15+
- 'src/unit/**.hpp'
16+
- 'src/unit/**.h'
17+
- 'src/unit/**.c'
18+
- 'test/**.cpp'
19+
- 'test/**.hpp'
20+
- 'test/**.h'
21+
- 'test/**.c'
22+
- 'examples/UnitUnified/**.ino'
23+
- 'examples/UnitUnified/**.cpp'
24+
- 'examples/UnitUnified/**.hpp'
25+
- 'examples/UnitUnified/**.h'
26+
- 'examples/UnitUnified/**.c'
1727
- '**ArduinoBuild_2.yml'
1828
pull_request:
1929
paths:
20-
- '**.ino'
21-
- '**.cpp'
22-
- '**.hpp'
23-
- '**.h'
24-
- '**.c'
30+
- 'src/unit/**.cpp'
31+
- 'src/unit/**.hpp'
32+
- 'src/unit/**.h'
33+
- 'src/unit/**.c'
34+
- 'test/**.cpp'
35+
- 'test/**.hpp'
36+
- 'test/**.h'
37+
- 'test/**.c'
38+
- 'examples/UnitUnified/**.ino'
39+
- 'examples/UnitUnified/**.cpp'
40+
- 'examples/UnitUnified/**.hpp'
41+
- 'examples/UnitUnified/**.h'
42+
- 'examples/UnitUnified/**.c'
2543
- '**ArduinoBuild_2.yml'
2644
workflow_dispatch:
2745

@@ -58,51 +76,11 @@ jobs:
5876
- esp32
5977

6078
steps:
61-
62-
- name: Running on GitHub Actions
63-
if: env.ACT != 'true'
64-
run: echo "This is running on GitHub Actions."
65-
66-
- name: Running locally with act
67-
if: env.ACT == 'true'
68-
run: echo "This is running locally with act."
69-
7079
- name: Checkout
7180
uses: actions/checkout@v4
7281
with:
7382
ref: ${{ github.event.pull_request.head.sha }}
7483

75-
# Checkout library from specific URL and branch
76-
# Note that dependent libraries are not automatically installed.
77-
78-
# - name: Configure git for authentication (Until each repository is published)
79-
# run: |
80-
# git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/"
81-
82-
- name: Checkout M5Utility
83-
uses: actions/checkout@v3
84-
with:
85-
repository: m5stack/M5Utility
86-
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
87-
path: CustomLibrary_M5Utility # must contain string "Custom"
88-
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo
89-
90-
- name: Checkout M5HAL
91-
uses: actions/checkout@v3
92-
with:
93-
repository: m5stack/M5HAL
94-
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
95-
path: CustomLibrary_M5HAL # must contain string "Custom"
96-
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo
97-
98-
- name: Checkout M5UnitUnified
99-
uses: actions/checkout@v3
100-
with:
101-
repository: m5stack/M5UnitUnified
102-
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
103-
path: CustomLibrary_M5UnitUnified
104-
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo
105-
10684
# Build
10785
- name: Compile examples
10886
uses: ArminJo/arduino-test-compile@master

.github/workflows/ArduinoBuild_3.yml

Lines changed: 31 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,44 @@ name: ArduinoBuild(platform-version 3.x)
22

33
env:
44
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
5-
REQUIRED_LIBRARIES: M5Unified
6-
# M5UNITUNIFIED_BRANCH: main
7-
M5UNITUNIFIED_BRANCH: develop
5+
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified
86

97
on:
108
push:
9+
tags-ignore:
10+
- '*.*.*'
11+
branches:
12+
- '*'
1113
paths:
12-
- '**.ino'
13-
- '**.cpp'
14-
- '**.hpp'
15-
- '**.h'
16-
- '**.c'
14+
- 'src/unit/**.cpp'
15+
- 'src/unit/**.hpp'
16+
- 'src/unit/**.h'
17+
- 'src/unit/**.c'
18+
- 'test/**.cpp'
19+
- 'test/**.hpp'
20+
- 'test/**.h'
21+
- 'test/**.c'
22+
- 'examples/UnitUnified/**.ino'
23+
- 'examples/UnitUnified/**.cpp'
24+
- 'examples/UnitUnified/**.hpp'
25+
- 'examples/UnitUnified/**.h'
26+
- 'examples/UnitUnified/**.c'
1727
- '**ArduinoBuild_3.yml'
1828
pull_request:
1929
paths:
20-
- '**.ino'
21-
- '**.cpp'
22-
- '**.hpp'
23-
- '**.h'
24-
- '**.c'
30+
- 'src/unit/**.cpp'
31+
- 'src/unit/**.hpp'
32+
- 'src/unit/**.h'
33+
- 'src/unit/**.c'
34+
- 'test/**.cpp'
35+
- 'test/**.hpp'
36+
- 'test/**.h'
37+
- 'test/**.c'
38+
- 'examples/UnitUnified/**.ino'
39+
- 'examples/UnitUnified/**.cpp'
40+
- 'examples/UnitUnified/**.hpp'
41+
- 'examples/UnitUnified/**.h'
42+
- 'examples/UnitUnified/**.c'
2543
- '**ArduinoBuild_3.yml'
2644
workflow_dispatch:
2745

@@ -64,51 +82,11 @@ jobs:
6482
- esp32
6583

6684
steps:
67-
68-
- name: Running on GitHub Actions
69-
if: env.ACT != 'true'
70-
run: echo "This is running on GitHub Actions."
71-
72-
- name: Running locally with act
73-
if: env.ACT == 'true'
74-
run: echo "This is running locally with act."
75-
7685
- name: Checkout
7786
uses: actions/checkout@v4
7887
with:
7988
ref: ${{ github.event.pull_request.head.sha }}
8089

81-
# Checkout library from specific URL and branch
82-
# Note that dependent libraries are not automatically installed.
83-
84-
# - name: Configure git for authentication (Until each repository is published)
85-
# run: |
86-
# git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/"
87-
88-
- name: Checkout M5Utility
89-
uses: actions/checkout@v3
90-
with:
91-
repository: m5stack/M5Utility
92-
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
93-
path: CustomLibrary_M5Utility # must contain string "Custom"
94-
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo
95-
96-
- name: Checkout M5HAL
97-
uses: actions/checkout@v3
98-
with:
99-
repository: m5stack/M5HAL
100-
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
101-
path: CustomLibrary_M5HAL # must contain string "Custom"
102-
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo
103-
104-
- name: Checkout M5UnitUnified
105-
uses: actions/checkout@v3
106-
with:
107-
repository: m5stack/M5UnitUnified
108-
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
109-
path: CustomLibrary_M5UnitUnified
110-
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo
111-
11290
# Build
11391
- name: Compile examples
11492
uses: ArminJo/arduino-test-compile@master

.github/workflows/PlatformioBuild.yml

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,43 @@ name: PlatformIOBuild
22

33
on:
44
push:
5+
tags-ignore:
6+
- '*.*.*'
7+
branches:
8+
- '*'
59
paths:
6-
- '**.ino'
7-
- '**.cpp'
8-
- '**.hpp'
9-
- '**.h'
10-
- '**.c'
11-
- '**PlatformioBuild.yml'
12-
- '**platformio.ini'
10+
- 'src/unit/**.cpp'
11+
- 'src/unit/**.hpp'
12+
- 'src/unit/**.h'
13+
- 'src/unit/**.c'
14+
- 'test/**.cpp'
15+
- 'test/**.hpp'
16+
- 'test/**.h'
17+
- 'test/**.c'
18+
- 'examples/UnitUnified/**.ino'
19+
- 'examples/UnitUnified/**.cpp'
20+
- 'examples/UnitUnified/**.hpp'
21+
- 'examples/UnitUnified/**.h'
22+
- 'examples/UnitUnified/**.c'
23+
- '**PlatformioBuild.yml'
24+
- '**platformio.ini'
1325
pull_request:
1426
paths:
15-
- '**.ino'
16-
- '**.cpp'
17-
- '**.hpp'
18-
- '**.h'
19-
- '**.c'
20-
- '**PlatformioBuild.yml'
21-
- '**platformio.ini'
27+
- 'src/unit/**.cpp'
28+
- 'src/unit/**.hpp'
29+
- 'src/unit/**.h'
30+
- 'src/unit/**.c'
31+
- 'test/**.cpp'
32+
- 'test/**.hpp'
33+
- 'test/**.h'
34+
- 'test/**.c'
35+
- 'examples/UnitUnified/**.ino'
36+
- 'examples/UnitUnified/**.cpp'
37+
- 'examples/UnitUnified/**.hpp'
38+
- 'examples/UnitUnified/**.h'
39+
- 'examples/UnitUnified/**.c'
40+
- '**PlatformioBuild.yml'
41+
- '**platformio.ini'
2242
workflow_dispatch:
2343

2444
jobs:
@@ -91,10 +111,6 @@ jobs:
91111
with:
92112
ref: ${{ github.event.pull_request.head.sha }}
93113

94-
- name: Configure git for authentication (Until each repository is published)
95-
run: |
96-
git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/"
97-
98114
- name: Build examples
99115
uses: karniv00l/platformio-run-action@v1
100116
with:

.github/workflows/clang-format-check.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,32 @@ env:
55

66
on:
77
push:
8+
tags-ignore:
9+
- '*.*.*'
10+
- 'v*.*.*'
11+
branches:
12+
- '*'
813
paths:
14+
- '*'
915
- '**.ino'
1016
- '**.cpp'
1117
- '**.hpp'
1218
- '**.h'
1319
- '**.c'
1420
- '**.inl'
1521
- '**clang-format-check.yml'
16-
pull_request:
22+
- '**.clang-format'
23+
pull_request:
24+
paths:
1725
- '**.ino'
1826
- '**.cpp'
1927
- '**.hpp'
2028
- '**.h'
2129
- '**.c'
2230
- '**.inl'
2331
- '**clang-format-check.yml'
32+
- '**.clang-format'
33+
workflow_dispatch:
2434

2535
jobs:
2636
formatting-check:
@@ -34,10 +44,12 @@ jobs:
3444
- check: 'src'
3545
- check: 'test'
3646
- check: 'examples'
37-
# exclude: '(Fonts)' # Exclude file paths containing "Fonts"
47+
# exclude: '(Fonts)' # Exclude file paths containing "Fonts"
48+
#- check: 'examples'
49+
# exclude: ''
3850

3951
steps:
40-
- name: Checkout # When pull_request is used, include it in the checkout https://zenn.dev/hkusu/articles/c731862051438b
52+
- name: Checkout
4153
uses: actions/checkout@v4
4254
with:
4355
ref: ${{ github.event.pull_request.head.sha }}

0 commit comments

Comments
 (0)