From 21f146eee46b6e61e351d319a99160f09a5507a4 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 9 Oct 2024 14:54:12 +0200 Subject: [PATCH 1/3] attempt to setup conda package installation --- .github/workflows/build-test.yaml | 32 +++++++++++++++++++++++++++++++ conda_recipe/build.sh | 2 ++ conda_recipe/meta.yaml | 26 +++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 conda_recipe/build.sh create mode 100644 conda_recipe/meta.yaml diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 8284cc5..629d4da 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -19,6 +19,38 @@ env: Geant4_DIR: ${{ github.workspace }}/geant4 jobs: + install-using-conda: + name: Install dependencies with conda + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + defaults: + run: + shell: bash -l {0} + steps: + - name: Setup conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: 3.12 + + - name: Checkout + uses: actions/checkout@v4 + + - name: Install package using conda (from the meta.yaml) + run: | + cd conda_recipe + conda build . + conda install --use-local geant4-python-application + + - name: Check installation + run: | + conda list geant4-python-application + python -c "import geant4_python_application; print(geant4_python_application.version)" + install-with-geant4-from-conda: name: Install dependencies with conda runs-on: ${{ matrix.os }} diff --git a/conda_recipe/build.sh b/conda_recipe/build.sh new file mode 100644 index 0000000..0c6f28c --- /dev/null +++ b/conda_recipe/build.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +$PYTHON -m pip install . --no-deps diff --git a/conda_recipe/meta.yaml b/conda_recipe/meta.yaml new file mode 100644 index 0000000..ae60dea --- /dev/null +++ b/conda_recipe/meta.yaml @@ -0,0 +1,26 @@ +package: + name: geant4-python-application + version: "0.0.5" + +source: + path: ../ + +requirements: + build: + - python + - setuptools + + host: + - python + - setuptools + - cmake + - geant4=11.2.2 + + run: + - python + - geant4=11.2.2 + +about: + home: https://github.com/lobis/geant4-python-application + license: BSD-3-Clause + summary: "A pythonic Geant4 application with awkward-array integration" From f6c45101a5fd0bfdd9ac025ea54a0bbab8ec5745 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 9 Oct 2024 14:55:25 +0200 Subject: [PATCH 2/3] make executable --- conda_recipe/build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 conda_recipe/build.sh diff --git a/conda_recipe/build.sh b/conda_recipe/build.sh old mode 100644 new mode 100755 From 81a81a4e8f650b5d132bcfa900b454f70e843f56 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 9 Oct 2024 15:04:13 +0200 Subject: [PATCH 3/3] ci --- .github/workflows/build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 629d4da..178a566 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -20,7 +20,7 @@ env: jobs: install-using-conda: - name: Install dependencies with conda + name: Install package using conda runs-on: ${{ matrix.os }} timeout-minutes: 60 strategy: