Skip to content

[arduino_lib] fix format check (#33) #19

[arduino_lib] fix format check (#33)

[arduino_lib] fix format check (#33) #19

name: Cakin Build and PlatformIO Build Workflow
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
target_project:
- enr_dps310_interface
- enr_message_board
- enr_stickv2_interface
- m5atoms3_sesami_client
- m5atoms3_switchbot_client
- sample_aes_cmac
- sample_esp_now_broadcaster
- sample_esp_now_receiver
- sample_sesami
- sample_uwb
- sdp_debug_board
- sdp_elevator_status_broadcaster
- sdp_example
- sdp_landmark_information
- sdp_sesami_host
- sdp_stickv2_interface
- sdp_switchbot_light
- sdp_switchbot_lock
- smart_device_protocol_interface
env:
CATKIN_WS: /home/runner/work/catkin_ws
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }}-${{ hashFiles('${GITHUB_WORKSPACE}/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }}-${{ hashFiles('${GITHUB_WORKSPACE}/requirements.txt') }}
- name: Cache apt
uses: actions/cache@v2
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }}
restore-keys: ${{ runner.os }}-apt-${{ hashFiles('${GITHUB_WORKSPACE}/package.xml') }}
- name: Cache PlatformIO global ${{ matrix.target_project }}
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-platformio-global-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }}
restore-keys: ${{ runner.os }}-platformio-global-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }}
- name: Cache PlatformIO local ${{ matrix.target_project }}
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/sketchbooks/${{ matrix.target_project }}/.pio
key: ${{ runner.os }}-platformio-local-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }}
restore-keys: ${{ runner.os }}-platformio-local-${{ matrix.target_project }}-${{ hashFiles('${GITHUB_WORKSPACE}/sketchbooks/${{ matrix.target_project }}/platformio.ini') }}
- name: Setup ROS
uses: ros-tooling/setup-ros@v0.2
with:
required-ros-distributions: noetic
- name: Install catkin tool
run: sudo apt-get install python3-catkin-tools
- name: Update pip and install pip package
run: |
pip3 install pip --upgrade
pip3 install pyopenssl --upgrade
pip3 install platformio==6.1.11
pip3 uninstall em
pip3 install empy==3.3.4
- name: Init workspace
run: |
source /opt/ros/noetic/setup.bash
mkdir -p ${CATKIN_WS}/src
ln -s ${{ github.workspace }} ${CATKIN_WS}/src/
- name: pre build
run: |
source /opt/ros/noetic/setup.bash
rosdep update
rosdep install -i -y --from-paths ./
- name: catkin build
run: |
source /opt/ros/noetic/setup.bash
cd ${CATKIN_WS}
catkin build
- name: Update ros_lib
run: |
source ${CATKIN_WS}/devel/setup.bash
rm -rf ${{ github.workspace }}/ros_lib
rosrun rosserial_arduino make_libraries.py ${{ github.workspace }}/ros_lib
- name: build sketch ${{ matrix.target_project }}
run: |
pio run -d ${{ github.workspace }}/sketchbooks/${{ matrix.target_project }}