From 39ed34bd47085940dc52a986474ca09a3e4e7a6e Mon Sep 17 00:00:00 2001 From: Tom Close Date: Thu, 21 Mar 2024 16:26:38 +1100 Subject: [PATCH] added cache step to ANTs install --- .github/workflows/ci-cd.yaml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index f786922..fb21d63 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -117,14 +117,15 @@ jobs: sudo rm -rf /usr/share/dotnet sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Revert version to most recent version tag on upstream update - if: github.event_name == 'repository_dispatch' - run: git checkout $(git tag -l | grep 'v.*' | tail -n 1 | awk -F post '{print $1}') + - name: Cache ANTs Install + id: cache-install + uses: actions/cache@v4 + with: + path: install + key: ants-ubuntu-22.04 - name: Install ANTs Package + if: steps.cache-install.outputs.cache-hit != 'true' run: | workingDir=${PWD} git clone https://github.com/ANTsX/ANTs.git @@ -137,11 +138,19 @@ jobs: echo "Installation completed successfully" echo "PATH=${workingDir}/install/bin:$PATH" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=${workingDir}/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - echo "Checking ANTs installation" - $GITHB_ENV + + - name: Check ANTs installation + run: | which antsRegistration antsRegistrationSyN.sh -h + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Revert version to most recent version tag on upstream update + if: github.event_name == 'repository_dispatch' + run: git checkout $(git tag -l | grep 'v.*' | tail -n 1 | awk -F post '{print $1}') + - name: Download tasks converted from Nipype uses: actions/download-artifact@v3 with: