Skip to content

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

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

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

Workflow file for this run

name: HyperCPU CI/CD Pipeline (build HyperCPU on different platforms)
on:
pull_request:
branches:
- master
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
container:
image: hyperwin/hcpu-ci:${{ matrix.config.tag }}
# NOTE: see https://github.com/bazelbuild/bazel/issues/13823
options: --init
name: Build on ${{ matrix.config.name }}
strategy:
matrix:
config:
- tag: fedora
name: Fedora
- tag: debian-stable
name: Debian Stable
- tag: debian-unstable
name: Debian Unstable
- tag: archlinux
name: Arch Linux
- tag: gentoo-glibc
name: Gentoo GLibc
# - tag: gentoo-musl
# name: Gentoo Musl
# - tag: alpine
# name: Alpine
- tag: ubuntu
name: Ubuntu
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Run with sourced profile (only for gentoo)
if: contains(matrix.config.name, 'gentoo')
run: |
source /etc/profile \
&& conan profile detect && conan install . --build=missing \
&& bazel test //src/... //tests/... --config=linux-opt
- name: Install conan dependencies
if: ${{ ! contains(matrix.config.name, 'gentoo') }}
run: conan profile detect && conan install . --build=missing
- name: Build and test on Release profile
if: ${{ ! contains(matrix.config.name, 'gentoo') }}
run: bazel test //src/... //tests/... --config=linux-opt