Skip to content

bazel: foundation

bazel: foundation #34

Workflow file for this run

# Copyright 2024 Redpanda Data, Inc.
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.md
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0
name: build-bazel
on:
push:
branches:
- dev
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
paths:
- 'src/v/**'
- 'bazel/**'
- 'MODULE.bazel'
- '.bazelrc'
- '.bazelversion'
- 'BUILD'
- '.github/workflows/build-bazel.yml'
jobs:
build:
name: build redpanda with bazel
runs-on: ubuntu-latest-16
timeout-minutes: 30
strategy:
matrix:
os: ["fedora:38", "ubuntu:noble"]
container:
image: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_SM_READONLY_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SM_READONLY_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: get secrets from aws sm
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/bazel_cacher_gcp
parse-json-secrets: true
- name: setup user bazelrc
run: |
echo ${{ env.BAZEL_CACHER_GCP_SECRET_KEY }} | base64 --decode > ${HOME}/gcp.key.json
echo build --remote_cache=https://storage.googleapis.com/${{ env.BAZEL_CACHER_GCP_BUCKET_NAME }} > user.bazelrc
echo build --google_credentials=${HOME}/gcp.key.json >> user.bazelrc
- name: dependencies
run: bazel/install-deps.sh
- name: install baselisk
run: |
dnf install -y wget || apt install -y wget
wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
chmod +x /usr/local/bin/bazel
- name: buildifier check
run: bazel run //tools:buildifier.check
- name: build thirdparty
run: |
bazel build @ada @avro @base64 @c-ares @hdrhistogram \
@hwloc @krb5 @libpciaccess @libxml2 @lksctp @numactl @openssl \
@openssl-fips @rapidjson @roaring @seastar @snappy \
@unordered_dense @wasmtime @xz
- name: build
run: bazel build //...