Skip to content

Commit

Permalink
Merge pull request #2274 from SCIInstitute/fix-gha
Browse files Browse the repository at this point in the history
Fix Github Actions
  • Loading branch information
akenmorris committed Jun 19, 2024
2 parents 8251992 + 913ea26 commit 1295711
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 100 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/build-linux-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ jobs:

steps:

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2.7.0
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: Conda info
run: conda info

Expand All @@ -60,10 +54,6 @@ jobs:
- name: Get tags
run: git fetch --unshallow origin +refs/tags/*:refs/tags/*

- name: Restore Caches
shell: bash -l {0}
run: .github/workflows/restore_caches.sh

- name: Check space3
run: df -h

Expand Down Expand Up @@ -106,9 +96,4 @@ jobs:
- name: make test
shell: bash -l {0}
run: conda activate shapeworks && source ./devenv.sh ./build/bin && cd build && ctest -VV

- name: Store ccache
shell: bash -l {0}
run: .github/workflows/store_ccache.sh


19 changes: 0 additions & 19 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ jobs:

steps:

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2.7.0
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: Conda info
run: conda info

Expand All @@ -61,10 +55,6 @@ jobs:
- name: Check space3
run: df -h

- name: Restore Caches
shell: bash -l {0}
run: .github/workflows/restore_caches.sh

- name: Conda Installs
shell: bash -l {0}
run: .github/workflows/gha_conda.sh
Expand Down Expand Up @@ -115,10 +105,6 @@ jobs:
shell: bash -l {0}
run: conda activate shapeworks && source ./devenv.sh ./build/bin && cd build && ctest -VV

- name: Copy artifact
shell: bash -l {0}
run: cd /__w/ShapeWorks/ShapeWorks/artifacts && ${GITHUB_WORKSPACE}/.github/workflows/copy_artifact.sh artifact-${{github.sha}}-linux *

- uses: actions/upload-artifact@v2
with:
name: artifact-${{github.sha}}-linux
Expand All @@ -135,9 +121,4 @@ jobs:
title: "Development Build for Linux"
files: |
${{runner.workspace}}/ShapeWorks/artifacts/*.tar.gz
- name: Store ccache
shell: bash -l {0}
run: .github/workflows/store_ccache.sh

18 changes: 0 additions & 18 deletions .github/workflows/build-mac-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ jobs:

steps:

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3.0.4

Expand All @@ -52,10 +46,6 @@ jobs:
- name: Get tags
run: git fetch --unshallow origin +refs/tags/*:refs/tags/*

- name: Restore Caches
shell: bash -l {0}
run: .github/workflows/restore_caches.sh

- name: Conda Installs
shell: bash -l {0}
run: .github/workflows/gha_conda.sh
Expand Down Expand Up @@ -115,12 +105,4 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Store ccache
shell: bash -l {0}
run: .github/workflows/store_ccache.sh

- name: Copy artifact
shell: bash -l {0}
run: cd ${{runner.workspace}}/ShapeWorks && ${GITHUB_WORKSPACE}/.github/workflows/copy_artifact.sh artifact-${{github.sha}}-mac-arm64 artifacts

19 changes: 0 additions & 19 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ jobs:

steps:

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: OS Setup
run: |
ls /usr/local
Expand All @@ -57,10 +51,6 @@ jobs:
- name: Get tags
run: git fetch --unshallow origin +refs/tags/*:refs/tags/*

- name: Restore Caches
shell: bash -l {0}
run: .github/workflows/restore_caches.sh

- name: Conda Installs
shell: bash -l {0}
run: .github/workflows/gha_conda.sh
Expand Down Expand Up @@ -120,12 +110,3 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Store ccache
shell: bash -l {0}
run: .github/workflows/store_ccache.sh

- name: Copy artifact
shell: bash -l {0}
run: cd ${{runner.workspace}}/ShapeWorks && ${GITHUB_WORKSPACE}/.github/workflows/copy_artifact.sh artifact-${{github.sha}}-mac artifacts

21 changes: 5 additions & 16 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Init conda
shell: bash -l {0}
run: /c/Miniconda/condabin/conda.bat init --all

# - name: link
# shell: bash -l {0}
# run: cd /usr/bin && ln -s /c/Miniconda/condabin/conda.bat conda
Expand All @@ -65,12 +65,6 @@ jobs:
# with:
# miniconda-version: 'latest'

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: Checkout code
uses: actions/checkout@v3
with:
Expand All @@ -79,16 +73,16 @@ jobs:
- name: Get tags
run: git fetch --unshallow origin +refs/tags/*:refs/tags/*

- name: Download test data
shell: bash -l {0}
run: .github/workflows/download_test_data.sh

- name: Get NSIS
working-directory: ${{runner.workspace}}
run: |
curl -o nsis.zip http://www.sci.utah.edu/~amorris/NSISPortable_3.04.zip
Expand-Archive -LiteralPath nsis.zip -DestinationPath .
- name: Restore Caches
shell: bash -l {0}
run: .github/workflows/restore_caches.sh

- name: Conda Installs
shell: bash -l {0}
run: .github/workflows/gha_conda.sh
Expand Down Expand Up @@ -174,8 +168,3 @@ jobs:
title: "Development Build for Windows"
files: |
d:/a/ShapeWorks/ShapeWorks/artifacts/*.exe
- name: Copy artifact
shell: bash -l {0}
run: cd /d/a/ShapeWorks/ShapeWorks/artifacts && ${GITHUB_WORKSPACE}/.github/workflows/copy_artifact.sh artifact-${{github.sha}}-windows *

7 changes: 6 additions & 1 deletion .github/workflows/download_test_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ BASE=`pwd`
# based on root folder
cd /

# if platform is windows, install wget
if [ "$PLATFORM" == "windows" ]; then
choco install wget --no-progress
fi

# Tiny test data downloads
for run in {1..5}; do
if [ ! -f /tmp/tiny_test_cache.tar.gz ] ; then
scp runner@${CACHE_HOST}:github/tiny_test_cache.tar.gz /tmp || true
cd /tmp
wget https://www.sci.utah.edu/~shapeworks/doc-resources/zips/tiny_test_cache.tar.gz || true
sleep 1
fi
done
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/gha_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ else
# run install
source ./install_shapeworks.sh --developer
conda clean -p -t -y

echo "Create and store cache"
cd /
compress_file /tmp/${CONDA_FILE} "${CONDA_PATH}"
scp /tmp/${CONDA_FILE} runner@${CACHE_HOST}:github
rm /tmp/${CONDA_FILE}
fi

conda init bash
6 changes: 0 additions & 6 deletions .github/workflows/gha_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,4 @@ else

./build_dependencies.sh --build-type=$BUILD_TYPE --num-procs=$NPROCS --clean-after
rm -rf $BUILD_DIR

echo "Create and store cache"
cd /
compress_file ${FILE} "${DEP_PATH}"
scp ${FILE} runner@${CACHE_HOST}:github
rm ${FILE}
fi

0 comments on commit 1295711

Please sign in to comment.