Added make target/recipe to test the ros2 installation with 'make tes… #79
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: CI | |
on: push | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Init | |
run: | | |
df -h | |
sudo apt-get update | |
- name: Maximize free space | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: true | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: true | |
- name: Freespace Check | |
run: | | |
df -h | |
REQUIRED_FREE_SPACE=25 | |
free_space=$(df -h . | awk '{print $4}' | grep "G") | |
free_space="${free_space%G}" | |
if [ -z "$free_space" ]; then | |
echo "ERROR: free_space variable is empty or not set." >&2 | |
exit 1 | |
fi | |
df -h | |
echo "Free space (required): ${REQUIRED_FREE_SPACE} GB" | |
echo "Free space (available): ${free_space} GB" | |
if (( REQUIRED_FREE_SPACE > free_space )); then | |
echo "ERROR: Insufficient free space: ${free_space} GB available, ${REQUIRED_FREE_SPACE} GB required." >&2 | |
exit 1 | |
fi | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Install requirements | |
run: | | |
df -h | |
sudo apt-get update | |
sudo apt-get install -y make | |
- name: Build | |
run: | | |
df -h | |
make build | |
make save_docker_images | |
- name: CI Test | |
run: | | |
df -h | |
make ci_test | |
- name: Upload Logs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: logs | |
path: .log | |
if: always() | |