Skip to content

Commit 01fc903

Browse files
committed
add workflow to run build integrity tests
1 parent 8955762 commit 01fc903

2 files changed

Lines changed: 88 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: MIT
2+
# SPDX-FileCopyrightText: "2025 smdn <smdn@smdn.jp>"
3+
#
4+
# ref: https://docs.github.com/code-security/dependabot/working-with-dependabot/dependabot-options-reference
5+
#
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
day: "wednesday"
13+
time: "03:19"
14+
timezone: "Asia/Tokyo"
15+
ignore:
16+
- dependency-name: "actions/checkout"
17+
update-types:
18+
["version-update:semver-minor", "version-update:semver-patch"]
19+
- dependency-name: "actions/setup-python"
20+
update-types: ["version-update:semver-minor"]

.github/workflows/test-build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: MIT
2+
# SPDX-FileCopyrightText: "2025 smdn <smdn@smdn.jp>"
3+
4+
name: Run build integrity tests
5+
6+
permissions:
7+
contents: read
8+
9+
on:
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- 'src/**/*.h'
14+
- 'src/**/*.hpp'
15+
- 'tests/test-build/**/*.cpp'
16+
17+
pull_request:
18+
branches: [ main ]
19+
paths:
20+
- 'src/**/*.h'
21+
- 'src/**/*.hpp'
22+
- 'tests/test-build/**/*.cpp'
23+
24+
workflow_dispatch:
25+
inputs:
26+
verbose:
27+
description: "If true, enables verbose output."
28+
required: false
29+
type: boolean
30+
default: false
31+
32+
jobs:
33+
test-build:
34+
name: Perform tests of the build integrity
35+
runs-on: ubuntu-latest
36+
timeout-minutes: 5
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4.2.2
41+
with:
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
fetch-depth: 1
44+
45+
- name: Setup caches
46+
uses: actions/cache@v4.2.0
47+
with:
48+
path: |
49+
~/.cache/pip
50+
~/.platformio/.cache
51+
key: ${{ runner.os }}-pio
52+
53+
- name: Install python
54+
uses: actions/setup-python@v5.4.0
55+
with:
56+
python-version: '3.11'
57+
58+
- name: Install PlatformIO Core
59+
run: |
60+
# ref: https://docs.platformio.org/en/stable/integration/ci/github-actions.html#using-cmd-run-command
61+
pip install --upgrade platformio
62+
63+
- name: Build PlatformIO Project
64+
shell: pwsh
65+
run: |
66+
$verbose = '${{ inputs.verbose }}' -ieq 'true'
67+
68+
pio run

0 commit comments

Comments
 (0)