-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use maliput::test_utilities and try same branch name in actions (#18)
* Try to checkout same branch in dependencies This implements some behavior from our Jenkins CI that attemps to checkout a branch of the same name in all dependency packages. This requires setting `fetch-depth: 0` in the actions/checkout steps and installing git 2.18+ before those checkout steps. For 18.04, the git-core ppa is used; this will not be needed on 20.04.
- Loading branch information
Showing
5 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
# Copyright 2020 Toyota Research Institute | ||
|
||
CHANGE_BRANCH=$1 | ||
SRC_FOLDER=$2 | ||
|
||
echo try checking out ${CHANGE_BRANCH} | ||
vcs custom $SRC_FOLDER --args branch -f $CHANGE_BRANCH origin/$CHANGE_BRANCH > /dev/null || true | ||
vcs custom $SRC_FOLDER --args merge --no-edit $CHANGE_BRANCH > /dev/null || true | ||
DIFF=$(vcs diff -s $SRC_FOLDER | tr -d '.\n') | ||
if [ ! -z "$DIFF" ]; then | ||
echo "Have merge conflicts!" | ||
echo $DIFF | ||
exit 1 | ||
fi | ||
vcs status $SRC_FOLDER |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,16 +14,31 @@ jobs: | |
container: | ||
image: ubuntu:18.04 | ||
steps: | ||
# setup-ros first since it installs git, which is needed to fetch all branches from actions/checkout | ||
- uses: ros-tooling/[email protected] | ||
# install git from ppa since git 2.18+ is needed to fetch all branches from actions/checkout | ||
# this step can be removed on 20.04 | ||
- name: install git from ppa | ||
shell: bash | ||
run: | | ||
apt update; | ||
apt install -y software-properties-common; | ||
add-apt-repository -y -u ppa:git-core/ppa; | ||
apt install -y git; | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }} | ||
# clone private dependencies | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ToyotaResearchInstitute/maliput | ||
fetch-depth: 0 | ||
path: ${{ env.ROS_WS }}/src/maliput | ||
token: ${{ secrets.MALIPUT_TOKEN }} | ||
- uses: ros-tooling/[email protected] | ||
- name: check if dependencies have a matching branch | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }}/src | ||
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} . | ||
# clone public dependencies | ||
- name: vcs import | ||
shell: bash | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,17 +34,31 @@ jobs: | |
CXX: clang++ | ||
LINKER_PATH: /usr/bin/llvm-ld | ||
steps: | ||
# setup-ros first since it installs git, which is needed to fetch all branches from actions/checkout | ||
- uses: ros-tooling/[email protected] | ||
# install git from ppa since git 2.18+ is needed to fetch all branches from actions/checkout | ||
# this step can be removed on 20.04 | ||
- name: install git from ppa | ||
shell: bash | ||
run: | | ||
apt update; | ||
apt install -y software-properties-common; | ||
add-apt-repository -y -u ppa:git-core/ppa; | ||
apt install -y git; | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }} | ||
# clone private dependencies | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ToyotaResearchInstitute/maliput | ||
fetch-depth: 0 | ||
path: ${{ env.ROS_WS }}/src/maliput | ||
token: ${{ secrets.MALIPUT_TOKEN }} | ||
# use setup-ros action to get vcs, rosdep, and colcon | ||
- uses: ros-tooling/[email protected] | ||
- name: check if dependencies have a matching branch | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }}/src | ||
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} . | ||
- name: clang 8 install | ||
shell: bash | ||
run: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}/.github/clang_suite_installation.sh | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,17 +18,31 @@ jobs: | |
container: | ||
image: ubuntu:18.04 | ||
steps: | ||
# setup-ros first since it installs git, which is needed to fetch all branches from actions/checkout | ||
- uses: ros-tooling/[email protected] | ||
# install git from ppa since git 2.18+ is needed to fetch all branches from actions/checkout | ||
# this step can be removed on 20.04 | ||
- name: install git from ppa | ||
shell: bash | ||
run: | | ||
apt update; | ||
apt install -y software-properties-common; | ||
add-apt-repository -y -u ppa:git-core/ppa; | ||
apt install -y git; | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }} | ||
# clone private dependencies | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ToyotaResearchInstitute/maliput | ||
fetch-depth: 0 | ||
path: ${{ env.ROS_WS }}/src/maliput | ||
token: ${{ secrets.MALIPUT_TOKEN }} | ||
# use setup-ros action to get vcs, rosdep, and colcon | ||
- uses: ros-tooling/[email protected] | ||
- name: check if dependencies have a matching branch | ||
shell: bash | ||
working-directory: ${{ env.ROS_WS }}/src | ||
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} . | ||
- name: clang 8 install | ||
shell: bash | ||
run: ${{ env.ROS_WS }}/src/${{ env.PACKAGE_NAME }}/.github/clang_suite_installation.sh | ||
|
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