jemalloc/.github/workflows/ci.yml
Connor McEntee 9d61a306e5 chore: add CI and BCR publish workflows
Add GitHub Actions CI that mirrors the BCR presubmit matrix (default,
prof-libunwind, prof-libgcc, prof-gcc, examples) across 4 platforms and
Bazel 7/8/9/latest. Add publish-to-bcr workflow triggered by GitHub
releases to automate BCR PR submission.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 16:07:22 +00:00

133 lines
4 KiB
YAML

name: CI
on:
push:
branches: [bcr-5.3.0]
pull_request:
branches: [bcr-5.3.0]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14]
bazel_version: ["7.x", "8.x", "9.x", "latest"]
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
bazelisk-cache: true
repository-cache: true
- name: Build
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
run: bazel build //...
- name: Test
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
run: bazel test //...
prof-libunwind:
name: Prof libunwind (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
bazel_version: ["7.x", "8.x", "9.x", "latest"]
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
bazelisk-cache: true
repository-cache: true
- name: Build
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
run: bazel build //... --config=prof-libunwind
- name: Test
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
run: bazel test //... --config=prof-libunwind
prof-libgcc:
name: Prof libgcc (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14]
bazel_version: ["7.x", "8.x", "9.x", "latest"]
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
bazelisk-cache: true
repository-cache: true
- name: Build
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
run: bazel build //... --config=prof-libgcc
- name: Test
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
run: bazel test //... --config=prof-libgcc ${{ startsWith(matrix.os, 'macos') && '-- -//test/unit:prof_gdump' || '' }}
prof-gcc:
name: Prof gcc (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14]
bazel_version: ["7.x", "8.x", "9.x", "latest"]
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
bazelisk-cache: true
repository-cache: true
- name: Build
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
run: bazel build //... --config=prof-gcc
- name: Test
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
run: bazel test //... --config=prof-gcc ${{ startsWith(matrix.os, 'macos') && '-- -//test/unit:prof_gdump' || '' }}
examples:
name: Examples (${{ matrix.os }}, Bazel ${{ matrix.bazel_version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14]
bazel_version: ["7.x", "8.x", "9.x", "latest"]
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
bazelisk-cache: true
repository-cache: true
- name: Build
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
working-directory: examples
run: bazel build //...
- name: Test
env:
USE_BAZEL_VERSION: ${{ matrix.bazel_version }}
working-directory: examples
run: bazel test //...