@@ -60,22 +60,22 @@ def generate_matrix(filter_package_name=None):
6060 check = True ,
6161 )
6262 cargo_metadata = json .loads (result .stdout )
63-
63+
6464 # Get all packages with binary or cdylib targets
6565 all_packages = []
66-
66+
6767 if "packages" in cargo_metadata :
6868 for package in cargo_metadata ["packages" ]:
6969 # Include packages with binary targets (Rust binaries)
7070 has_binary = any (target ["kind" ][0 ] == "bin" for target in package .get ("targets" , []))
71-
71+
7272 if has_binary :
7373 all_packages .append ({
7474 "name" : package ["name" ],
7575 "version" : package ["version" ],
7676 "type" : "rust"
7777 })
78-
78+
7979 # Add py-pixi-build-backend manually since it's outside the workspace
8080 with open ("py-pixi-build-backend/Cargo.toml" , "rb" ) as f :
8181 cargo_toml = tomllib .load (f )
@@ -84,7 +84,7 @@ def generate_matrix(filter_package_name=None):
8484 "version" : cargo_toml ["package" ]["version" ],
8585 "type" : "python"
8686 })
87-
87+
8888 # Add pixi-build-ros manually since it's a Python package in backends/
8989 with open ("backends/pixi-build-ros/pyproject.toml" , "rb" ) as f :
9090 pyproject_toml = tomllib .load (f )
@@ -93,7 +93,7 @@ def generate_matrix(filter_package_name=None):
9393 "version" : pyproject_toml ["project" ]["version" ],
9494 "type" : "python"
9595 })
96-
96+
9797 # Filter packages by name if specified
9898 if filter_package_name :
9999 available_packages = [pkg ["name" ] for pkg in all_packages ]
@@ -110,8 +110,8 @@ def generate_matrix(filter_package_name=None):
110110 {"target" : "linux-aarch64" , "os" : "ubuntu-latest" },
111111 {"target" : "linux-ppc64le" , "os" : "ubuntu-latest" },
112112 {"target" : "win-64" , "os" : "windows-latest" },
113- {"target" : "osx-64" , "os" : "macos-14 " },
114- {"target" : "osx-arm64" , "os" : "macos-14 " },
113+ {"target" : "osx-64" , "os" : "macos-15-intel " },
114+ {"target" : "osx-arm64" , "os" : "macos-15 " },
115115 ]
116116
117117 def get_targets_for_package (package_name , all_targets ):
@@ -134,23 +134,23 @@ def get_targets_for_package(package_name, all_targets):
134134 # Untagged build - include all packages with auto-versioning
135135 date_suffix = get_current_date ()
136136 git_hash = get_git_short_hash ()
137-
137+
138138 print (f"Building all packages for untagged build with date suffix: { date_suffix } , git hash: { git_hash } " , file = sys .stderr )
139-
139+
140140 package_names = []
141141 for package in all_packages :
142142 package_names .append (package ["name" ])
143143 # Create auto-version: original_version.ddmmyyyy.git_hash
144144 auto_version = f"{ package ['version' ]} .{ date_suffix } .{ git_hash } "
145-
145+
146146 # Generate environment variable name
147147 if package ["name" ] == "py-pixi-build-backend" :
148148 env_name = "PY_PIXI_BUILD_BACKEND_VERSION"
149149 elif package ["name" ] == "pixi-build-ros" :
150150 env_name = "PIXI_BUILD_ROS_VERSION"
151151 else :
152152 env_name = f"{ package ['name' ].replace ('-' , '_' ).upper ()} _VERSION"
153-
153+
154154 for target in get_targets_for_package (package ["name" ], targets ):
155155 matrix .append (
156156 {
@@ -164,7 +164,7 @@ def get_targets_for_package(package_name, all_targets):
164164
165165 if not package_names :
166166 raise RuntimeError ("No packages found for untagged build" )
167-
167+
168168 print (f"Found { len (package_names )} packages: { ', ' .join (package_names )} " , file = sys .stderr )
169169 else :
170170 # Tag-based build - only include tagged packages
@@ -224,20 +224,20 @@ def get_targets_for_package(package_name, all_targets):
224224 raise RuntimeError ("No packages found to build for untagged build" )
225225 else :
226226 raise RuntimeError ("No tagged packages found to build" )
227-
227+
228228 matrix_json = json .dumps (matrix )
229-
229+
230230 # Debug output to stderr so it doesn't interfere with matrix JSON
231231 print (f"Generated matrix with { len (matrix )} entries" , file = sys .stderr )
232-
232+
233233 print (matrix_json )
234234
235235
236236if __name__ == "__main__" :
237237 import argparse
238-
238+
239239 parser = argparse .ArgumentParser (description = "Generate build matrix for packages" )
240240 parser .add_argument ("--package" , help = "Filter to specific package name" )
241241 args = parser .parse_args ()
242-
242+
243243 generate_matrix (args .package )
0 commit comments