From 78ace7e643bc7f57af2dbe9c37b590bce6fa55a6 Mon Sep 17 00:00:00 2001 From: Nikola Radakovic Date: Mon, 31 Mar 2025 10:32:17 +0100 Subject: [PATCH] Add workflows for build and test user code This workflow is just a small example how the user code can be built. In most cases this won't be enough since there is no configuration for flags and bazel configs which users will need to build their libraries and binaries. --- .github/workflows/build_and_test.yml | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/build_and_test.yml diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000..cde08e8 --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,47 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +# Workflow configuration for `Bazel Build & Test` +# This workflow runs Bazel build and test when triggered by specific pull request events. + +name: Bazel Build & Test +on: + pull_request: + types: [opened, reopened, synchronize] + merge_group: + types: [checks_requested] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.9.1 + # TODO: Uncomment this part once the code is ready for build + # and define the target for it. + # - name: Bazel build module target(s) + # run: | + # bazel build + test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.9.1 + # TODO: Uncomment this part once the code is ready for test + # and define the targets for it. + # - name: Bazel test module target(s) + # run: | + # bazel test