Add docker build badge #98
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
# Created by referencing https://oceanai.mit.edu/ivpman/pmwiki/pmwiki.php?n=Lab.ClassSetup#sec_course_software | |
name: C++ Build | |
on: | |
push: | |
branches: [ main, actions ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
env: | |
BUILD_TYPE: Release | |
DEBUG_OUTPUT: false | |
jobs: | |
linux-build: | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install MOOS-IvP Dependencies | |
run: sudo apt-get update && sudo apt-get install -y subversion g++ cmake xterm libfltk1.3-dev freeglut3-dev libpng-dev libjpeg-dev libxft-dev libxinerama-dev libtiff5-dev | |
- name: Build MOOS-IvP | |
uses: ./.github/actions/build-moos-ivp | |
with: | |
caching: 'true' | |
os: ${{ matrix.os }} | |
- name: Debug path | |
if: env.DEBUG_OUTPUT == 'true' | |
run: | | |
echo "Path $PATH Github Path $GITHUB_PATH" | |
echo "$(env)" | |
echo "$(ls moos-ivp)" | |
echo "$(ls -la)" | |
echo "${{github.workspace}}" | |
echo "$(ls -la ~)" | |
# python3.7-distutils need because of ubuntu-20 bug see here: https://askubuntu.com/a/1296996/1064456 | |
- name: Install moos-ivp-agent dependencies | |
run: | | |
sudo add-apt-repository ppa:deadsnakes/ppa | |
sudo apt update | |
sudo apt-get install -y python3.7-dev python3.7-distutils | |
- name: Update pip version | |
run: python3.7 -m pip install --upgrade pip | |
- name: Install mivp_agent pip package | |
run: cd src/python_module && python3.7 -m pip install . | |
- name: Build moos-ivp-agent | |
uses: ./.github/actions/build-cpp | |
- name: Add MOOS-IvP bin to path | |
run: echo "${{github.workspace}}/moos-ivp/bin" >> $GITHUB_PATH | |
- name: Add MOOS-IvP scripts to path | |
run: echo "${{github.workspace}}/moos-ivp/scripts" >> $GITHUB_PATH | |
osx-build: | |
strategy: | |
matrix: | |
# os: [macos-14, macos-13, macos-12] | |
os: [macos-13, macos-12] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install MOOS-IvP Dependencies | |
run: brew install cmake subversion wget libtiff fltk | |
- name: Build moos-ivp | |
uses: ./.github/actions/build-moos-ivp | |
with: | |
caching: 'true' | |
os: ${{ matrix.os }} | |
- name: Debug path | |
if: env.DEBUG_OUTPUT == 'true' | |
run: | | |
echo "Path $PATH Github Path $GITHUB_PATH" | |
echo "$(env)" | |
echo "$(ls moos-ivp)" | |
echo "$(ls -la)" | |
echo "${{github.workspace}}" | |
echo "$(ls -la ~)" | |
- name: Install moos-ivp-agent dependencies | |
run: | | |
brew update | |
brew install [email protected] | |
- name: Add brew python to path | |
run: echo "/usr/local/opt/[email protected]/bin" >> $GITHUB_PATH | |
- name: Install mivp_agent pip package | |
run: cd src/python_module && python3.7 -m pip install . | |
- name: Build moos-ivp-agent | |
uses: ./.github/actions/build-cpp | |
- name: Add MOOS-IvP bin to path | |
run: echo "${{github.workspace}}/moos-ivp/bin" >> $GITHUB_PATH | |
- name: Add MOOS-IvP scripts to path | |
run: echo "${{github.workspace}}/moos-ivp/scripts" >> $GITHUB_PATH |