Skip to content

build(CI/CD): Update GCC version #11

build(CI/CD): Update GCC version

build(CI/CD): Update GCC version #11

Workflow file for this run

name: CMake and Google Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install GCC 12
run: |
sudo apt-get update && sudo apt-get install -y gcc-12 g++12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 110 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
- name: Install CMake
run: sudo apt-get update && sudo apt-get install -y cmake
- name: Install Boost
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev
- name: Install libtorch
run: |
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.10.0%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-1.10.0+cpu.zip -d /opt/
- name: Create build directory
run: mkdir build
working-directory: ./LidarAug/cpp
- name: Configure and build
run: |
cd build
cmake -DBOOST_ROOT=/usr/include/boost -DCMAKE_PREFIX_PATH=/opt/libtorch ..
make
working-directory: ./LidarAug/cpp
- name: Run Google Test
run: |
cd build
ctest --output-on-failure
working-directory: ./LidarAug/cpp