Skip to content

Just a test for launching CI jobs #75

Just a test for launching CI jobs

Just a test for launching CI jobs #75

Workflow file for this run

# Copyright 2024 EngFlow Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "main"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}.${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
# Recommended here: https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLUSTER_HOST: opal.cluster.engflow.com
CRED_HELPER_TOKEN: ${{ secrets.OPAL_CRED_HELPER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
# TODO(OND-616): use remote execution and caching for all CI Runner jobs.
build-and-test:
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# Use remote execution on Linux, remote cache for others. macOS and Windows
# are sensitive to the C++ toolchain installed on the runner, and it may not
# match what's installed on the remote worker.
include:
- os: "linux"
arch: "x64"
runner: "ubuntu-latest"
ef_config: "engflow"
- os: "macos"
arch: "arm64"
runner: "macos-14"
ef_config: "engflow_cache"
- os: "windows"
arch: "x64"
runner: "windows-2022"
ef_config: "engflow_cache"
env:
ARCH: "${{ matrix.arch }}"
OS: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v4
- name: "Log in"
shell: bash
run: infra/login.sh
- name: "Bazel tests"
if: success()
shell: bash
run: |
bazel test --config=noninteractive --config=${{ matrix.ef_config }} --config=remote_${{ matrix.os }}_${{ matrix.arch }} //...
- name: "Go tests"
if: success()
shell: bash
run: |
bazel run --config=noninteractive --config=engflow_bes @rules_go//go -- test ./...
bazel run --config=noninteractive --config=engflow_bes @rules_go//go -- clean -cache -modcache
- name: Log out
shell: bash
run: infra/logout.sh
copyright-headers-check:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
ARCH: "x64"
OS: "linux"
steps:
- uses: actions/checkout@v4
- name: Log in
run: infra/login.sh
- name: Check copyright headers
if: success()
run: |
bazel run --config=noninteractive --config=engflow_bes //infra/internal/check_copyright_headers
- name: Log out
run: infra/logout.sh