Fix again error in formula #194
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
# build docker files with the gsplines installed | |
name: compilation | |
on: push | |
jobs: | |
deploy: | |
name: build image | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
docker_image: | |
- image_name: "rafa606/ros-gsplines-vim-dev:noetic" | |
base_image: "rafa606/ros-vim:noetic" | |
ros_distro: "noetic" | |
- image_name: "rafa606/moveit-gsplines-vim-dev:noetic" | |
base_image: "rafa606/moveit-vim:noetic" | |
ros_distro: "noetic" | |
steps: | |
- name: checkout code | |
uses: actions/checkout@main | |
with: | |
fetch-depth: 2 | |
submodules: recursive | |
- name: Check last modified time of Foo Dockerfile | |
id: image_modify_date | |
run: | | |
echo "image=$(date -d "$(curl -s https://hub.docker.com/v2/repositories/"$(echo ${{ matrix.docker_image.image_name }} | sed 's/:/\/tags\//')" | jq -r '.last_updated')" +%s)" >> $GITHUB_OUTPUT; | |
echo "base_image=$(date -d "$(curl -s https://hub.docker.com/v2/repositories/"$(echo ${{ matrix.docker_image.base_image }} | sed 's/:/\/tags\//')" | jq -r '.last_updated')" +%s)" >> $GITHUB_OUTPUT; | |
- name: Check last modified time of Foo Docker image | |
id: file_modify_date | |
run: | | |
echo "docker_file=$(date -d "$(git log -1 --format=%cd --date=iso -- ./docker/docker.dockerfile)" +%s)" >> $GITHUB_OUTPUT | |
echo "source=$(date -d "$(git log -1 --format=%cd --date=iso -- ./source)" +%s)" >> $GITHUB_OUTPUT | |
echo "include=$(date -d "$(git log -1 --format=%cd --date=iso -- ./include)" +%s)" >> $GITHUB_OUTPUT | |
echo "python=$(date -d "$(git log -1 --format=%cd --date=iso -- ./python)" +%s)" >> $GITHUB_OUTPUT | |
echo "bindings=$(date -d "$(git log -1 --format=%cd --date=iso -- ./bindings)" +%s)" >> $GITHUB_OUTPUT | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: build and push ${{ matrix.docker_image.image_name }} | |
uses: docker/build-push-action@v3 | |
with: | |
tags: ${{ matrix.docker_image.image_name }} | |
file: docker/docker.dockerfile | |
push: true | |
build-args: | | |
BASEIMAGE=${{ matrix.docker_image.base_image }} | |
ROS_DISTRO=${{ matrix.docker_image.ros_distro }} | |
if: | | |
steps.image_modify_date.outputs.image < steps.file_modify_date.outputs.docker_file || | |
steps.image_modify_date.outputs.image < steps.file_modify_date.outputs.source || | |
steps.image_modify_date.outputs.image < steps.file_modify_date.outputs.include || | |
steps.image_modify_date.outputs.image < steps.file_modify_date.outputs.python || | |
steps.image_modify_date.outputs.image < steps.file_modify_date.outputs.bindings || | |
steps.image_modify_date.outputs.image < steps.image_modify_date.outputs.base_image | |
buildpackage: | |
name: build dep package | |
runs-on: ubuntu-latest | |
container: | |
image: ros:noetic-ros-core-focal | |
steps: | |
- name: Git Sumbodule Update ad build | |
run: | | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confnew" git ros-noetic-ifopt libgtest-dev cmake build-essential libeigen3-dev | |
git clone --recursive https://github.com/rafaelrojasmiliani/gsplines_cpp.git | |
cd gsplines_cpp | |
mkdir build | |
cd build | |
bash -c "source /opt/ros/noetic/setup.bash && cmake .. -DBUILD_TESTING=OFF && make -j2 && cpack -G DEB" | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: gsplines_cpp/build/gsplines-0.0.1-amd64.deb | |
asset_name: gsplines-0.0.1-amd64.deb | |
tag: ${{ github.ref }} | |
overwrite: true | |
body: "Debian pack compiled with standard ros noetic docker image" | |
buildpackage2: | |
name: build dep package with g++-11 | |
runs-on: ubuntu-latest | |
container: | |
image: ros:noetic-ros-core-focal | |
steps: | |
- name: Git Sumbodule Update ad build | |
run: | | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confnew" software-properties-common | |
add-apt-repository ppa:ubuntu-toolchain-r/test | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confnew" git ros-noetic-ifopt libgtest-dev cmake build-essential libeigen3-dev gcc-11 g++-11 | |
bash -c 'update-alternatives \ | |
--install /usr/bin/gcc gcc /usr/bin/gcc-9 90 \ | |
--slave /usr/bin/g++ g++ /usr/bin/g++-9 \ | |
--slave /usr/bin/gcov gcov /usr/bin/gcov-9 \ | |
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-9 \ | |
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-9 && | |
update-alternatives \ | |
--install /usr/bin/gcc gcc /usr/bin/gcc-11 110 \ | |
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \ | |
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \ | |
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \ | |
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11' | |
git clone --recursive https://github.com/rafaelrojasmiliani/gsplines_cpp.git | |
cd gsplines_cpp | |
mkdir build | |
cd build | |
bash -c "source /opt/ros/noetic/setup.bash && cmake .. -DBUILD_TESTING=OFF && make -j2 && cpack -G DEB" | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: gsplines_cpp/build/gsplines-0.0.1-amd64.deb | |
asset_name: gsplines-0.0.1-gcc-11-amd64.deb | |
tag: ${{ github.ref }} | |
overwrite: true | |
body: "Debian pack compiled with g++-11" |