Gleb/post 11 1 test (#188) #52
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 | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
build-ros-packages: | |
# Builds CI docker container and all ROS packages | |
runs-on: self-hosted | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Step: Set up Docker Buildx (if needed) | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
# Step: Build the CI image | |
- name: Build Docker image | |
run: | | |
chmod +x ${{ github.workspace }}/containers/scripts/build-ci.sh | |
${{ github.workspace }}/containers/scripts/build-ci.sh | |
- name: Get Commit Hash | |
id: vars | |
run: echo "COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_ENV | |
- name: Cache catkin files | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/devel | |
${{ github.workspace }}/build | |
key: | |
catkin_cache | |
- name: Run build command inside Docker container | |
run: | | |
docker run \ | |
-v ${{ github.workspace }}:/catkin_ws \ | |
tauv/x86-nvidia-ci:${{ env.COMMIT_HASH }} \ | |
/bin/bash -c "source /opt/ros/noetic/setup.bash && \ | |
cd catkin_ws && \ | |
catkin build --no-status --summarize" | |
build-workstation: | |
# Build workstation docker container | |
runs-on: self-hosted | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Step: Set up Docker Buildx (if needed) | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
# Step: Build the CI image | |
- name: Build Docker image | |
run: | | |
chmod +x ${{ github.workspace }}/containers/scripts/build-workstation.sh | |
${{ github.workspace }}/containers/scripts/build-workstation.sh |