Skip to content
Snippets Groups Projects
Unverified Commit 44058d25 authored by Sebastian Schmitt's avatar Sebastian Schmitt Committed by GitHub
Browse files

Cache Spack for GH Actions (#1619)

- make spack ci run use arbor version information
- Cache Spack for GH Actions
parent f7a6fc8c
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@ name: Spack
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
......@@ -16,5 +18,13 @@ jobs:
uses: actions/checkout@v2
with:
path: arbor
- name: Spack cache
uses: actions/cache@v2
with:
path: ~/.spack-cache
key: cache-${{ github.sha }}
restore-keys: cache-
- name: Build Arbor's Spack package against the develop branch
run: arbor/scripts/build_spack_package.sh arbor develop
......@@ -46,12 +46,20 @@ case $SPACK_VERSION in
echo "SPACK_VERSION" must be \"latest_release\" or \"develop\"
exit 1
esac
mkdir ~/.spack
cp $ARBOR_DIR/spack/config.yaml ~/.spack
source $SPACK_DIR/share/spack/setup-env.sh
spack repo create $SPACK_CUSTOM_REPO
mkdir -p $SPACK_CUSTOM_REPO/packages/arbor
spack repo add $SPACK_CUSTOM_REPO
# to make use of the cached installations
spack reindex
cp $ARBOR_DIR/spack/package.py $SPACK_CUSTOM_REPO/packages/arbor
cd $ARBOR_DIR
spack dev-build arbor@with-package-from-repo
ARBOR_VERSION=$(cat "$ARBOR_DIR/VERSION")
spack dev-build arbor@${ARBOR_VERSION}
config:
source_cache: ~/.spack-cache/source_cache
misc_cache: ~/.spack-cache/misc_cache
test_cache: ~/.spack-cache/test_cache
install_tree:
root: ~/.spack-cache/install
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment