Feature add new hardware #289
Workflow file for this run
This file contains hidden or 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: C++ Build & Test | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y libgtest-dev libeigen3-dev libi2c-dev cmake | |
| sudo apt install -y libopencv-dev | |
| - name: Install WiringPi from source | |
| run: | | |
| sudo apt update | |
| sudo apt install -y build-essential unzip | |
| wget https://github.com/WiringPi/WiringPi/archive/master.zip | |
| unzip master.zip | |
| rm master.zip | |
| cd WiringPi-master/wiringPi | |
| make | |
| sudo make install | |
| - name: Install PCA9685 from source | |
| run: | | |
| sudo apt update | |
| sudo apt install -y build-essential unzip | |
| wget https://github.com/barulicm/PiPCA9685/archive/master.zip | |
| unzip master.zip | |
| cd PiPCA9685-main | |
| xargs -a apt_dependencies.txt sudo apt-get install -y | |
| sudo cmake --workflow --preset install | |
| - name: Build Debug Mode | |
| run: | | |
| cmake -DCMAKE_BUILD_TYPE=Debug -B build-debug . | |
| cmake --build build-debug | |
| - name: Run Debug Binary for 10 seconds | |
| run: | | |
| timeout 10s ./build-debug/Ferda < /dev/null || echo "Exited after timeout" | |
| - name: Build Release Mode | |
| run: | | |
| cmake -DCMAKE_BUILD_TYPE=Release -B build-release . | |
| cmake --build build-release | |
| - name: Build Simulation Mode | |
| run: | | |
| cmake -DCMAKE_BUILD_TYPE=Simulation -DSIM_LOCAL_PORT=8002 -DSIM_SERVER_PORT=8003 -DSIM_SERVER_IP="127.0.0.1" -B build-sim . | |
| cmake --build build-sim |