From 6578603be4ad85fea394b3276149d1beab71253c Mon Sep 17 00:00:00 2001 From: Benjamin Rodenberg Date: Tue, 27 Aug 2024 12:32:33 +0200 Subject: [PATCH] Fix syntax and use :2.5.1.0 in workflow. --- .github/workflows/build-env.yml | 4 +- .github/workflows/build-spack.yml | 70 +++++++++++++++---------------- 2 files changed, 36 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build-env.yml b/.github/workflows/build-env.yml index 24330f3a..c48e1992 100644 --- a/.github/workflows/build-env.yml +++ b/.github/workflows/build-env.yml @@ -15,8 +15,6 @@ jobs: build-spack-pyprecice-deps: name: Builds the baseimage for spack providing dependencies runs-on: ubuntu-latest - env: - TAG: ${{ inputs.tag }} steps: - name: Checkout Repository uses: actions/checkout@v2 @@ -33,4 +31,4 @@ jobs: push: true context: . file: spack/ci-spack-pyprecice-deps-2404.dockerfile - tags: "precice/ci-spack-pyprecice-deps-2404:$TAG" + tags: precice/ci-spack-pyprecice-deps-2404:${{ inputs.tag }} diff --git a/.github/workflows/build-spack.yml b/.github/workflows/build-spack.yml index 5e5449f2..d7abc35b 100644 --- a/.github/workflows/build-spack.yml +++ b/.github/workflows/build-spack.yml @@ -1,35 +1,35 @@ -# name: Build Spack -# on: -# push: -# branches: -# - "*" -# pull_request: -# branches: -# - "*" -# schedule: -# - cron: '0 4 * * 1' # Schedule it every Sunday -# -# jobs: -# build_spack: -# name: build_spack -# runs-on: ubuntu-latest -# timeout-minutes: 15 -# container: precice/ci-spack-pyprecice-deps-2404 -# defaults: -# run: -# shell: "bash --login -eo pipefail {0}" -# steps: -# - name: Checkout Repository -# uses: actions/checkout@v2 -# - name: Move Package Script -# run: | -# cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ -# - name: Try to build py-pyprecice with spack and test it -# run: | -# . /opt/spack/share/spack/setup-env.sh -# spack env activate ci && spack arch -# spack remove py-pyprecice -# spack add pyprecice.test.py-pyprecice@develop && spack develop pyprecice.test.py-pyprecice@develop -# spack install && spack find -# spack load py-pyprecice -# BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" \ No newline at end of file +name: Build Spack +on: + push: + branches: + - "*" + pull_request: + branches: + - "*" + schedule: + - cron: '0 4 * * 1' # Schedule it every Sunday + +jobs: + build_spack: + name: build_spack + runs-on: ubuntu-latest + timeout-minutes: 15 + container: precice/ci-spack-pyprecice-deps-2404:2.5.1.0 + defaults: + run: + shell: "bash --login -eo pipefail {0}" + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + - name: Move Package Script + run: | + cp -r spack/repo/packages/py-pyprecice/ /py-pyprecice-repo/packages/ + - name: Try to build py-pyprecice@develop with spack and test it + run: | + . /opt/spack/share/spack/setup-env.sh + spack env activate ci && spack arch + spack remove py-pyprecice + spack add pyprecice.test.py-pyprecice@develop && spack develop pyprecice.test.py-pyprecice@develop + spack install && spack find + spack load py-pyprecice + BINDINGS_VERSION=$(python3 -c "import precice; print(precice.__version__)") && echo "Installed version of bindings is ${BINDINGS_VERSION}" \ No newline at end of file