-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing the conda installation for linux and mac
testing conda build in github runner with linux and osx testing conda build installation for easier workflow correct cfg path
- Loading branch information
Showing
20 changed files
with
283 additions
and
175 deletions.
There are no files selected for viewing
18 changes: 13 additions & 5 deletions
18
.github/workflows/condaBuildMac.yaml → .github/workflows/conda_build_linux.yaml
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 |
---|---|---|
@@ -1,23 +1,31 @@ | ||
name: condaBuild | ||
name: conda_build_linux | ||
on: [workflow_dispatch] | ||
jobs: | ||
check_mac_installation: | ||
runs-on: macos-latest | ||
upload_conda_linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
ref: intelMacConda | ||
ref: upgrade2.2.1 | ||
|
||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-activate-base: true | ||
auto-update-conda: true | ||
activate-environment: "" | ||
|
||
- name: install pyPDAF | ||
shell: bash -el {0} | ||
run: | | ||
cp PDAFBuild/setup_conda_linux.cfg setup.cfg | ||
conda install python anaconda-client conda-build conda-verify | ||
anaconda login --username yumengch --password ${{ secrets.ANACONDA }} | ||
conda config --set anaconda_upload yes | ||
conda-build -c conda-forge -c intel conda.recipe/ | ||
conda-build -c conda-forge conda.recipe/ | ||
conda install -y -c conda-forge --use-local pypdaf | ||
mpiexec -n 4 python -u example/main.py | ||
- name: Setup tmate session | ||
if: ${{ failure() }} | ||
uses: mxschmitt/action-tmate@v3 |
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,37 @@ | ||
name: conda_build_mac_intel | ||
on: [workflow_dispatch, pull_request] | ||
jobs: | ||
upload_conda_mac_intel: | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
ref: upgrade2.2.1 | ||
|
||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-activate-base: true | ||
auto-update-conda: true | ||
activate-environment: "" | ||
|
||
- name: build pyPDAF | ||
shell: bash -el {0} | ||
run: | | ||
cp PDAFBuild/setup_conda_intel_mac.cfg setup.cfg | ||
conda install python anaconda-client conda-build conda-verify | ||
anaconda login --username yumengch --password ${{ secrets.ANACONDA }} | ||
conda config --set anaconda_upload no | ||
conda-build -c conda-forge conda.recipe/ | ||
- name: install pyPDAF | ||
shell: bash -el {0} | ||
run: | | ||
conda install -y -c conda-forge --use-local pypdaf | ||
mv example/config_mac.py example/config.py | ||
mv example/config_obsA_mac.py example/config_obsA.py | ||
mpiexec -n 4 python -u example/main.py | ||
- name: Setup tmate session | ||
if: ${{ failure() }} | ||
uses: mxschmitt/action-tmate@v3 |
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,37 @@ | ||
name: conda_build_mac_m1 | ||
on: [workflow_dispatch, pull_request] | ||
jobs: | ||
upload_conda_mac_m1: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
ref: upgrade2.2.1 | ||
|
||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-activate-base: true | ||
auto-update-conda: true | ||
activate-environment: "" | ||
|
||
- name: build pyPDAF | ||
shell: bash -el {0} | ||
run: | | ||
cp PDAFBuild/setup_conda_m1_mac.cfg setup.cfg | ||
conda install python anaconda-client conda-build conda-verify | ||
anaconda login --username yumengch --password ${{ secrets.ANACONDA }} | ||
conda config --set anaconda_upload no | ||
conda-build -c conda-forge conda.recipe/ | ||
- name: install pyPDAF | ||
shell: bash -el {0} | ||
run: | | ||
conda install -y -c conda-forge --use-local pypdaf | ||
mv example/config_mac.py example/config.py | ||
mv example/config_obsA_mac.py example/config_obsA.py | ||
mpiexec -n 4 python -u example/main.py | ||
- name: Setup tmate session | ||
if: ${{ failure() }} | ||
uses: mxschmitt/action-tmate@v3 |
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
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,22 @@ | ||
# Set the PDAF library name, it can be pdaf-var or pdaf-d | ||
set(PDAF_NAME "pdaf-var") | ||
|
||
# set compiler executable | ||
set(CMAKE_Fortran_COMPILER "mpif90") | ||
# Set compiler flags for Release/Production configurations | ||
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -ffree-line-length-none -fdefault-real-8 -fPIC") | ||
# Set compiler flags for Debug configurations | ||
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -Wall -Wextra -g -pedantic -fcheck=all -fbacktrace -ffree-line-length-none -fdefault-real-8 -fPIC") | ||
|
||
# set MPI library information | ||
set(MPI_Fortran_INCLUDE_PATH | ||
"" | ||
CACHE STRING "path to the include directory of MPI_Fortran") | ||
set(MPI_Fortran_MODULE_DIR | ||
"" | ||
CACHE STRING "path to the module directory of MPI_Fortran") | ||
|
||
# Check if the build type is not explicitly set and default to Release | ||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Release) | ||
endif() |
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,22 @@ | ||
# Set the PDAF library name, it can be pdaf-var or pdaf-d | ||
set(PDAF_NAME "pdaf-var") | ||
|
||
# set compiler executable | ||
set(CMAKE_Fortran_COMPILER "mpif90") | ||
# Set compiler flags for Release/Production configurations | ||
set(CMAKE_Fortran_FLAGS_RELEASE "-O3 -ffree-line-length-none -fdefault-real-8 -fPIC -mmacosx-version-min=11.0") | ||
# Set compiler flags for Debug configurations | ||
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -Wall -Wextra -g -pedantic -fcheck=all -fbacktrace -ffree-line-length-none -fdefault-real-8 -fPIC") | ||
|
||
# set MPI library information | ||
set(MPI_Fortran_INCLUDE_PATH | ||
"" | ||
CACHE STRING "path to the include directory of MPI_Fortran") | ||
set(MPI_Fortran_MODULE_DIR | ||
"" | ||
CACHE STRING "path to the module directory of MPI_Fortran") | ||
|
||
# Check if the build type is not explicitly set and default to Release | ||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Release) | ||
endif() |
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,23 @@ | ||
[pyPDAF] | ||
# working directory of pip | ||
pwd = /Users/runner/work/pyPDAF/pyPDAF/ | ||
# PDAF source file directory | ||
PDAF_dir = PDAF_V2.2.1 | ||
cmake_config_path = /Users/runner/work/pyPDAF/pyPDAF/PDAFBuild/osx_gfortran_openmpi_conda.cmake | ||
# switch if the package is built with conda | ||
condaBuild = True | ||
# compilers used in fortran and C | ||
# c_compiler can be: gcc, msvc, icc, clang | ||
# fortran compiler can be: gfortran, ifort | ||
# fortran compiler should be consistent with the compiler used in cmake configuration file | ||
c_compiler = clang | ||
fortran_compiler = gfortran | ||
# if MKL is used, give the path to the static MKL library | ||
use_MKL=False | ||
MKLROOT= | ||
# if dynamic/shared liblapack and libblas library is used, | ||
# give the library path and flags | ||
LAPACK_PATH= | ||
LAPACK_Flag=lapack,blas | ||
# GIVE MPI information | ||
MPI_LIB_PATH= |
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,20 @@ | ||
[pyPDAF] | ||
pwd = /home/runner/work/pyPDAF/pyPDAF | ||
PDAF_dir = PDAF_V2.2.1 | ||
cmake_config_path = /home/runner/work/pyPDAF/pyPDAF/PDAFBuild/linux_gfortran_openmpi_conda.cmake | ||
condaBuild = True | ||
# compilers used in fortran and C | ||
# c_compiler can be: gcc, msvc, icc, clang | ||
# fortran compiler can be: gfortran, ifort | ||
# fortran compiler should be consistent with the compiler used in cmake configuration file | ||
c_compiler = gcc | ||
fortran_compiler = gfortran | ||
# if MKL is used, give the path to the static MKL library | ||
use_MKL= True | ||
MKLROOT= | ||
# if dynamic/shared liblapack and libblas library is used, | ||
# give the library path and flags | ||
LAPACK_PATH= | ||
LAPACK_Flag=lapack,blas | ||
# GIVE MPI information | ||
MPI_LIB_PATH= |
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,23 @@ | ||
[pyPDAF] | ||
# working directory of pip | ||
pwd = /Users/runner/work/pyPDAF/pyPDAF/ | ||
# PDAF source file directory | ||
PDAF_dir = PDAF_V2.2.1 | ||
cmake_config_path = /Users/runner/work/pyPDAF/pyPDAF/PDAFBuild/osx_gfortran_openmpi_conda.cmake | ||
# switch if the package is built with conda | ||
condaBuild = True | ||
# compilers used in fortran and C | ||
# c_compiler can be: gcc, msvc, icc, clang | ||
# fortran compiler can be: gfortran, ifort | ||
# fortran compiler should be consistent with the compiler used in cmake configuration file | ||
c_compiler = clang | ||
fortran_compiler = gfortran | ||
# if MKL is used, give the path to the static MKL library | ||
use_MKL=False | ||
MKLROOT= | ||
# if dynamic/shared liblapack and libblas library is used, | ||
# give the library path and flags | ||
LAPACK_PATH= | ||
LAPACK_Flag=lapack,blas | ||
# GIVE MPI information | ||
MPI_LIB_PATH= |
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,20 @@ | ||
[pyPDAF] | ||
pwd = /Users/runner/work/pyPDAF/pyPDAF/ | ||
PDAF_dir = PDAF_V2.2.1 | ||
cmake_config_path = /Users/runner/work/pyPDAF/pyPDAF/PDAFBuild/osx_gfortran_openmpi_pypdaf.cmake | ||
condaBuild = False | ||
# compilers used in fortran and C | ||
# c_compiler can be: gcc, msvc, icc, clang | ||
# fortran compiler can be: gfortran, ifort | ||
# fortran compiler should be consistent with the compiler used in cmake configuration file | ||
c_compiler = clang | ||
fortran_compiler = gfortran | ||
# if MKL is used, give the path to the static MKL library | ||
use_MKL= True | ||
MKLROOT= | ||
# if dynamic/shared liblapack and libblas library is used, | ||
# give the library path and flags | ||
LAPACK_PATH= | ||
LAPACK_Flag=lapack,blas | ||
# GIVE MPI information | ||
MPI_LIB_PATH= |
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
[options] | ||
include_package_data = True | ||
install_requires = | ||
Cython | ||
mpi4py | ||
numpy | ||
|
||
[pyPDAF] | ||
pwd = D:\a\pyPDAF\pyPDAF | ||
PDAF_dir = PDAF_V2.2.1 | ||
cmake_config_path = D:\a\pyPDAF\pyPDAF\PDAFBuild\win_intel_msmpi_pypdaf.cmake | ||
CC = cl | ||
condaBuild = False | ||
# compilers used in fortran and C | ||
# c_compiler can be: gcc, msvc, icc, clang | ||
# fortran compiler can be: gfortran, ifort | ||
# fortran compiler should be consistent with the compiler used in cmake configuration file | ||
c_compiler = msvc | ||
fortran_compiler = ifort | ||
# if MKL is used, give the path to the static MKL library | ||
use_MKL= True | ||
MKLROOT=C:\Program Files (x86)\Intel\oneAPI\mkl\2024.2\lib | ||
MKLROOT= C:\Program Files (x86)\Intel\oneAPI\mkl\latest\lib | ||
# if dynamic/shared liblapack and libblas library is used, | ||
# give the library path and flags | ||
LAPACK_PATH= | ||
LAPACK_Flag=lapack,blas | ||
# GIVE MPI information | ||
MPI_LIB_PATH=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64 | ||
|
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
|
||
# Install the Python package, but without dependencies, | ||
# because Conda takes care of that | ||
$PYTHON -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv |
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
python: | ||
- 3.8 # [not osx] | ||
- 3.9 | ||
- 3.10 | ||
- 3.11 | ||
# - 3.10 | ||
# - 3.11 | ||
- 3.12 | ||
|
||
c_compiler: | ||
- vs2022 # [win] | ||
|
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
Empty file.
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ name = "pyPDAF" | |
authors = [ | ||
{name = "Yumeng Chen", email = "[email protected]"}, | ||
] | ||
version = "0.0.2" | ||
version = "0.0.3" | ||
description = "A Python interface to PDAF" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
|
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
Oops, something went wrong.