Skip to content

Commit

Permalink
split build process: build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
tmori committed Dec 27, 2023
1 parent 18afa29 commit c3b8ce0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build
name: Build

on:
on:
push:

jobs:
Expand All @@ -23,19 +23,11 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build hakoniwa-px4sim/drone_physics
run: |
cd drone_physics && make
- name: Install GTest on Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install -y libgtest-dev

- name: Install GTest on macOS
if: startsWith(matrix.os, 'macos')
run: brew install googletest

- name: hakoniwa-px4sim/hakoniwa
run: |
cd hakoniwa && bash build.bash
- name: Run Tests/hakoniwa
run: |
cd hakoniwa/cmake-build && test/hako-px4sim-test
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
workflow_run:
workflows: ["Build"]
types:
- completed

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install GTest on Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install -y libgtest-dev

- name: Install GTest on macOS
if: startsWith(matrix.os, 'macos')
run: brew install googletest

- name: Run Tests/drone_physics
run: |
cd drone_physics && make run_verbose_test
- name: Run Tests/hakoniwa
run: |
cd hakoniwa/cmake-build && test/hako-px4sim-test

0 comments on commit c3b8ce0

Please sign in to comment.