diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 8284cc5..178a566 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 package using 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 100755 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"