Skip to content

Commit 4b16c78

Browse files
committed
add: github actionsのためのファイル追加
1 parent 15e7134 commit 4b16c78

File tree

3 files changed

+61
-0
lines changed

3 files changed

+61
-0
lines changed

.github/workflows/build-check.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build Check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v3
11+
12+
- name: Set up Docker Buildx
13+
uses: docker/setup-buildx-action@v2
14+
15+
- name: Build Docker image
16+
run: docker buildx build --platform linux/arm64 -t myimage:arm64 .
17+
18+
- name: Run build in container
19+
run: |
20+
docker run --rm -v $(pwd):/RasPike-ART/sdk/workspace/etrobocon2025 myimage:arm64 \
21+
bash -c "cd /RasPike-ART/sdk/workspace/etrobocon2025 && make build"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Format Check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
format-check:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Install clang-format
14+
run: sudo apt-get update && sudo apt-get install -y clang-format
15+
16+
- name: Run clang-format check
17+
run: |
18+
find ./tests ./modules -type f \( -name "*.cpp" -o -name "*.h" \) \
19+
| xargs clang-format --dry-run --Werror

.github/workflows/test.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Run Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v3
11+
12+
- name: Set up Docker Buildx
13+
uses: docker/setup-buildx-action@v2
14+
15+
- name: Build Docker image
16+
run: docker buildx build --platform linux/arm64 -t myimage:arm64 .
17+
18+
- name: Run tests in container
19+
run: |
20+
docker run --rm -v $(pwd):/RasPike-ART/sdk/workspace/etrobocon2025 myimage:arm64 \
21+
bash -c "cd /RasPike-ART/sdk/workspace/etrobocon2025 && make test"

0 commit comments

Comments
 (0)