Skip to content

Commit 989b5e5

Browse files
authored
✨ Enable dir in docs.yml & lint.yml (#92)
* ✨ Enable `dir` in docs.yml & lint.yml * 🐛 Fix dir in self check
1 parent 18c41bf commit 989b5e5

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,20 @@ jobs:
5252
repository: ${{ inputs.repo }}
5353

5454
- name: 🌐 Downloading doxygen from ci
55+
working-directory: ${{ inputs.dir }}
5556
run: wget https://raw.githubusercontent.com/libhal/ci/main/doxygen.conf -O doxygen.conf
5657

5758
- name: 📖 Run Doxygen
5859
id: doxygen
5960
uses: mattnotmitt/doxygen-action@v1.12.0
6061
if: always()
6162
with:
63+
working-directory: ${{ inputs.dir }}
6264
doxyfile-path: "doxygen.conf"
6365

6466
# Conditionally read out any doxygen warnings only if `doxygen_check`
6567
# step failed.
6668
- name: ⚠️ Read out any doxygen warnings
6769
if: ${{ failure() && steps.doxygen.conclusion == 'failure' }}
70+
working-directory: ${{ inputs.dir }}
6871
run: cat doxygen_warn.log ; exit 1

.github/workflows/lint.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,36 +52,37 @@ jobs:
5252
repository: ${{ inputs.repo }}
5353

5454
- name: 🌐 Downloading .clang-format from libhal
55+
working-directory: ${{ inputs.dir }}
5556
run: wget https://raw.githubusercontent.com/libhal/libhal/main/.clang-format -O .clang-format
5657

5758
- name: 🧹 Format Check `include/` directory
5859
uses: jidicula/clang-format-action@v4.11.0
5960
if: always()
6061
with:
6162
clang-format-version: "18"
62-
check-path: ./include
63+
check-path: ${{ inputs.dir }}/include
6364
exclude-regex: ".*/third_party/.*"
6465

6566
- name: 🧹 Format Check `src/` directory
6667
uses: jidicula/clang-format-action@v4.11.0
6768
if: ${{ hashFiles(inputs.source_dir) != '' }}
6869
with:
6970
clang-format-version: "18"
70-
check-path: ${{ inputs.source_dir }}
71+
check-path: ${{ inputs.dir }}/${{ inputs.source_dir }}
7172
exclude-regex: ".*/third_party/.*"
7273

7374
- name: 🧹 Format Check `demos/` directory
7475
uses: jidicula/clang-format-action@v4.11.0
7576
if: ${{ hashFiles('./demos/') != '' }}
7677
with:
7778
clang-format-version: "18"
78-
check-path: ./demos/
79+
check-path: ${{ inputs.dir }}/demos
7980
exclude-regex: ".*/third_party/.*"
8081

8182
- name: 🧹 Format Check `test/` code
8283
uses: jidicula/clang-format-action@v4.11.0
8384
if: always()
8485
with:
8586
clang-format-version: "18"
86-
check-path: ./tests
87+
check-path: ${{ inputs.dir }}/tests
8788
exclude-regex: ".*/third_party/.*"

.github/workflows/self_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
with:
9393
library: libhal-micromod
9494
source_dir: src
95-
dir: src
95+
dir: .
9696
repo: libhal/libhal-micromod
9797
secrets: inherit
9898

@@ -101,7 +101,7 @@ jobs:
101101
with:
102102
library: libhal-micromod
103103
source_dir: src
104-
dir: src
104+
dir: .
105105
repo: libhal/libhal-micromod
106106
secrets: inherit
107107

0 commit comments

Comments
 (0)