Skip to content

Commit

Permalink
Merge pull request #357 from shym/cygonly
Browse files Browse the repository at this point in the history
CI: Skip Cygwin part 2 when running only one test
  • Loading branch information
jmid authored Jun 6, 2023
2 parents 875cc1a + 0cdde65 commit 6a549cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@ on:
Defaults to custom_compiler_version chunked at [+~-]
type: string
default: ''
outputs:
skippart2:
description: 'Whether Part 2 (Cygwin workflow) should be skipped (because we are running only one test)'
value: ${{ jobs.test.outputs.skippart2 }}

jobs:
build-and-test:
test:
env:
QCHECK_MSG_INTERVAL: '60'
DUNE_PROFILE: ${{ inputs.dune_profile }}
Expand All @@ -108,6 +112,9 @@ jobs:

timeout-minutes: ${{ inputs.timeout }}

outputs:
skippart2: ${{ steps.winonlyone.outputs.skippart2 }}

steps:
- name: Configure environment (Cygwin)
run: |
Expand Down Expand Up @@ -334,7 +341,9 @@ jobs:
if: env.ONLY_TEST != '' && runner.os != 'Windows'

- name: Run only one test (Windows)
id: winonlyone
run: |
echo "skippart2=true" >> "${env:GITHUB_OUTPUT}"
if("${env:REPEATS_FAILFAST}" -eq "false") {
$ErrorActionPreference = 'Continue'
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cygwin-510.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

part2:
needs: part1
if: ${{ always() }}
if: ${{ always() && needs.part1.outputs.skippart2 != 'true' }}
uses: ./.github/workflows/common.yml
with:
runs_on: windows-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cygwin-520-trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

part2:
needs: part1
if: ${{ always() }}
if: ${{ always() && needs.part1.outputs.skippart2 != 'true' }}
uses: ./.github/workflows/common.yml
with:
runs_on: windows-latest
Expand Down

0 comments on commit 6a549cd

Please sign in to comment.