Skip to content

update cache code

update cache code #227

Workflow file for this run

---
#----------------------------------------------------------------------------------------
# FILENAME:
# test_linux.yml
# DESCRIPTION:
# GitHub Actions configuration for Linux.
# AUTHOR:
# Adam Erickson (Nervosys)
# DATE:
# 2024-02-20
# NOTES:
#
# Copyright © 2024 Nervosys, LLC
#----------------------------------------------------------------------------------------
name: "Build: Linux"
on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, synchronize, reopened, closed]
# workflow_dispatch:
env:
GCC_VERSION: "13.2.0"
jobs:
build-ubuntu:
runs-on: ${{ matrix.os }} # ubuntu-latest
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] # versions 20, 22, 24 LTS
arch:
- amd64
# - arm64
steps:
- uses: actions/checkout@v4
- name: "Cache GCC build"
id: cache-gcc
uses: actions/cache@v4
with:
path: |
"./external/gcc"
key: ${{ runner.os }}-gcc-${{ hashFiles('**/*external/gcc*') }}
restore-keys: |
${{ runner.os }}-gcc-
#- name: "Build GCC from source"
# if: steps.cache-gcc.outputs.cache-hit != 'true'
# shell: bash
# run: bash ./scripts/build_gcc.sh --version "$GCC_VERSION"
- name: "Install AutonomySim Dependencies"
shell: bash
run: bash ./scripts/setup.sh
- name: "Build AutonomySim"
shell: bash
run: bash ./scripts/build.sh
# - name: "Build AutonomySim ROS2 Wrapper"
# # if: ${{ matrix.os == 'ubuntu-20.04' }}
# shell: bash
# run: bash ./scripts/build_ros2_ubuntu.sh