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

Fix docs only CI job processing #48

Merged
merged 1 commit into from
Nov 8, 2024
Merged
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
38 changes: 35 additions & 3 deletions .github/workflows/ValidatePullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,59 @@ name: Validate Pull Request
on:
pull_request:
branches: [main, "release/**"]
paths-ignore:
- '**.md'
- '**.txt'
merge_group:

permissions:
id-token: write
contents: read

jobs:
docs-pr:
runs-on: ubuntu-latest
outputs:
docs-only: ${{ steps.docs-only.outputs.result }}
steps:
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
docs:
- '**/*.md'
- '**/*.txt'
all:
- '**/*'
- uses: actions/github-script@v7
id: docs-only
with:
script: |
let docs_file_count = ${{steps.changes.outputs.docs_count}};
let all_file_count = ${{steps.changes.outputs.all_count}};
return all_file_count === docs_file_count;
result-encoding: string

rust:
needs:
- docs-pr
uses: ./.github/workflows/dep_rust.yml
secrets: inherit
with:
docs_only: ${{needs.docs-pr.outputs.docs-only}}
fuzzing:
needs:
- docs-pr
uses: ./.github/workflows/dep_fuzzing.yml
with:
max_total_time: 300 # 5 minutes in seconds
docs_only: ${{needs.docs-pr.outputs.docs-only}}
secrets: inherit

#####
# start build-on-windows
#####
build-on-windows:
needs:
- docs-pr
if: ${{needs.docs-pr.outputs.docs-only != 'true'}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
Expand Down Expand Up @@ -72,6 +101,9 @@ jobs:
# start build-on-linux
#####
build-on-linux:
needs:
- docs-pr
if: ${{needs.docs-pr.outputs.docs-only != 'true'}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/dep_fuzzing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ on:
description: Maximum total time for the fuzz run in seconds
required: true
type: number
docs_only:
description: Skip fuzzing if docs only
required: false
type: string
default: "false"

permissions:
id-token: write
contents: read

jobs:
fuzz:
if: ${{ inputs.docs_only == 'false' }}
runs-on: [ self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd" ]
steps:
- name: Checkout code
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/dep_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ name: Rust Tests and Lints
# See README.md in this directory for more information about workflow_call
on:
workflow_call:
inputs:
docs_only:
description: Skip building if docs only
required: false
type: string
default: "false"

env:
CARGO_TERM_COLOR: always
Expand All @@ -16,6 +22,7 @@ permissions:

jobs:
build:
if: ${{ inputs.docs_only == 'false' }}
strategy:
fail-fast: true
matrix:
Expand Down
25 changes: 22 additions & 3 deletions src/tests/rust_guests/callbackguest/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 22 additions & 3 deletions src/tests/rust_guests/simpleguest/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading