|
22 | 22 | uses: mamba-org/setup-micromamba@v2 |
23 | 23 | with: |
24 | 24 | environment-name: occ_gordon-ci |
25 | | - channels: conda-forge |
26 | | - channel-priority: strict |
27 | 25 | cache-environment: true |
28 | 26 | cache-downloads: true |
29 | 27 | create-args: >- |
|
84 | 82 | path: | |
85 | 83 | build/tests/unittests/test-results |
86 | 84 | build/tests/apitests/test-results |
| 85 | +
|
| 86 | + python-build: |
| 87 | + name: Python build |
| 88 | + runs-on: ubuntu-latest |
| 89 | + |
| 90 | + steps: |
| 91 | + - uses: actions/checkout@v4 |
| 92 | + |
| 93 | + - name: Set up micromamba |
| 94 | + uses: mamba-org/setup-micromamba@v2 |
| 95 | + with: |
| 96 | + environment-name: occ_gordon-python |
| 97 | + cache-environment: true |
| 98 | + cache-downloads: true |
| 99 | + create-args: >- |
| 100 | + python=3.11 |
| 101 | + pip |
| 102 | + scikit-build-core |
| 103 | + cmake |
| 104 | + ninja |
| 105 | + swig |
| 106 | + cxx-compiler |
| 107 | + occt=7.9.3 |
| 108 | + pythonocc-core=7.9.3 |
| 109 | +
|
| 110 | + - name: Install Python package |
| 111 | + shell: bash -el {0} |
| 112 | + working-directory: python |
| 113 | + run: | |
| 114 | + export CMAKE_GENERATOR=Ninja |
| 115 | + python -m pip install -v --no-build-isolation . |
| 116 | +
|
| 117 | + - name: Smoke test Python package |
| 118 | + shell: bash -el {0} |
| 119 | + run: | |
| 120 | + python -c "import occ_gordon; import occ_gordon.occ_helpers.topology; print(occ_gordon.__file__)" |
| 121 | +
|
| 122 | + conda-package: |
| 123 | + name: Conda package (${{ matrix.os }}) |
| 124 | + runs-on: ${{ matrix.os }} |
| 125 | + |
| 126 | + strategy: |
| 127 | + fail-fast: false |
| 128 | + matrix: |
| 129 | + include: |
| 130 | + - os: ubuntu-latest |
| 131 | + test_package: true |
| 132 | + - os: windows-2022 |
| 133 | + test_package: false |
| 134 | + |
| 135 | + env: |
| 136 | + CONDA_BLD_PATH: ${{ github.workspace }}/conda-bld |
| 137 | + |
| 138 | + steps: |
| 139 | + - uses: actions/checkout@v4 |
| 140 | + |
| 141 | + - name: Setup MSVC compiler |
| 142 | + if: startsWith(matrix.os, 'windows') |
| 143 | + uses: ilammy/msvc-dev-cmd@v1 |
| 144 | + |
| 145 | + - name: Set up micromamba |
| 146 | + uses: mamba-org/setup-micromamba@v2 |
| 147 | + with: |
| 148 | + environment-name: occ_gordon-conda |
| 149 | + cache-environment: true |
| 150 | + cache-downloads: true |
| 151 | + create-args: >- |
| 152 | + boa |
| 153 | + python=3.11 |
| 154 | +
|
| 155 | + - name: Build conda package |
| 156 | + shell: bash -el {0} |
| 157 | + run: | |
| 158 | + if [ "${{ matrix.test_package }}" = "true" ]; then |
| 159 | + conda mambabuild conda --python 3.11 |
| 160 | + else |
| 161 | + conda mambabuild conda --python 3.11 --no-test |
| 162 | + fi |
| 163 | +
|
| 164 | + - name: Upload conda packages |
| 165 | + if: always() |
| 166 | + uses: actions/upload-artifact@v4 |
| 167 | + with: |
| 168 | + name: occ_gordon-conda-${{ matrix.os }} |
| 169 | + path: conda-bld |
0 commit comments