diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..2492eccce --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,62 @@ +name: CI + +on: [push, pull_request] + +jobs: + industrial_ci: + name: ${{ matrix.env.CI_NAME }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + env: + - {CI_NAME: Bionic-Build, + OS_NAME: ubuntu, + OS_CODE_NAME: bionic, + ROS_DISTRO: melodic, + ROS_REPO: main, + UPSTREAM_WORKSPACE: "github:swri-robotics/descartes_light#master github:Jmeyer1292/opw_kinematics#master github:ethz-adrl/ifopt#master", + TARGET_WORKSPACE: ". github:ros-industrial-consortium/tesseract#master", + ROSDEP_SKIP_KEYS: "bullet3 fcl", + DOCKER_IMAGE: "lharmstrong/tesseract:melodic", + PARALLEL_TESTS: false, + CCACHE_DIR: "/home/runner/work/trajopt_ros/trajopt_ros/Bionic-Build/.ccache", + UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release", + TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"} + - {CI_NAME: Focal-Build, + OS_NAME: ubuntu, + OS_CODE_NAME: focal, + ROS_DISTRO: noetic, + ROS_REPO: main, + UPSTREAM_WORKSPACE: "github:swri-robotics/descartes_light#master github:Jmeyer1292/opw_kinematics#master github:ethz-adrl/ifopt#master", + TARGET_WORKSPACE: ". github:ros-industrial-consortium/tesseract#master", + ROSDEP_SKIP_KEYS: "bullet3 descartes_opw descartes_samplers descartes_light opw_kinematics fcl ifopt", + DOCKER_IMAGE: "lharmstrong/tesseract:noetic", + PARALLEL_TESTS: false, + CCACHE_DIR: "/home/runner/work/trajopt_ros/trajopt_ros/Focal-Build/.ccache", + UPSTREAM_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Release", + TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"} + steps: + - uses: actions/checkout@v1 + - name: Free Disk Space + run: | + sudo swapoff -a + sudo rm -f /swapfile + sudo apt clean + docker rmi $(docker image ls -aq) + df -h + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + shell: cmake -P {0} + run: | + string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) + message("::set-output name=timestamp::${current_date}") + - name: ccache cache files + uses: actions/cache@v1.1.0 + with: + path: ${{ matrix.env.CI_NAME }}/.ccache + key: ${{ matrix.env.CI_NAME }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + restore-keys: | + ${{ matrix.env.CI_NAME }}-ccache- + - uses: "ros-industrial/industrial_ci@master" + env: ${{matrix.env}}