From dd4e4a4e61a825901e736348fd044d37e88c90b5 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 8 Sep 2022 11:14:41 +0200 Subject: [PATCH] Revert "Move control logic to main workflow, remove inputs" This reverts commit 0c46fece4c49eb7a37585ec3ba651a31d7f958af. --- .github/workflows/ci.yaml | 8 ++++++-- .github/workflows/unit_tests.yaml | 17 ++++++++++++++++- .github/workflows/windows_python.yml | 8 ++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3082f2f26bc..43488e9a7ba 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -91,13 +91,17 @@ jobs: needs: [ prechecks, changes ] uses: ./.github/workflows/bootstrap.yml unit-tests: - if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'false' }} + if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }} needs: [ prechecks, changes ] uses: ./.github/workflows/unit_tests.yaml + with: + core: ${{ needs.changes.outputs.core }} windows: - if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'false' }} + if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }} needs: [ prechecks ] uses: ./.github/workflows/windows_python.yml + with: + core: ${{ needs.changes.outputs.core }} all: needs: [ windows, unit-tests, bootstrap, audit-ancient-python ] runs-on: ubuntu-latest diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 5de7d86c56f..2fd66c3b5db 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -2,7 +2,17 @@ name: unit tests on: workflow_dispatch: + inputs: + core: + description: "If false the test is skipped" + required: true + type: string + default: "true" workflow_call: + inputs: + core: + required: true + type: string concurrency: group: unit_tests-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} @@ -11,6 +21,7 @@ concurrency: jobs: # Run unit tests with different configurations on linux ubuntu: + if: ${{ inputs.core == 'false' }} runs-on: ubuntu-latest strategy: matrix: @@ -112,10 +123,11 @@ jobs: . .github/workflows/setup_git.sh - name: Run shell tests env: - COVERAGE: true + COVERAGE: ${{ inputs.core }} run: | share/spack/qa/run-shell-tests - uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # @v2.1.0 + if: ${{ inputs.core == 'true' }} with: flags: shelltests,linux @@ -123,6 +135,7 @@ jobs: # only on PRs modifying core Spack rhel8-platform-python: runs-on: ubuntu-latest + if: ${{ inputs.core == 'false' }} container: registry.access.redhat.com/ubi8/ubi steps: - name: Install dependencies @@ -146,6 +159,7 @@ jobs: spack unit-test -k 'not cvs and not svn and not hg' -x --verbose # Test for the clingo based solver (using clingo-cffi) clingo-cffi: + if: ${{ inputs.core == 'false' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2 @@ -182,6 +196,7 @@ jobs: flags: unittests,linux,clingo # Run unit tests on MacOS macos: + if: ${{ inputs.core == 'false' }} runs-on: macos-latest strategy: matrix: diff --git a/.github/workflows/windows_python.yml b/.github/workflows/windows_python.yml index 82e48370aca..aa6bf51fd68 100644 --- a/.github/workflows/windows_python.yml +++ b/.github/workflows/windows_python.yml @@ -2,6 +2,10 @@ name: windows on: workflow_call: + inputs: + core: + type: string + required: true concurrency: group: windows-${{github.ref}}-${{github.event.pull_request.number || github.run_number}} @@ -13,6 +17,7 @@ defaults: powershell Invoke-Expression -Command ".\share\spack\qa\windows_test_setup.ps1"; {0} jobs: unit-tests: + if: ${{ inputs.core == 'false' }} runs-on: windows-latest steps: - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b @@ -32,6 +37,7 @@ jobs: echo F|xcopy .\spack\share\spack\qa\configuration\windows_config.yaml $env:USERPROFILE\.spack\windows\config.yaml spack unit-test --verbose --ignore=lib/spack/spack/test/cmd unit-tests-cmd: + if: ${{ inputs.core == 'false' }} runs-on: windows-latest steps: - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b @@ -70,6 +76,7 @@ jobs: spack external find ninja spack install abseil-cpp make-installer: + if: ${{ inputs.core == 'false' }} runs-on: windows-latest steps: - name: Disable Windows Symlinks @@ -105,6 +112,7 @@ jobs: name: Windows Spack Installer path: ${{ env.installer_root}}\pkg\Spack.msi execute-installer: + if: ${{ inputs.core == 'false' }} needs: make-installer runs-on: windows-latest defaults: