Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pyushkevich authored Oct 8, 2024
1 parent 35cb84a commit 17076fd
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@ jobs:
steps:

# Select MSVC tools on windows
- name: Select MSVC 2019
- name: Select MSVC 2019/2022
uses: ilammy/msvc-dev-cmd@v1
if: ${{ runner.os == 'Windows' }}

# Find the path to the redistributable
- name: Find MSVC redistributable
id: msvc_redist
if: ${{ runner.os == 'Windows }}
run: |
$env:GITHUB_OUTPUT += "path=$env:VCToolsRedistDir\vcredist_x64.exe"
# Setup ninja
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
Expand Down Expand Up @@ -199,7 +206,6 @@ jobs:

# Configure ITK-SNAP
- name: Configure ITK-SNAP
if: steps.cache-restore-itksnap.outputs.cache-hit != 'true'
uses: threeal/[email protected]
continue-on-error: true
with:
Expand All @@ -216,6 +222,7 @@ jobs:
SITE=github-runner-${{ matrix.os }}
${{ runner.os == 'Windows' && format('CURL_LIBRARY={0}/vcpkg/installed/x64-windows-release/lib/libcurl.lib', github.workspace) || '' }}
${{ runner.os == 'Windows' && format('CURL_INCLUDE_DIR={0}/vcpkg/installed/x64-windows-release/include', github.workspace) || '' }}
${{ runner.os == 'Windows' && format('VCREDIST_EXE={0}', steps.msvc_redist.outputs.path || '' }}
# Build ITK-SNAP using CDash
- name: Build and Test ITK-SNAP
Expand Down Expand Up @@ -249,14 +256,21 @@ jobs:

# Package ITK-SNAP
- name: Package ITK-SNAP
id: package_itksnap
continue-on-error: true
working-directory: ${{github.workspace}}/itksnap/build
run: |
ninja package
PACKAGE_FILE=$(jq -r '.filename' ${{github.workspace}}/itksnap/build/package_info.json)
echo "package_file=$PACKAGE_FILE" >> $GITHUB_OUTPUT
# Extract the filename of ITK-SNAP package
- name: Read package name
id: package_itksnap
working-directory: ${{github.workspace}}/itksnap/build
shell: bash
run: |
echo "package_file=$(jq -r '.filename' package_info.json)" >> $GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 17076fd

Please sign in to comment.