Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run check and build on github actions #1250

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 126 additions & 126 deletions .azure-pipelines/pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,126 +1,126 @@
trigger:
branches:
include:
- "main"

stages:
- stage: check
dependsOn: []
pool: "envoy-x64-large"
jobs:
- job: build_and_format
displayName: "do_ci.sh"
dependsOn: []
strategy:
maxParallel: 2
matrix:
build:
CI_TARGET: "build"
format:
CI_TARGET: "check_format"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: test
dependsOn: ["check"]
pool: "envoy-x64-large"
jobs:
- job: test_and_benchmark
displayName: "do_ci.sh"
strategy:
# Both test and benchmark need dedicated resources for stability.
maxParallel: 1
matrix:
test:
CI_TARGET: "test"
benchmark:
CI_TARGET: "benchmark_with_own_binaries"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: test_gcc
dependsOn: ["check"]
pool: "envoy-x64-large"
jobs:
- job: test_gcc
displayName: "do_ci.sh"
strategy:
maxParallel: 1
matrix:
test_gcc:
CI_TARGET: "test_gcc"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: sanitizers
dependsOn: ["test"]
pool: "envoy-x64-large"
jobs:
- job: sanitizers
displayName: "do_ci.sh"
strategy:
maxParallel: 2
matrix:
asan:
CI_TARGET: "asan"
tsan:
CI_TARGET: "tsan"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)

- stage: coverage_unit
dependsOn: ["test"]
pool: "envoy-x64-large"
jobs:
- job: coverage_unit
displayName: "do_ci.sh"
strategy:
maxParallel: 1
matrix:
coverage:
CI_TARGET: "coverage"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)
- task: PublishPipelineArtifact@1
condition: always()
displayName: 'Publish the line coverage report'
inputs:
targetPath: $(Build.SourcesDirectory)/coverage_html.zip
artifactName: UnitTestCoverageReport-$(System.JobAttempt)

# coverage_integration stage was temporarily removed due to the issue
# reported by https://github.com/envoyproxy/nighthawk/issues/1006
- stage: release
dependsOn:
- "test_gcc"
- "sanitizers"
- "coverage_unit"
condition: eq(variables['PostSubmit'], true)
pool: "envoy-x64-large"
jobs:
- job: release
displayName: "do_ci.sh"
strategy:
matrix:
release:
CI_TARGET: "docker"
timeoutInMinutes: 120
steps:
- template: bazel.yml
parameters:
ciTarget: $(CI_TARGET)
#trigger:
# branches:
# include:
# - "main"
#
#stages:
#- stage: check
# dependsOn: []
# pool: "envoy-x64-large"
# jobs:
# - job: build_and_format
# displayName: "do_ci.sh"
# dependsOn: []
# strategy:
# maxParallel: 2
# matrix:
# build:
# CI_TARGET: "build"
# format:
# CI_TARGET: "check_format"
# timeoutInMinutes: 120
# steps:
# - template: bazel.yml
# parameters:
# ciTarget: $(CI_TARGET)
#
#- stage: test
# dependsOn: ["check"]
# pool: "envoy-x64-large"
# jobs:
# - job: test_and_benchmark
# displayName: "do_ci.sh"
# strategy:
# # Both test and benchmark need dedicated resources for stability.
# maxParallel: 1
# matrix:
# test:
# CI_TARGET: "test"
# benchmark:
# CI_TARGET: "benchmark_with_own_binaries"
# timeoutInMinutes: 120
# steps:
# - template: bazel.yml
# parameters:
# ciTarget: $(CI_TARGET)
#
#- stage: test_gcc
# dependsOn: ["check"]
# pool: "envoy-x64-large"
# jobs:
# - job: test_gcc
# displayName: "do_ci.sh"
# strategy:
# maxParallel: 1
# matrix:
# test_gcc:
# CI_TARGET: "test_gcc"
# timeoutInMinutes: 120
# steps:
# - template: bazel.yml
# parameters:
# ciTarget: $(CI_TARGET)
#
#- stage: sanitizers
# dependsOn: ["test"]
# pool: "envoy-x64-large"
# jobs:
# - job: sanitizers
# displayName: "do_ci.sh"
# strategy:
# maxParallel: 2
# matrix:
# asan:
# CI_TARGET: "asan"
# tsan:
# CI_TARGET: "tsan"
# timeoutInMinutes: 120
# steps:
# - template: bazel.yml
# parameters:
# ciTarget: $(CI_TARGET)
#
#- stage: coverage_unit
# dependsOn: ["test"]
# pool: "envoy-x64-large"
# jobs:
# - job: coverage_unit
# displayName: "do_ci.sh"
# strategy:
# maxParallel: 1
# matrix:
# coverage:
# CI_TARGET: "coverage"
# timeoutInMinutes: 120
# steps:
# - template: bazel.yml
# parameters:
# ciTarget: $(CI_TARGET)
# - task: PublishPipelineArtifact@1
# condition: always()
# displayName: 'Publish the line coverage report'
# inputs:
# targetPath: $(Build.SourcesDirectory)/coverage_html.zip
# artifactName: UnitTestCoverageReport-$(System.JobAttempt)
#
## coverage_integration stage was temporarily removed due to the issue
## reported by https://github.com/envoyproxy/nighthawk/issues/1006
#- stage: release
# dependsOn:
# - "test_gcc"
# - "sanitizers"
# - "coverage_unit"
# condition: eq(variables['PostSubmit'], true)
# pool: "envoy-x64-large"
# jobs:
# - job: release
# displayName: "do_ci.sh"
# strategy:
# matrix:
# release:
# CI_TARGET: "docker"
# timeoutInMinutes: 120
# steps:
# - template: bazel.yml
# parameters:
# ciTarget: $(CI_TARGET)
10 changes: 8 additions & 2 deletions .github/workflows/nighthawk-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Nighthawk CI/CD

permissions:
contents: read
packages: read

on:
pull_request:
Expand All @@ -12,9 +13,14 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [build, check_format]
target: [test, check_format]
steps:
- uses: actions/checkout@v3
- name: Run CI script
run: |
echo "Hello github"
ci/run_envoy_docker.sh 'ci/do_ci.sh ${{ matrix.target }}'
env:
GITHUB_TOKEN: ${{ github.token }}
AZP_BRANCH: ${{ github.ref }}
AZP_SHA1: ${{ github.sha }}
ENVOY_DOCKER_IN_DOCKER: 1
8 changes: 8 additions & 0 deletions bazel/engflow-bazel-credential-helper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# Bazel expects the helper to read stdin.
# See https://github.com/bazelbuild/bazel/pull/17666
cat /dev/stdin > /dev/null

# `GITHUB_TOKEN` is provided as a secret.
echo "{\"headers\":{\"Authorization\":[\"Bearer ${GITHUB_TOKEN}\"]}}"
Loading