Skip to content

Commit

Permalink
Fixes conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
GOB52 committed Oct 17, 2024
1 parent 82d8ffa commit 82c1142
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 127 deletions.
84 changes: 31 additions & 53 deletions .github/workflows/ArduinoBuild_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,44 @@ name: ArduinoBuild(platform-version 2.x)

env:
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
REQUIRED_LIBRARIES: M5Unified
# M5UNITUNIFIED_BRANCH: main
M5UNITUNIFIED_BRANCH: develop
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified

on:
push:
tags-ignore:
- '*.*.*'
branches:
- '*'
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- 'src/unit/**.cpp'
- 'src/unit/**.hpp'
- 'src/unit/**.h'
- 'src/unit/**.c'
- 'test/**.cpp'
- 'test/**.hpp'
- 'test/**.h'
- 'test/**.c'
- 'examples/UnitUnified/**.ino'
- 'examples/UnitUnified/**.cpp'
- 'examples/UnitUnified/**.hpp'
- 'examples/UnitUnified/**.h'
- 'examples/UnitUnified/**.c'
- '**ArduinoBuild_2.yml'
pull_request:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- 'src/unit/**.cpp'
- 'src/unit/**.hpp'
- 'src/unit/**.h'
- 'src/unit/**.c'
- 'test/**.cpp'
- 'test/**.hpp'
- 'test/**.h'
- 'test/**.c'
- 'examples/UnitUnified/**.ino'
- 'examples/UnitUnified/**.cpp'
- 'examples/UnitUnified/**.hpp'
- 'examples/UnitUnified/**.h'
- 'examples/UnitUnified/**.c'
- '**ArduinoBuild_2.yml'
workflow_dispatch:

Expand Down Expand Up @@ -58,51 +76,11 @@ jobs:
- esp32

steps:

- name: Running on GitHub Actions
if: env.ACT != 'true'
run: echo "This is running on GitHub Actions."

- name: Running locally with act
if: env.ACT == 'true'
run: echo "This is running locally with act."

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

# Checkout library from specific URL and branch
# Note that dependent libraries are not automatically installed.

# - name: Configure git for authentication (Until each repository is published)
# run: |
# git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/"

- name: Checkout M5Utility
uses: actions/checkout@v3
with:
repository: m5stack/M5Utility
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
path: CustomLibrary_M5Utility # must contain string "Custom"
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo

- name: Checkout M5HAL
uses: actions/checkout@v3
with:
repository: m5stack/M5HAL
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
path: CustomLibrary_M5HAL # must contain string "Custom"
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo

- name: Checkout M5UnitUnified
uses: actions/checkout@v3
with:
repository: m5stack/M5UnitUnified
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
path: CustomLibrary_M5UnitUnified
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo

# Build
- name: Compile examples
uses: ArminJo/arduino-test-compile@master
Expand Down
84 changes: 31 additions & 53 deletions .github/workflows/ArduinoBuild_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,44 @@ name: ArduinoBuild(platform-version 3.x)

env:
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
REQUIRED_LIBRARIES: M5Unified
# M5UNITUNIFIED_BRANCH: main
M5UNITUNIFIED_BRANCH: develop
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified

on:
push:
tags-ignore:
- '*.*.*'
branches:
- '*'
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- 'src/unit/**.cpp'
- 'src/unit/**.hpp'
- 'src/unit/**.h'
- 'src/unit/**.c'
- 'test/**.cpp'
- 'test/**.hpp'
- 'test/**.h'
- 'test/**.c'
- 'examples/UnitUnified/**.ino'
- 'examples/UnitUnified/**.cpp'
- 'examples/UnitUnified/**.hpp'
- 'examples/UnitUnified/**.h'
- 'examples/UnitUnified/**.c'
- '**ArduinoBuild_3.yml'
pull_request:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- 'src/unit/**.cpp'
- 'src/unit/**.hpp'
- 'src/unit/**.h'
- 'src/unit/**.c'
- 'test/**.cpp'
- 'test/**.hpp'
- 'test/**.h'
- 'test/**.c'
- 'examples/UnitUnified/**.ino'
- 'examples/UnitUnified/**.cpp'
- 'examples/UnitUnified/**.hpp'
- 'examples/UnitUnified/**.h'
- 'examples/UnitUnified/**.c'
- '**ArduinoBuild_3.yml'
workflow_dispatch:

Expand Down Expand Up @@ -64,51 +82,11 @@ jobs:
- esp32

steps:

- name: Running on GitHub Actions
if: env.ACT != 'true'
run: echo "This is running on GitHub Actions."

- name: Running locally with act
if: env.ACT == 'true'
run: echo "This is running locally with act."

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

# Checkout library from specific URL and branch
# Note that dependent libraries are not automatically installed.

# - name: Configure git for authentication (Until each repository is published)
# run: |
# git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/"

- name: Checkout M5Utility
uses: actions/checkout@v3
with:
repository: m5stack/M5Utility
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
path: CustomLibrary_M5Utility # must contain string "Custom"
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo

- name: Checkout M5HAL
uses: actions/checkout@v3
with:
repository: m5stack/M5HAL
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
path: CustomLibrary_M5HAL # must contain string "Custom"
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo

- name: Checkout M5UnitUnified
uses: actions/checkout@v3
with:
repository: m5stack/M5UnitUnified
ref: ${{ env.M5UNITUNIFIED_BRANCH }}
path: CustomLibrary_M5UnitUnified
token: ${{ secrets.TOKEN_M5UNITUNIFIED }} # Only required during development in private repo

# Build
- name: Compile examples
uses: ArminJo/arduino-test-compile@master
Expand Down
52 changes: 34 additions & 18 deletions .github/workflows/PlatformioBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,43 @@ name: PlatformIOBuild

on:
push:
tags-ignore:
- '*.*.*'
branches:
- '*'
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**PlatformioBuild.yml'
- '**platformio.ini'
- 'src/unit/**.cpp'
- 'src/unit/**.hpp'
- 'src/unit/**.h'
- 'src/unit/**.c'
- 'test/**.cpp'
- 'test/**.hpp'
- 'test/**.h'
- 'test/**.c'
- 'examples/UnitUnified/**.ino'
- 'examples/UnitUnified/**.cpp'
- 'examples/UnitUnified/**.hpp'
- 'examples/UnitUnified/**.h'
- 'examples/UnitUnified/**.c'
- '**PlatformioBuild.yml'
- '**platformio.ini'
pull_request:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**PlatformioBuild.yml'
- '**platformio.ini'
- 'src/unit/**.cpp'
- 'src/unit/**.hpp'
- 'src/unit/**.h'
- 'src/unit/**.c'
- 'test/**.cpp'
- 'test/**.hpp'
- 'test/**.h'
- 'test/**.c'
- 'examples/UnitUnified/**.ino'
- 'examples/UnitUnified/**.cpp'
- 'examples/UnitUnified/**.hpp'
- 'examples/UnitUnified/**.h'
- 'examples/UnitUnified/**.c'
- '**PlatformioBuild.yml'
- '**platformio.ini'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -91,10 +111,6 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Configure git for authentication (Until each repository is published)
run: |
git config --global url."https://${{ secrets.TOKEN_M5UNITUNIFIED }}@github.com/".insteadOf "https://github.com/"
- name: Build examples
uses: karniv00l/platformio-run-action@v1
with:
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,32 @@ env:

on:
push:
tags-ignore:
- '*.*.*'
- 'v*.*.*'
branches:
- '*'
paths:
- '*'
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**.inl'
- '**clang-format-check.yml'
pull_request:
- '**.clang-format'
pull_request:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**.inl'
- '**clang-format-check.yml'
- '**.clang-format'
workflow_dispatch:

jobs:
formatting-check:
Expand All @@ -34,10 +44,12 @@ jobs:
- check: 'src'
- check: 'test'
- check: 'examples'
# exclude: '(Fonts)' # Exclude file paths containing "Fonts"
# exclude: '(Fonts)' # Exclude file paths containing "Fonts"
#- check: 'examples'
# exclude: ''

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

0 comments on commit 82c1142

Please sign in to comment.