Skip to content
Snippets Groups Projects
Unverified Commit 76cc10d6 authored by Prashanth Swaminathan's avatar Prashanth Swaminathan Committed by GitHub
Browse files

Run Bazel build in Github Actions (#213)

As some clients rely on the Bazel build, add a workflow to verify at
least one Bazel target (linux-x86). Also, perform some minor cleanup to
comments and target branches in our workflow files.
parent 05027368
No related branches found
Tags v5.2.1
No related merge requests found
5.0.0
......@@ -3,7 +3,6 @@ on:
pull_request:
push:
branches:
- master
- main
permissions:
......
name: Build using Bazel
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
bazel-linux-local:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v2
- name: Build
run: scripts/local-bazel-build.sh
#!/usr/bin/env bash
# Copyright 2024 Google LLC
set -e
BAZEL_ARGS=()
# Bazel-level configuration
#
# If editing these flags, make sure `local-build.sh` flags are updated.
BAZEL_ARGS+=("-c=\"opt\"")
BAZEL_ARGS+=("-copt=\"fpic\"")
# User-specified Bazel arguments go last to allow overridding defaults
BAZEL_ARGS+=($@)
# Build all targets
bazel build :all
......@@ -13,6 +13,8 @@ mkdir -p build/local
CMAKE_ARGS=()
# CMake-level configuration
#
# If editing these flags, make sure `local-build-bazel.sh` flags are updated.
CMAKE_ARGS+=("-DCMAKE_BUILD_TYPE=Release")
CMAKE_ARGS+=("-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
......@@ -22,7 +24,7 @@ then
CMAKE_ARGS+=("-GNinja")
fi
# Use-specified CMake arguments go last to allow overridding defaults
# User-specified CMake arguments go last to allow overridding defaults
CMAKE_ARGS+=($@)
cd build/local && cmake ../.. \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment