Skip to content

Commit ad667c5

Browse files
committed
Refactor downloads
1 parent 591a805 commit ad667c5

3 files changed

Lines changed: 39 additions & 157 deletions

File tree

MODULE.bazel.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

maven_deps.bzl

Lines changed: 31 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -11,155 +11,37 @@ filegroup_all = """filegroup(
1111
def __setup_toolchains_dependencies(mctx):
1212
release = "v2025-2"
1313

14-
# bookworm-32
15-
maybe(
16-
http_archive,
17-
"gcc_bookworm32_macosarm",
18-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/armhf-bookworm-2025-arm64-apple-darwin-Toolchain-12.2.0.tgz",
19-
sha256 = "cbbfef87c1004923a01697424d6904097ff118efe0709ccd453544088693d5ab",
20-
build_file_content = filegroup_all,
21-
)
22-
maybe(
23-
http_archive,
24-
"gcc_bookworm32_macos",
25-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/armhf-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz",
26-
sha256 = "2c0dd7352edf13f73bc802690876bf77e353265afad0acf677b1cff0cf62c7b0",
27-
build_file_content = filegroup_all,
28-
)
29-
maybe(
30-
http_archive,
31-
"gcc_bookworm32_linux",
32-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/armhf-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz",
33-
sha256 = "1dbb38120fd37cf5b69447cb93cb5c488b2a56bec72db4edcb3fa92ad3881b05",
34-
build_file_content = filegroup_all,
35-
)
36-
maybe(
37-
http_archive,
38-
"gcc_bookworm32_win",
39-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/armhf-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip",
40-
sha256 = "85f75e41ec6cdee80ac4abc5cb2f1d235de67611663ecf6f69a64d05ba3591ef",
41-
build_file_content = filegroup_all,
42-
)
43-
44-
# bookworm-64
45-
maybe(
46-
http_archive,
47-
"gcc_bookworm64_macosarm",
48-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/arm64-bookworm-2025-arm64-apple-darwin-Toolchain-12.2.0.tgz",
49-
sha256 = "4082238f6c726c9105cd85c52cfea80349ac57737e6a3915aa896246a201a5b7",
50-
build_file_content = filegroup_all,
51-
)
52-
maybe(
53-
http_archive,
54-
"gcc_bookworm64_macos",
55-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/arm64-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz",
56-
sha256 = "6900a02b447d89fa31e7872071c1264b20188cb0c2456a634706bf884f3016ea",
57-
build_file_content = filegroup_all,
58-
)
59-
maybe(
60-
http_archive,
61-
"gcc_bookworm64_linux",
62-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/arm64-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz",
63-
sha256 = "7682bac991f106627ce6bd38c1f4dd552931700f3aee73534b4c10f119ad2899",
64-
build_file_content = filegroup_all,
65-
)
66-
maybe(
67-
http_archive,
68-
"gcc_bookworm64_win",
69-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/arm64-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip",
70-
sha256 = "258d0209ec43302cd2b9e4ce7808f163db14a66a85383bd1880c4083f09dd22f",
71-
build_file_content = filegroup_all,
72-
)
73-
74-
# raspi-bookworm-32
75-
maybe(
76-
http_archive,
77-
"gcc_rp_bookworm32_macosarm",
78-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/armhf-raspi-bookworm-2025-arm64-apple-darwin-Toolchain-12.2.0.tgz",
79-
sha256 = "eca6d22a02f0a8b18723fadde0ef82ee2f31f20be8d258e4dbe8faed055547c7",
80-
build_file_content = filegroup_all,
81-
)
82-
maybe(
83-
http_archive,
84-
"gcc_rp_bookworm32_macos",
85-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/armhf-raspi-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz",
86-
sha256 = "f2dec8a3d9b8ccf30087454dbf4fcff0fd261f3a2a3f9cf08729b17d1ceb6101",
87-
build_file_content = filegroup_all,
88-
)
89-
maybe(
90-
http_archive,
91-
"gcc_rp_bookworm32_linux",
92-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/armhf-raspi-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz",
93-
sha256 = "2ab8530d9cb7c00d148ad1a4ccc027d91d02f5f83da8077a1604dff9547d9c4d",
94-
build_file_content = filegroup_all,
95-
)
96-
maybe(
97-
http_archive,
98-
"gcc_rp_bookworm32_win",
99-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/armhf-raspi-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip",
100-
sha256 = "23c1c6434e761b6cc79e8622b1bcd575030a689801870ff795190f718d7fdc80",
101-
build_file_content = filegroup_all,
102-
)
103-
104-
# roborio
105-
maybe(
106-
http_archive,
107-
"gcc_roborio_macosarm",
108-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/cortexa9_vfpv3-roborio-academic-2025-arm64-apple-darwin-Toolchain-12.1.0.tgz",
109-
sha256 = "f55024a44d0d3243f4f88229baeb883e386193c99b18afdcbcefd12f6d913e35",
110-
build_file_content = filegroup_all,
111-
)
112-
maybe(
113-
http_archive,
114-
"gcc_roborio_macos",
115-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/cortexa9_vfpv3-roborio-academic-2025-x86_64-apple-darwin-Toolchain-12.1.0.tgz",
116-
sha256 = "02d412a98ccec9dbb410975513b388304ff9b475c74450fe42bf497b5400212b",
117-
build_file_content = filegroup_all,
118-
)
119-
maybe(
120-
http_archive,
121-
"gcc_roborio_linux",
122-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/cortexa9_vfpv3-roborio-academic-2025-x86_64-linux-gnu-Toolchain-12.1.0.tgz",
123-
sha256 = "e1aea36b35c48d81e146a12a4b7428af051e525fac18c85a53c7be98339cce9f",
124-
build_file_content = filegroup_all,
125-
)
126-
maybe(
127-
http_archive,
128-
"gcc_roborio_win",
129-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/cortexa9_vfpv3-roborio-academic-2025-x86_64-w64-mingw32-Toolchain-12.1.0.zip",
130-
sha256 = "7f15de72cdacc738c3c0d33292c869a5785ad09b87478cf6af38daf4aab92b68",
131-
build_file_content = filegroup_all,
132-
)
133-
134-
# systemcore
135-
maybe(
136-
http_archive,
137-
"gcc_systemcore_macosarm",
138-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/arm64-bookworm-2025-arm64-apple-darwin-Toolchain-12.2.0.tgz",
139-
sha256 = "4082238f6c726c9105cd85c52cfea80349ac57737e6a3915aa896246a201a5b7",
140-
build_file_content = filegroup_all,
141-
)
142-
maybe(
143-
http_archive,
144-
"gcc_systemcore_macos",
145-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/arm64-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz",
146-
sha256 = "6900a02b447d89fa31e7872071c1264b20188cb0c2456a634706bf884f3016ea",
147-
build_file_content = filegroup_all,
148-
)
149-
maybe(
150-
http_archive,
151-
"gcc_systemcore_linux",
152-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/arm64-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz",
153-
sha256 = "7682bac991f106627ce6bd38c1f4dd552931700f3aee73534b4c10f119ad2899",
154-
build_file_content = filegroup_all,
155-
)
156-
maybe(
157-
http_archive,
158-
"gcc_systemcore_win",
159-
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/arm64-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip",
160-
sha256 = "258d0209ec43302cd2b9e4ce7808f163db14a66a85383bd1880c4083f09dd22f",
161-
build_file_content = filegroup_all,
162-
)
14+
HASHES = {
15+
"gcc_bookworm32_linux": ("armhf-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz", "1dbb38120fd37cf5b69447cb93cb5c488b2a56bec72db4edcb3fa92ad3881b05"),
16+
"gcc_bookworm32_macos": ("armhf-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz", "2c0dd7352edf13f73bc802690876bf77e353265afad0acf677b1cff0cf62c7b0"),
17+
"gcc_bookworm32_macosarm": ("armhf-bookworm-2025-arm64-apple-darwin-Toolchain-12.2.0.tgz", "cbbfef87c1004923a01697424d6904097ff118efe0709ccd453544088693d5ab"),
18+
"gcc_bookworm32_win": ("armhf-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip", "85f75e41ec6cdee80ac4abc5cb2f1d235de67611663ecf6f69a64d05ba3591ef"),
19+
"gcc_bookworm64_linux": ("arm64-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz", "7682bac991f106627ce6bd38c1f4dd552931700f3aee73534b4c10f119ad2899"),
20+
"gcc_bookworm64_macos": ("arm64-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz", "6900a02b447d89fa31e7872071c1264b20188cb0c2456a634706bf884f3016ea"),
21+
"gcc_bookworm64_macosarm": ("arm64-bookworm-2025-arm64-apple-darwin-Toolchain-12.2.0.tgz", "4082238f6c726c9105cd85c52cfea80349ac57737e6a3915aa896246a201a5b7"),
22+
"gcc_bookworm64_win": ("arm64-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip", "258d0209ec43302cd2b9e4ce7808f163db14a66a85383bd1880c4083f09dd22f"),
23+
"gcc_roborio_linux": ("cortexa9_vfpv3-roborio-academic-2025-x86_64-linux-gnu-Toolchain-12.1.0.tgz", "e1aea36b35c48d81e146a12a4b7428af051e525fac18c85a53c7be98339cce9f"),
24+
"gcc_roborio_macos": ("cortexa9_vfpv3-roborio-academic-2025-x86_64-apple-darwin-Toolchain-12.1.0.tgz", "02d412a98ccec9dbb410975513b388304ff9b475c74450fe42bf497b5400212b"),
25+
"gcc_roborio_macosarm": ("cortexa9_vfpv3-roborio-academic-2025-arm64-apple-darwin-Toolchain-12.1.0.tgz", "f55024a44d0d3243f4f88229baeb883e386193c99b18afdcbcefd12f6d913e35"),
26+
"gcc_roborio_win": ("cortexa9_vfpv3-roborio-academic-2025-x86_64-w64-mingw32-Toolchain-12.1.0.zip", "7f15de72cdacc738c3c0d33292c869a5785ad09b87478cf6af38daf4aab92b68"),
27+
"gcc_rp_bookworm32_linux": ("armhf-raspi-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz", "2ab8530d9cb7c00d148ad1a4ccc027d91d02f5f83da8077a1604dff9547d9c4d"),
28+
"gcc_rp_bookworm32_macos": ("armhf-raspi-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz", "f2dec8a3d9b8ccf30087454dbf4fcff0fd261f3a2a3f9cf08729b17d1ceb6101"),
29+
"gcc_rp_bookworm32_macosarm": ("armhf-raspi-bookworm-2025-arm64-apple-darwin-Toolchain-12.2.0.tgz", "eca6d22a02f0a8b18723fadde0ef82ee2f31f20be8d258e4dbe8faed055547c7"),
30+
"gcc_rp_bookworm32_win": ("armhf-raspi-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip", "23c1c6434e761b6cc79e8622b1bcd575030a689801870ff795190f718d7fdc80"),
31+
"gcc_systemcore_linux": ("arm64-bookworm-2025-x86_64-linux-gnu-Toolchain-12.2.0.tgz", "7682bac991f106627ce6bd38c1f4dd552931700f3aee73534b4c10f119ad2899"),
32+
"gcc_systemcore_macos": ("arm64-bookworm-2025-x86_64-apple-darwin-Toolchain-12.2.0.tgz", "6900a02b447d89fa31e7872071c1264b20188cb0c2456a634706bf884f3016ea"),
33+
"gcc_systemcore_macosarm": ("arm64-bookworm-2025-arm64-apple-darwin-Toolchain-12.2.0.tgz", "4082238f6c726c9105cd85c52cfea80349ac57737e6a3915aa896246a201a5b7"),
34+
"gcc_systemcore_win": ("arm64-bookworm-2025-x86_64-w64-mingw32-Toolchain-12.2.0.zip", "258d0209ec43302cd2b9e4ce7808f163db14a66a85383bd1880c4083f09dd22f"),
35+
}
36+
37+
for archive_name, (release_type, hash) in HASHES.items():
38+
maybe(
39+
http_archive,
40+
archive_name,
41+
url = "https://github.com/wpilibsuite/opensdk/releases/download/" + release + "/" + release_type,
42+
sha256 = hash,
43+
build_file_content = filegroup_all,
44+
)
16345

16446
deps = module_extension(
16547
__setup_toolchains_dependencies,

tests/MODULE.bazel.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)