Merge pull request #66 from YoheiKakiuchi/pr_update_mesh #212
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
name: Build-IRSL-system | |
#run-name: ${{ github.actor }} is building all-in system of irsl_choreonoid | |
# | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: '30 2 * * 4' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
# ubuntu: [ 18.04, 20.04 ] ## apt for 18.04 is not working well (2023.11.21) | |
ubuntu: [ 20.04 ] ## for 22.04 / ROS2 environment | |
runs-on: self-hosted | |
env: | |
IMAGE_NAME: irsl_choreonoid | |
# DOCKER_LOCAL: ghcr.io/ | |
# DOCKER_LOCAL: repo.irsl.eiiris.tut.ac.jp/ | |
DOCKER_DEPLOY: repo.irsl.eiiris.tut.ac.jp/ | |
steps: | |
- name: Check Version | |
run: | | |
if [ ${{ matrix.ubuntu }} == 22.04 ]; then | |
echo "ROS_DISTRO=noetic" >> $GITHUB_ENV | |
elif [ ${{ matrix.ubuntu }} == 20.04 ]; then | |
echo "ROS_DISTRO=noetic" >> $GITHUB_ENV | |
elif [ ${{ matrix.ubuntu }} == 18.04 ]; then | |
echo "ROS_DISTRO=melodic" >> $GITHUB_ENV | |
else | |
echo "ROS_DISTRO=none" >> $GITHUB_ENV | |
fi | |
- name: Check out repository code(src) | |
uses: actions/checkout@v3 | |
- name: Check Build (no cache) | |
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' | |
run: > | |
docker build . -f .github/workflows/Dockerfile --pull --no-cache | |
--build-arg BASE_IMAGE=ros:${{ env.ROS_DISTRO }}-ros-base | |
-t actions/irsl_choreonoid:${{ matrix.ubuntu }} | |
- name: Check Build (cached) | |
if: github.event_name != 'workflow_dispatch' && github.event_name != 'pull_request' | |
run: > | |
docker build . -f .github/workflows/Dockerfile --pull | |
--build-arg BASE_IMAGE=ros:${{ env.ROS_DISTRO }}-ros-base | |
-t actions/irsl_choreonoid:${{ matrix.ubuntu }} | |
- name: Tests | |
run: > | |
docker run --rm actions/irsl_choreonoid:${{ matrix.ubuntu }} | |
-- bash -c 'source /choreonoid_ws/install/setup.bash; roscd irsl_choreonoid/test; ./run_all_tests.sh' | |
- name: Dispatch | |
if: github.event_name == 'push' && matrix.ubuntu == '20.04' | |
env: | |
GITHUB_TOKEN: ${{ secrets.IRSL_PAT_CLS }} | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.IRSL_PAT_CLS }} | |
script: | | |
github.rest.actions.createWorkflowDispatch({ | |
owner: 'IRSL-tut', | |
repo: 'irsl_docker_irsl_system', | |
ref: 'main', | |
workflow_id: 'build-irsl-system.yaml', | |
inputs: { | |
event_type: 'build_all', | |
source: 'irsl_choreonoid', | |
hash: '${{ github.sha }}' | |
} | |
}) | |
- run: echo "🍏 This job's status is ${{ job.status }}." |