Skip to content

[mc-rtc] Update to 2.9.2 #77

[mc-rtc] Update to 2.9.2

[mc-rtc] Update to 2.9.2 #77

Workflow file for this run

name: Build mc-rtc ports
on:
push:
branches:
- '**'
jobs:
build-packages:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-20.04, macos-latest]
runs-on: ${{ matrix.os }}
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
steps:
- uses: actions/checkout@v2
- name: Remove default installation
shell: bash
run: |
rm -rf "$VCPKG_INSTALLATION_ROOT" || sudo rm -rf "$VCPKG_INSTALLATION_ROOT" || true
- name: Restore cache
uses: actions/cache@v2
with:
path: |
${{ env.VCPKG_ROOT }}
!${{ env.VCPKG_ROOT }}/buildtrees
!${{ env.VCPKG_ROOT }}/packages
!${{ env.VCPKG_ROOT }}/downloads
key: |
vcpkg-1-${{ matrix.os }}-${{ github.sha }}
restore-keys: |
vcpkg-1-${{ matrix.os }}-
- name: Clone vcpkg
shell: bash
run: |
if [ ! -d vcpkg ]
then
echo "BOOTSTRAP_VCPKG=true" >> $GITHUB_ENV
git clone --recursive https://github.com/microsoft/vcpkg || true
echo "VCPKG_HEAD=`cd vcpkg && git rev-parse HEAD`" >> $GITHUB_ENV
else
cd vcpkg
old_head=`git rev-parse HEAD`
git pull
new_head=`git rev-parse HEAD`
if [ $old_head = $new_head ]
then
echo "BOOTSTRAP_VCPKG=false" >> $GITHUB_ENV
else
echo "BOOTSTRAP_VCPKG=true" >> $GITHUB_ENV
fi
echo "VCPKG_HEAD=${new_head}" >> $GITHUB_ENV
fi
if ${{ startsWith(runner.os, 'Windows') }}
then
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $GITHUB_ENV
fi
if ${{ startsWith(runner.os, 'Linux') }}
then
echo "VCPKG_DEFAULT_TRIPLET=x64-linux-dynamic" >> $GITHUB_ENV
fi
- name: Bootstrap vcpkg (Windows)
if: startsWith(runner.os, 'Windows')
shell: bash
run: |
if $BOOTSTRAP_VCPKG
then
cd vcpkg
./bootstrap-vcpkg.bat
fi
- name: Bootstrap vcpkg (Linux)
if: startsWith(runner.os, 'Linux')
run: |
export CXX=g++ # Enforce default g++ selection
sudo apt-get install -y python3-setuptools
if $BOOTSTRAP_VCPKG
then
cd vcpkg
./bootstrap-vcpkg.sh
fi
- name: Bootstrap vcpkg (macOS)
if: startsWith(runner.os, 'macOS')
run: |
brew unlink gcc && brew link gcc
if $BOOTSTRAP_VCPKG
then
cd vcpkg
./bootstrap-vcpkg.sh -allowAppleClang
fi
- name: Setup vcpkg-configuration.json
shell: bash
run: |
GITHUB_WORKSPACE=$(echo "${{ github.workspace }}" | sed -e's/\\/\\\\/g')
cat <<EOF | tee vcpkg/vcpkg-configuration.json
{
"default-registry": {
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "${VCPKG_HEAD}"
},
"registries":
[
{
"kind": "git",
"baseline": "${{ github.sha }}",
"repository": "${GITHUB_WORKSPACE}",
"packages": [ "spacevecalg", "rbdyn", "eigen-qld", "sch-core", "tasks", "mc-rbdyn-urdf", "mc-rtc-data", "eigen-quadprog", "state-observation", "hpp-spline", "ndcurves", "mc-rtc", "tvm", "libnotify" ]
}
]
}
EOF
- name: Install
shell: bash
run: |
./vcpkg/vcpkg remove --outdated --recurse
echo "JRL_PORT=tvm" >> $GITHUB_ENV
./vcpkg/vcpkg install --feature-flags=registries --debug tvm
echo "JRL_PORT=mc-rtc" >> $GITHUB_ENV
./vcpkg/vcpkg install --feature-flags=registries --debug mc-rtc
rm -rf $VCPKG_ROOT/buildtrees
rm -rf $VCPKG_ROOT/packages
rm -rf $VCPKG_ROOT/downloads
- name: Show logs
if: failure()
shell: bash
run: |
for f in `ls vcpkg/buildtrees/${JRL_PORT}/*.log`
do
echo "=========="
echo "$f"
echo "=========="
cat $f
done