Skip to content

Commit c308910

Browse files
authored
chore: reconfigure renovate for more fine grained PRs (#474)
1 parent a1ff1a0 commit c308910

File tree

3 files changed

+43
-55
lines changed

3 files changed

+43
-55
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:recommended", ":maintainLockFilesMonthly"],
3+
"extends": ["config:recommended"],
44
"schedule": ["on tuesday"],
55
"enabledManagers": ["github-actions", "pixi", "cargo"],
66
"commitMessagePrefix": "chore(ci):",
77
"ignorePaths": ["**/examples/**", "**/docs/**", "**/tests/**"],
8+
"cargo": {
9+
// See https://docs.renovatebot.com/configuration-options/#rangestrategy
10+
"rangeStrategy": "update-lockfile",
11+
},
812
"packageRules": [
913
{
10-
"groupName": "GitHub Actions",
11-
"matchManagers": ["github-actions"]
14+
"description": "Pin GitHub Actions to immutable SHAs.",
15+
"matchDepTypes": ["action"],
16+
"pinDigests": true,
1217
},
1318
{
14-
"description": "We run multiple macOS runner versions on purpose since 13 runs on x86_64",
15-
"matchPackageNames": "macos",
19+
"groupName": "GitHub Actions",
1620
"matchManagers": ["github-actions"],
17-
"enabled": false
18-
},
19-
{
20-
"groupName": "Pixi",
21-
"matchManagers": ["pixi"]
21+
"matchUpdateTypes": ["minor", "patch"]
2222
},
2323
{
2424
"groupName": "Pixi-Lock",
@@ -31,20 +31,27 @@
3131
"matchManagers": ["pixi"],
3232
"enabled": false
3333
},
34-
{
35-
"groupName": "Cargo",
36-
"matchManagers": ["cargo"]
37-
},
3834
{
3935
"groupName": "Cargo-Lock",
4036
"matchManagers": ["cargo"],
4137
"matchUpdateTypes": ["lockFileMaintenance"]
4238
},
4339
{
44-
"description": "We want a separate PR for rattler crates",
45-
"matchPackageNames": ["rattler*", "file_url"],
40+
"description": "We want a separate PR for all rattler crates",
41+
"matchPackageNames": ["rattler*", "file_url", "coalesced_map", "path_resolver", "simple_spawn_blocking"],
42+
"groupName": "rattler",
43+
"addLabels": ["rattler"]
44+
},
45+
{
46+
"description": "Combine pyo3 related PRs",
47+
"matchPackageNames": ["pyo3*", "pythonize"],
4648
"matchManagers": ["cargo"],
47-
"enabled": false
49+
"groupName": "pyo3",
50+
"addLabels": ["python"]
4851
}
49-
]
52+
],
53+
"vulnerabilityAlerts": {
54+
"commitMessageSuffix": "",
55+
"labels": ["security"],
56+
},
5057
}

scripts/generate-matrix.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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

236236
if __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

Comments
 (0)