Skip to content

feat: add riscv64 support to yq toolchain #1066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion lib/private/yq_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ YQ_PLATFORMS = {
"@platforms//cpu:s390x",
],
),
"linux_riscv64": struct(
compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:riscv64",
],
),
"linux_ppc64le": struct(
compatible_with = [
"@platforms//os:linux",
Expand All @@ -50,7 +56,7 @@ YQ_PLATFORMS = {

# Note: this is not the latest release, because it has significant breaking changes.
# See https://github.com/bazel-contrib/bazel-lib/pull/421
DEFAULT_YQ_VERSION = "4.25.2"
DEFAULT_YQ_VERSION = "4.45.1"

# https://github.com/mikefarah/yq/releases
#
Expand All @@ -61,6 +67,16 @@ DEFAULT_YQ_VERSION = "4.25.2"
# Alternatively, you can compute them manually by running
# `shasum -b -a 384 [downloaded file] | awk '{ print $1 }' | xxd -r -p | base64`
YQ_VERSIONS = {
"4.45.1": {
"darwin_amd64": "sha384-ZoEgzfCLmDk7eoKdJSoq/nny1iX3Cq9mMJ3gnPZ2ejhKMxSgHUQIa7MREToxYl6Z",
"darwin_arm64": "sha384-nHYFqoarTzGba/XtpN8N3U0X9hMTg64Vn7XZ8yiF2cbJFdY3VWFVw80vsg/JXaOg",
"linux_amd64": "sha384-hkMtSRoq1GZKoH9C6OesKhgFLtkcm91wUD2W7L/xlAOS7jZbii23uEMHApo5r7Qs",
"linux_arm64": "sha384-4N6BWZ7ExxmnfqXGGTo7Szi73kJfbgMaUXW0FT10kcy2fNW0VbjBBAfClC14lES2",
"linux_s390x": "sha384-DRzz5Sb3JvwDVjQWGVto3Eh7a7tNQmwXZtMTQy+SidCYGQ2sLA3SQqqsQicNaD8A",
"linux_riscv64": "sha384-/4wDvlLP7f3lvEU/hrCa6wcGLzj8z1PYkWlULxIWHGn65Ai5xnI+Dp21VnM7iyi3",
"linux_ppc64le": "sha384-pnzDz7jn4b+1wOeasaEU6q5ASQhZw0Uz6sEehzpztqQglU6ynTkS8n4Nw/oqG5y9",
"windows_amd64": "sha384-P5c1L9KPhkLdByJ3G8IL3ouwNojoHSDDz6N851RRXxK1Y+ssYKPO/cbQzjQnpKvc",
},
"4.33.3": {
"darwin_amd64": "sha384-IJhMHD71yq+OR8AHFPfZr3XVpFlG2ZAfcexDKojtSLcCMV1pw0X2jza4qFUZiKEt",
"darwin_arm64": "sha384-euQkz1Bu/dFuJoRgG4xIh9BhP2RvOceTDPSY8EzSIM5xykbMkwDNhr1PtCcUF5ye",
Expand Down
2 changes: 1 addition & 1 deletion tools/yq_mirror_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ chmod u+x extract-checksum.sh

# Extract the checksums and output a starlark map entry
echo "\"$version\": {"
platforms=(darwin_{amd64,arm64} linux_{amd64,arm64,s390x,ppc64le} windows_amd64)
platforms=(darwin_{amd64,arm64} linux_{amd64,arm64,s390x,riscv64,ppc64le} windows_amd64)
for release in ${platforms[@]}; do
artifact=$release
if [[ $release == windows* ]]; then
Expand Down