From 78ba7e17a2dc40cb172a7ec1cf7aa98f57ed585e Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Thu, 5 Jan 2023 17:59:00 +0100 Subject: [PATCH] STYLE: Replace matrix.os != 'windows-2019' with !startsWith(matrix.os... Following the `${{`...`}}` syntax suggested by BrightRan at https://github.com/orgs/community/discussions/26386#discussioncomment-3251726 (discussion "If (not) startswith mutually exclusive steps") --- .github/workflows/ElastixGitHubActions.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ElastixGitHubActions.yml b/.github/workflows/ElastixGitHubActions.yml index 821b36b15..108783048 100644 --- a/.github/workflows/ElastixGitHubActions.yml +++ b/.github/workflows/ElastixGitHubActions.yml @@ -79,7 +79,7 @@ jobs: git checkout ${{ matrix.itk-git-tag }} - name: Build ITK - if: steps.cache.outputs.cache-hit != 'true' && matrix.os != 'windows-2019' + if: ${{ steps.cache.outputs.cache-hit != 'true' && !startsWith(matrix.os, 'windows') }} run: | mkdir ITK-build cd ITK-build @@ -155,7 +155,7 @@ jobs: ctest --output-on-failure -VV -j 2 -E "elastix_run_example_COMPARE_IM|elastix_run_3DCT_lung.MI.bspline.ASGD.001_COMPARE_TP" -S dashboard.cmake - name: Build externalproject example - if: matrix.os != 'windows-2019' + if: ${{ !startsWith(matrix.os, 'windows') }} run: | mkdir externalproject-build cd externalproject-build @@ -173,7 +173,7 @@ jobs: shell: cmd - name: Run externalproject example - if: matrix.os != 'windows-2019' + if: ${{ !startsWith(matrix.os, 'windows') }} run: | externalproject-build/elastix_translation_example @@ -185,7 +185,7 @@ jobs: shell: cmd - name: Prepare Artifacts Unix - if: matrix.os != 'windows-2019' + if: ${{ !startsWith(matrix.os, 'windows') }} shell: bash run: | mkdir bin