-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged 'imqcam-master' that adds support for conda installation.
- Loading branch information
Showing
3 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build and upload conda package | ||
|
||
on: | ||
# release: | ||
# types: [published] | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_and_upload: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
arch: [x86_64, arm64] | ||
exclude: | ||
- os: ubuntu-latest | ||
arch: arm64 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Conda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
activate-environment: pyoti | ||
auto-update-conda: true | ||
python-version: 3.9 | ||
channels: conda-forge,defaults | ||
channel-priority: strict | ||
architecture: ${{ matrix.arch }} | ||
- name: Set environment variable for sourcing conda (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
echo "RUNNER_OS_SOURCE=/home/runner/.profile" >> $GITHUB_ENV | ||
- name: Set environment variable for sourcing conda (Mac) | ||
if: runner.os == 'macOS' | ||
run: | | ||
echo "RUNNER_OS_SOURCE=/Users/runner/.profile" >> $GITHUB_ENV | ||
- name: Install build tools | ||
run: | | ||
source $RUNNER_OS_SOURCE | ||
conda activate pyoti | ||
conda install -y conda-build anaconda-client | ||
- name: Build Conda package | ||
run: | | ||
source $RUNNER_OS_SOURCE | ||
conda activate pyoti | ||
conda build conda | ||
- name: Upload Conda package | ||
env: | ||
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | ||
run: | | ||
source $RUNNER_OS_SOURCE | ||
conda activate pyoti | ||
PACKAGE_PATH=$(conda build conda --output) | ||
anaconda -t $ANACONDA_TOKEN upload -u mauriaristi $PACKAGE_PATH --channel main --label main --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package: | ||
name: pyoti | ||
version: "1.0.0" | ||
|
||
source: | ||
path: .. | ||
|
||
build: | ||
number: 0 | ||
script: | | ||
mkdir build | ||
cd build | ||
cmake .. | ||
echo "checking SP_DIR" | ||
echo $SP_DIR | ||
make | ||
make gendata | ||
cp -r pyoti $PREFIX/lib/python$PY_VER/site-packages/pyoti | ||
cp -r data $PREFIX/lib/python$PY_VER/site-packages/data | ||
matrix: | ||
- os: linux | ||
arch: x86_64 | ||
- os: osx | ||
arch: x86_64 | ||
- os: osx | ||
arch: arm64 | ||
|
||
requirements: | ||
build: | ||
- python=3.9.* | ||
- numpy | ||
- scipy | ||
- pandas | ||
- cython=0.29.* | ||
- make | ||
- cmake | ||
- gfortran | ||
- pip | ||
- ipykernel | ||
- conda-forge::pyvista | ||
- conda-forge::gmsh | ||
- conda-forge::python-gmsh | ||
- conda-forge::vtk | ||
- conda-forge::scikit-sparse | ||
- conda-forge::scikit-umfpack | ||
|
||
host: | ||
- python=3.9.* | ||
- numpy | ||
- scipy | ||
- pandas | ||
- cython=0.29.* | ||
- make | ||
- cmake | ||
- gfortran | ||
- pip | ||
- ipykernel | ||
- conda-forge::pyvista | ||
- conda-forge::gmsh | ||
- conda-forge::python-gmsh | ||
- conda-forge::vtk | ||
- conda-forge::scikit-sparse | ||
- conda-forge::scikit-umfpack | ||
|
||
run: | ||
- python=3.9.* | ||
- numpy | ||
- scipy | ||
- pandas | ||
- cython=0.29.* | ||
- conda-forge::pyvista | ||
- conda-forge::gmsh | ||
- conda-forge::python-gmsh | ||
- conda-forge::vtk | ||
- conda-forge::scikit-sparse | ||
- conda-forge::scikit-umfpack | ||
|
||
test: | ||
imports: | ||
- pyoti | ||
commands: | ||
- python -c "import pyoti" | ||
|
||
about: | ||
home: imqcam/otilib | ||
|
||
channels: | ||
- conda-forge | ||
- defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ dependencies: | |
- numpy | ||
- scipy | ||
- cython=0.29.* | ||
- pandas | ||
- make | ||
- cmake | ||
- pip | ||
|