|
| 1 | +name: llvmlite_osx-64_conda_builder |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - .github/workflows/llvmlite_osx-64_conda_builder.yml |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + llvmdev_run_id: |
| 10 | + description: 'llvmdev workflow run ID (optional)' |
| 11 | + required: false |
| 12 | + type: string |
| 13 | + |
| 14 | +# Add concurrency control |
| 15 | +concurrency: |
| 16 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} |
| 17 | + cancel-in-progress: true |
| 18 | + |
| 19 | +jobs: |
| 20 | + osx-64-build: |
| 21 | + name: osx-64-build |
| 22 | + runs-on: macos-13 |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + shell: bash -elx {0} |
| 26 | + strategy: |
| 27 | + matrix: |
| 28 | + python-version: ["3.10", "3.11", "3.12", "3.13"] |
| 29 | + fail-fast: false |
| 30 | + |
| 31 | + steps: |
| 32 | + - name: Clone repository |
| 33 | + uses: actions/checkout@v4 |
| 34 | + with: |
| 35 | + fetch-depth: 0 |
| 36 | + |
| 37 | + - name: Setup platform-specific requirements |
| 38 | + run: | |
| 39 | + source ./buildscripts/github/setup_platform.sh "osx-64" |
| 40 | +
|
| 41 | + - name: Setup Miniconda |
| 42 | + uses: conda-incubator/setup-miniconda@v3 |
| 43 | + with: |
| 44 | + auto-update-conda: true |
| 45 | + auto-activate-base: true |
| 46 | + activate-environment: "" |
| 47 | + |
| 48 | + - name: Install conda-build |
| 49 | + run: conda install conda-build |
| 50 | + |
| 51 | + - name: Download llvmdev Artifact |
| 52 | + if: ${{ inputs.llvmdev_run_id != '' }} |
| 53 | + uses: actions/download-artifact@v4 |
| 54 | + with: |
| 55 | + name: llvmdev_osx-64 |
| 56 | + path: llvmdev_conda_packages |
| 57 | + run-id: ${{ inputs.llvmdev_run_id }} |
| 58 | + repository: ${{ github.repository }} |
| 59 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + |
| 61 | + - name: Build llvmlite conda package |
| 62 | + run: | |
| 63 | + if [ "${{ inputs.llvmdev_run_id }}" != "" ]; then |
| 64 | + LLVMDEV_CHANNEL="file://$PWD/llvmdev_conda_packages" |
| 65 | + else |
| 66 | + LLVMDEV_CHANNEL="numba" |
| 67 | + fi |
| 68 | + CONDA_CHANNEL_DIR="conda_channel_dir" |
| 69 | + mkdir $CONDA_CHANNEL_DIR |
| 70 | + conda build --debug -c "$LLVMDEV_CHANNEL" -c defaults --python=${{ matrix.python-version }} conda-recipes/llvmlite --output-folder=$CONDA_CHANNEL_DIR --no-test |
| 71 | +
|
| 72 | + - name: Upload llvmlite conda package |
| 73 | + uses: actions/upload-artifact@v4 |
| 74 | + with: |
| 75 | + name: llvmlite-osx-64-py${{ matrix.python-version }} |
| 76 | + path: conda_channel_dir |
| 77 | + compression-level: 0 |
| 78 | + retention-days: 7 |
| 79 | + if-no-files-found: error |
| 80 | + |
| 81 | + osx-64-test: |
| 82 | + name: osx-64-test |
| 83 | + needs: osx-64-build |
| 84 | + runs-on: macos-13 |
| 85 | + defaults: |
| 86 | + run: |
| 87 | + shell: bash -elx {0} |
| 88 | + strategy: |
| 89 | + matrix: |
| 90 | + python-version: ["3.10", "3.11", "3.12", "3.13"] |
| 91 | + fail-fast: false |
| 92 | + |
| 93 | + steps: |
| 94 | + - name: Setup miniconda |
| 95 | + uses: conda-incubator/setup-miniconda@v3 |
| 96 | + |
| 97 | + - name: Download llvmlite artifact |
| 98 | + uses: actions/download-artifact@v4 |
| 99 | + with: |
| 100 | + name: llvmlite-osx-64-py${{ matrix.python-version }} |
| 101 | + |
| 102 | + - name: Install conda-build and llvmlite |
| 103 | + run: | |
| 104 | + conda install conda-build |
| 105 | +
|
| 106 | + - name: Run tests |
| 107 | + run: conda build --test osx-64/llvmlite*.conda |
0 commit comments