Skip to content

Commit

Permalink
Merge pull request #40 from Tobias-Fischer/patch-2
Browse files Browse the repository at this point in the history
Add RoboStack CI
  • Loading branch information
k-okada authored Oct 5, 2021
2 parents 5e9a6f7 + 3ad9559 commit 96e5232
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/ci_cross_platform_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: test
channels:
- robostack
- conda-forge
dependencies:
- compilers
- ninja
- cmake
- catkin_pkg
- pkg-config
- rosdep
- rosdistro
- ros-distro-mutex 0.1 noetic
- ros-noetic-catkin
- ros-noetic-ros-environment
101 changes: 101 additions & 0 deletions .github/workflows/cross_platform_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: OpenSLAM gmapping cross-platform RoboStack build

on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- "[kmn]*-devel"

jobs:
run_openslam_gmapping_compilation:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2

- name: Set up Build Dependencies
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: .github/ci_cross_platform_env.yml
micromamba-version: latest

- name: Set up OpenSLAM gmapping Dependencies on Unix
if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash -l -eo pipefail {0}
run: |
micromamba activate test
export PATH=$HOME/micromamba-bin:$PATH
rosdep init
rosdep update
rosdep install --from-paths . --ignore-src -r -y
- name: Build OpenSLAM gmapping on Unix
if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash -l -eo pipefail {0}
run: |
export CTEST_OUTPUT_ON_FAILURE=1
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=Release \
-DCATKIN_SKIP_TESTING=OFF \
-G "Ninja"
ninja
- name: Set up OpenSLAM gmapping on Windows
if: runner.os == 'Windows'
shell: cmd
run: |
echo "Activate environment, and use rosdep to install dependencies"
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate test
rosdep init
rosdep update
rosdep install --from-paths . --ignore-src -r -y
- name: Build OpenSLAM gmapping on Windows
if: runner.os == 'Windows'
shell: cmd
run: |
echo "Remove unnecessary / colliding things from PATH"
set "PATH=%PATH:C:\ProgramData\Chocolatey\bin;=%"
set "PATH=%PATH:C:\Program Files (x86)\sbt\bin;=%"
set "PATH=%PATH:C:\Rust\.cargo\bin;=%"
set "PATH=%PATH:C:\Program Files\Git\usr\bin;=%"
set "PATH=%PATH:C:\Program Files\Git\cmd;=%"
set "PATH=%PATH:C:\Program Files\Git\mingw64\bin;=%"
set "PATH=%PATH:C:\Program Files (x86)\Subversion\bin;=%"
set "PATH=%PATH:C:\Program Files\CMake\bin;=%"
set "PATH=%PATH:C:\Program Files\OpenSSL\bin;=%"
set "PATH=%PATH:C:\Strawberry\c\bin;=%"
set "PATH=%PATH:C:\Strawberry\perl\bin;=%"
set "PATH=%PATH:C:\Strawberry\perl\site\bin;=%"
set "PATH=%PATH:c:\tools\php;=%"
set "PATH=%PATH:ostedtoolcache=%"
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate test
mkdir build
cd build
SET "CTEST_OUTPUT_ON_FAILURE=1"
cmake .. -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" ^
-DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCATKIN_SKIP_TESTING=OFF ^
-DBoost_USE_STATIC_LIBS=OFF ^
-G "Ninja"
ninja

0 comments on commit 96e5232

Please sign in to comment.