Skip to content

[ci] Refactor actions to be simple and reuse existing hooks #362

[ci] Refactor actions to be simple and reuse existing hooks

[ci] Refactor actions to be simple and reuse existing hooks #362

Workflow file for this run

name: HyperCPU CI/CD Pipeline
on:
pull_request:
branches:
- master
jobs:
testing:
runs-on: ubuntu-latest
container:
image: hyperwin/hcpu-ci:debian-unstable
# NOTE: see https://github.com/bazelbuild/bazel/issues/13823
options: --init
name: Run full test suite
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Install conan dependencies
run: conan profile detect && conan install . --build=missing
- name: Build and test with GCC on Debug profile
run: CC=gcc bazel test //src/... //tests/... --config=linux-dbg && bazel clean --expunge
- name: Build and test with GCC on Release profile
run: CC=gcc bazel test //src/... //tests/... --config=linux-opt && bazel clean --expunge
- name: Build and test with LLVM on Debug profile
run: CC=clang bazel test //src/... //tests/... --config=linux-dbg && bazel clean --expunge
- name: Build and test with LLVM on Release profile
run: CC=clang bazel test //src/... //tests/... --config=linux-opt && bazel clean --expunge