Version updated from 0.6.35 to 0.6.36 #551
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
name: CD on Linux, MacOS and Windows | |
on: | |
push: | |
branches: ["main", "devel"] | |
pull_request: | |
branches: ["main", "devel"] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-13] # macos-latest has an issue with nlopt | |
# os: [ubuntu-latest, windows-latest, macos-latest] | |
# TODO(clairbee): Add pypy versions to the matrix? | |
python-version: ["3.10", "3.11", "3.12"] | |
# TODO(clairbee): prescrive specific versions since nlopt often causes problems on Windows or MacOS? | |
# python-version: ["3.10.11", "3.11.8", "3.12.3"] | |
runs-on: ${{ matrix.os }} | |
if: "!startsWith(github.event.head_commit.message, 'Version updated')" | |
env: | |
BIN_DIR: ${{ matrix.os == 'windows-latest' && 'Scripts' || 'bin' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/setup | |
- name: Prepare environments | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip build | |
mkdir .venv | |
python -m venv .venv/build | |
(. .venv/build/${{ env.BIN_DIR }}/activate && python -m pip install --upgrade pip build && deactivate) | |
python -m venv .venv/build-cli | |
(. .venv/build-cli/${{ env.BIN_DIR }}/activate && python -m pip install --upgrade pip build && deactivate) | |
python -m venv .venv/install | |
(. .venv/install/${{ env.BIN_DIR }}/activate && python -m pip install --upgrade pip build && deactivate) | |
# cadquery-ocp hack for MacOS with ARM | |
- name: install cadquery-ocp on MacOS (Python 3.10) | |
if: ${{ startsWith(matrix.os, 'macos') && (matrix.os != 'macos-13') && (matrix.python-version == '3.10') }} | |
shell: bash | |
run: | | |
(. .venv/build/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp310-cp310-macosx_11_0_arm64.whl) | |
(. .venv/build-cli/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp310-cp310-macosx_11_0_arm64.whl) | |
(. .venv/install/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp310-cp310-macosx_11_0_arm64.whl) | |
- name: install cadquery-ocp on MacOS (Python 3.11) | |
if: ${{ startsWith(matrix.os, 'macos') && (matrix.os != 'macos-13') && (matrix.python-version == '3.11') }} | |
shell: bash | |
run: | | |
(. .venv/build/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp311-cp311-macosx_11_0_arm64.whl) | |
(. .venv/build-cli/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp311-cp311-macosx_11_0_arm64.whl) | |
(. .venv/install/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp311-cp311-macosx_11_0_arm64.whl) | |
- name: install cadquery-ocp on MacOS (Python 3.12) | |
if: ${{ startsWith(matrix.os, 'macos') && (matrix.os != 'macos-13') && (matrix.python-version == '3.12') }} | |
shell: bash | |
run: | | |
(. .venv/build/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp312-cp312-macosx_11_0_arm64.whl) | |
(. .venv/build-cli/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp312-cp312-macosx_11_0_arm64.whl) | |
(. .venv/install/${{ env.BIN_DIR }}/activate && python -m pip install https://github.com/jdegenstein/ocp-build-system/releases/download/7.7.2_macos_arm64/cadquery_ocp-7.7.2-cp312-cp312-macosx_11_0_arm64.whl) | |
- name: Test building and packaging | |
shell: bash | |
run: | | |
cp LICENSE.txt apache20.svg partcad | |
# cp LICENSE.txt partcad | |
# cp apache20.svg partcad | |
cp LICENSE.txt partcad-cli | |
cp apache20.svg partcad-cli | |
cp README.md partcad-cli | |
(. .venv/build/${{ env.BIN_DIR }}/activate && cd partcad && python -m build && cd .. && deactivate) | |
(. .venv/build-cli/${{ env.BIN_DIR }}/activate && python -m pip install -r partcad/requirements.txt && deactivate) | |
(. .venv/build-cli/${{ env.BIN_DIR }}/activate && python -m pip install --no-index --find-links=partcad/dist partcad && deactivate) | |
(. .venv/build-cli/${{ env.BIN_DIR }}/activate && cd partcad-cli && python -m build && cd .. && deactivate) | |
- name: Test installation | |
shell: bash | |
run: | | |
(. .venv/install/${{ env.BIN_DIR }}/activate && python -m pip install -r partcad/requirements.txt && deactivate) | |
(. .venv/install/${{ env.BIN_DIR }}/activate && python -m pip install --no-index --find-links=partcad/dist partcad && deactivate) | |
(. .venv/install/${{ env.BIN_DIR }}/activate && python -m pip install -r partcad-cli/requirements.txt && deactivate) | |
(. .venv/install/${{ env.BIN_DIR }}/activate && python -m pip install --no-index --find-links=partcad-cli/dist partcad-cli && deactivate) | |
- name: Build documentation | |
shell: bash | |
run: | | |
python -m pip install -r ./requirements.txt | |
sphinx-build -M html docs/source docs/build -n -W |