Skip to content

Drop write permissions in coverage workflow #137

Drop write permissions in coverage workflow

Drop write permissions in coverage workflow #137

# *******************************************************************************
# Copyright (c) 2024 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 S-CORE CI - Bazel Build & Test communication module for host platforms
# This workflow runs Bazel build and test when triggered by specific pull request events.
name: Bazel Build & Test communication module
on:
pull_request:
types: [opened, reopened, synchronize]
merge_group:
types: [checks_requested]
workflow_call:
jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
param:
- "" # The default configuration
- "--extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux"
- "--config=linux_x86_64_score_gcc_12_2_0_posix"
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Free Disk Space (Ubuntu)
uses: ./actions/free_disk_space
- uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-${{ matrix.toolchain }}
repository-cache: true
- name: Allow linux-sandbox
uses: ./actions/unblock_user_namespace_for_linux_sandbox
- name: Bazel build communication targets
run: |
bazel build ${{ matrix.param }} //...
- name: Bazel test communication targets
run: |
bazel test ${{ matrix.param }} //... --build_tests_only