Bazel Build #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright © 2024 OTIV B.V. | |
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 | |
name: Bazel Build | |
on: | |
workflow_dispatch: | |
jobs: | |
ci_bazel: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/bazel | |
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel') }} | |
restore-keys: | | |
${{ runner.os }}-bazel- | |
- name: update packages | |
run: sudo apt-get update | |
- name: install other system dependencies | |
run: sudo apt-get -y install pkg-config libssl-dev default-jre pkgconf | |
- name: Bazel Build | |
working-directory: examples/bazel_build | |
run: bazelisk build --config=ci //... | |
- name: Upload bazel-explain build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bazel-explain-build-run | |
path: bazel-explain.log | |
- name: Bazel Test | |
working-directory: examples/bazel_build | |
run: bazelisk test //... --config=ci --test_output=all --test_arg=--nocapture | |
- name: Upload bazel-explain test artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bazel-explain-test-run | |
path: bazel-explain.log |