Skip to content

Update Bazel support #249

Update Bazel support

Update Bazel support #249

Workflow file for this run

# ref: https://github.com/actions/runner-images
name: build_and_test
# Controls when the action will run.
on: [push, pull_request, workflow_dispatch]
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
unix:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest]
build_tool: [bazel, cmake]
name: "${{matrix.runs-on}} ${{matrix.build_tool}}"
runs-on: ${{matrix.runs-on}}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Show env
run: env
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Setup bazel
if: matrix.build_tool == 'bazel'
uses: bazel-contrib/[email protected]
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Show bazel version
if: matrix.build_tool == 'bazel'
run: bazel --version
- name: Show cmake version
if: matrix.build_tool == 'cmake'
run: cmake --version
- name: Show platform info
run: python -m platform
- name: Install virtualenv
run: |
sudo apt-get install python3-pip -y
sudo pip3 install virtualenv
- name: Show nproc
run: echo nproc=$(nproc)
- name: Build and run tests
run: bash ./scripts/build_and_run_tests_${{matrix.build_tool}}.sh -j $(nproc)