Skip to content

Commit c2c707a

Browse files
committed
Merge branch 'add_llvmlite_osx-64_conda_builder'
* add_llvmlite_osx-64_conda_builder: (21 commits) add concurrency control to llvmlite osx-64 conda builder workflow remove chmod command from llvmlite osx-64 conda builder workflow add llvmlite osx-64 conda builder workflow, update conda build config on recipe to point downloaded recipe update setup_platform.sh to use errexit flag, set -ex update buildscripts/github/setup_platform.sh remove unnecessary chmod command remove redundant vars from conda build config files remove platform-specific setup placeholders from setup script add osx-64 wheel builder to defaults to be run on PR cleanup build configs for llvmdev conda and wheel builder update sdk setup to extract to /opt and configure build environment add platform specific setup script add macos sdk setup function to llvmdev_evaluate script update MacOSX10.10.sdk checksum to SHA-256 move and update sdk checksum path move sdk checksum file to correct location refactor macos setup in llvmdev build script update and test default build config for llvmdev add macos sdk download and config for conda build comment out CPU-specific test flag config from wheel recipe ...
2 parents d75c1b8 + 43730a9 commit c2c707a

File tree

8 files changed

+163
-4
lines changed

8 files changed

+163
-4
lines changed

.github/workflows/llvmdev_build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ jobs:
7878
- name: Clone repository
7979
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8080

81+
- name: Setup platform-specific requirements
82+
run: |
83+
source ./buildscripts/github/setup_platform.sh "${{ matrix.platform }}"
84+
8185
- name: Setup Miniconda
8286
uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
8387
with:
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3839b875df1f2bc98893b8502da456cc0b022c4666bc6b7eb5764a5f915a9b00 MacOSX10.10.sdk.tar.xz

buildscripts/github/llvmdev_evaluate.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
"platform": "win-64",
3434
"recipe": "llvmdev_for_wheel",
3535
},
36+
{
37+
"runner": runner_mapping["osx-64"],
38+
"platform": "osx-64",
39+
"recipe": "llvmdev",
40+
},
41+
{
42+
"runner": runner_mapping["osx-64"],
43+
"platform": "osx-64",
44+
"recipe": "llvmdev_for_wheel",
45+
},
3646
]
3747

3848
print(
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
PLATFORM=$1
6+
7+
echo "Setting up platform-specific requirements for ${PLATFORM}"
8+
9+
case "${PLATFORM}" in
10+
"osx-64")
11+
echo "Setting up macOS SDK for osx-64 build"
12+
sdk_dir="buildscripts/github"
13+
mkdir -p "${sdk_dir}"
14+
15+
# Download SDK
16+
echo "Downloading MacOSX10.10.sdk.tar.xz"
17+
wget -q https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.10.sdk.tar.xz
18+
19+
# Verify checksum
20+
echo "Verifying SDK checksum"
21+
shasum -c "${sdk_dir}/MacOSX10.10.sdk.checksum" || exit 1
22+
23+
# Extract SDK to /opt
24+
echo "Extracting SDK to /opt"
25+
sudo mkdir -p /opt
26+
sudo tar -xf MacOSX10.10.sdk.tar.xz -C /opt
27+
echo "macOS SDK setup complete"
28+
;;
29+
*)
30+
echo "No specific setup required for platform: ${PLATFORM}"
31+
;;
32+
esac
33+
34+
echo "Platform setup complete for ${PLATFORM}"

conda-recipes/llvmdev/conda_build_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ c_compiler: # [win]
1616
cxx_compiler: # [win]
1717
- vs2019 # [win]
1818

19-
MACOSX_SDK_VERSION: # [osx and x86_64]
20-
- 10.12 # [osx and x86_64]
19+
CONDA_BUILD_SYSROOT:
20+
- /opt/MacOSX10.10.sdk # [osx and x86_64]

conda-recipes/llvmdev_for_wheel/conda_build_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ c_compiler: # [win]
1616
cxx_compiler: # [win]
1717
- vs2019 # [win]
1818

19-
MACOSX_SDK_VERSION: # [osx and x86_64]
20-
- 10.12 # [osx and x86_64]
19+
CONDA_BUILD_SYSROOT:
20+
- /opt/MacOSX10.10.sdk # [osx and x86_64]

conda-recipes/llvmlite/conda_build_config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ c_compiler: # [win]
1515
- vs2019 # [win]
1616
cxx_compiler: # [win]
1717
- vs2019 # [win]
18+
19+
CONDA_BUILD_SYSROOT:
20+
- /opt/MacOSX10.10.sdk # [osx and x86_64]

0 commit comments

Comments
 (0)