Adding linux support for simulators #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run CI tests | |
on: | |
push: | |
pull_request: | |
branches: [ "main" ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
tests: | |
name: Executing ${{ matrix.test_name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
test_name: | |
- simple_transport_test | |
- hon_test | |
- smartair2_test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/test/${{ matrix.test_name }}/bin -S ${{github.workspace}}/test/${{ matrix.test_name }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build CMake | |
run: cmake --build ${{github.workspace}}/test/${{ matrix.test_name }}/bin --config ${{env.BUILD_TYPE}} | |
- name: Run test | |
working-directory: ${{github.workspace}}/test/${{ matrix.test_name }}/bin | |
run: ./${{ matrix.test_name }} | |
tools_windows: | |
name: Building ${{ matrix.project_name }} in Windows | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
project_name: | |
- remote_serial_bridge | |
- smartair2_simulator | |
- hon_simulator | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup MSVC | |
uses: ilammy/[email protected] | |
with: | |
vsversion: 2022 | |
arch: amd64 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/tools/${{ matrix.project_name }}/bin -S ${{github.workspace}}/tools/${{ matrix.project_name }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "Visual Studio 17 2022" | |
- name: Build CMake | |
run: cmake --build ${{github.workspace}}/tools/${{ matrix.project_name }}/bin --config ${{env.BUILD_TYPE}} | |
tools_ubuntu: | |
name: Building ${{ matrix.project_name }} in Ubuntu | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
project_name: | |
- smartair2_simulator | |
- hon_simulator | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/tools/${{ matrix.project_name }}/bin -S ${{github.workspace}}/tools/${{ matrix.project_name }} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build CMake | |
run: cmake --build ${{github.workspace}}/tools/${{ matrix.project_name }}/bin --config ${{env.BUILD_TYPE}} | |
lib: | |
name: Building library | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure CMake | |
run: cmake -B ${{github.workspace}}/bin -S ${{github.workspace}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build CMake | |
run: cmake --build ${{github.workspace}}/bin --config ${{env.BUILD_TYPE}} | |