CI/CD #302
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 (c) Microsoft Corporation | |
# SPDX-License-Identifier: Apache-2.0 | |
# This is the top-level workflow that runs on each pull request and push to main. | |
# It invokes other jobs to perform builds and possibly run tests. | |
# All jobs run in parallel, using build artifacts to synchronize jobs. | |
name: CI/CD | |
on: | |
# Run on a daily schedule to perform the full set of tests. | |
schedule: | |
- cron: '00 8 * * *' | |
# Run on pull request to validate code changes. | |
pull_request: | |
merge_group: | |
# Permit manual runs of the workflow. | |
workflow_dispatch: | |
# Run on push so we can capture the baseline code coverage. | |
push: | |
branches: [ main ] | |
concurrency: | |
# Cancel any in-progress instance of this workflow (CI/CD) for the same PR. | |
# Allow running concurrently with any commits on any other branch. | |
# Using GITHUB_REF instead of GITHUB_SHA allows parallel runs on | |
# different branches with the same HEAD commit. | |
group: cicd-${{ github.event.schedule || github.event.pull_request.number || github.event.after || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
# Jobs to run on pull, push, and schedule. | |
# --------------------------------------------------------------------------- | |
# Perform the regular build. | |
regular: | |
if: github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' | |
uses: ./.github/workflows/reusable-build.yml | |
with: | |
ref: ${{ github.ref }} | |
repository: ${{ github.repository }} | |
build_artifact: Build-x64 | |
configurations: '["Debug", "Release"]' | |
# Add more jobs here to run additional tests, such as code coverage, fuzzing, etc. |