Skip to content

Commit

Permalink
Workflow for MacOS arm64 build with new GH runners (#21)
Browse files Browse the repository at this point in the history
* Update local-build.sh -> python 3.10 only

* local-build.sh -> conda osx-arm64 settings

* Update local-build.sh -> conda config

* local-build.yml fixing matrix version a bit

* Update local-build.yml -> some cleanup
  • Loading branch information
jdegenstein authored Feb 6, 2024
1 parent 75e3a95 commit 157023d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/local-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
matrix:
os: [ 'macos-14' ] #[ 'ubuntu-22.04', 'macos-11', 'macos-14', 'windows-2019' ]
# python-version: [ '3.9', '3.10', '3.11', '3.12' ]
python-version: [ '3.10' ]

steps:

Expand Down Expand Up @@ -116,7 +117,8 @@ jobs:
shell: bash -l {0}
run: |
conda deactivate
conda create --yes -n cadquerytest python=${{ matrix.python-version }}
CONDA_SUBDIR=osx-arm64 conda create --yes -n cadquerytest python=3.10
conda run -n cadquerytest conda config --env --set subdir osx-arm64
conda activate cadquerytest
python -m pip install dist/*.whl
python -c "import OCP;print('OCP imported successfully')"
Expand Down
6 changes: 4 additions & 2 deletions local-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ function info() {

trap "info Exited!; exit;" SIGINT SIGTERM

for python_version in '3.9' '3.10' '3.11' '3.12'
for python_version in '3.10'
do
info "Building wheel for Python $python_version..."
info "Removing temp files..."
rm -rf -v ./build
rm -rf -v ./cadquery_ocp.egg-info
info "Conda Deps Setup..."
conda create --yes -n ocp-build-system -c cadquery -c conda-forge \
CONDA_SUBDIR=osx-arm64 conda create --yes -n ocp-build-system -c cadquery -c conda-forge \
python=$python_version \
ocp=7.7.2.* \
vtk=9.2.* \
pip
info "Conda Arch Setup..."
conda run -n ocp-build-system conda config --env --set subdir osx-arm64
info "Pip Deps Setup..."
conda run -n ocp-build-system pip install \
build \
Expand Down

0 comments on commit 157023d

Please sign in to comment.