From 03b1a515aa09181941fc7ad9d1efd417a0b41585 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Fri, 4 Oct 2024 01:45:10 -0400 Subject: [PATCH] Fixup toolchain version (#22) --- .bazelrc-buildbuddy | 1 - .github/actions/setup-build-buddy/action.yml | 2 +- .github/workflows/publish.yml | 33 +++++++++++++++++++ MODULE.bazel | 5 ++- .../download_dependencies.bzl | 4 +-- tests/.bazelrc-buildbuddy | 1 - tests/MODULE.bazel | 2 +- tests/MODULE.bazel.lock | 13 ++++---- 8 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.bazelrc-buildbuddy b/.bazelrc-buildbuddy index fa9aca6..58c5b58 100644 --- a/.bazelrc-buildbuddy +++ b/.bazelrc-buildbuddy @@ -25,4 +25,3 @@ build:remote_user --remote_download_toplevel build:ci --config=build_buddy build:ci --remote_download_minimal build:ci --build_metadata=ROLE=CI -build:ci --remote_download_minimal diff --git a/.github/actions/setup-build-buddy/action.yml b/.github/actions/setup-build-buddy/action.yml index 1637e12..d1dbc42 100644 --- a/.github/actions/setup-build-buddy/action.yml +++ b/.github/actions/setup-build-buddy/action.yml @@ -16,7 +16,7 @@ runs: run: | echo "No API key secret detected, will setup readonly cache" echo "build:ci --config=build_buddy_readonly" > .buildbuddy-auth.rc - echo "build:ci --config=build_buddy_readonly"" > tests/.buildbuddy-auth.rc + echo "build:ci --config=build_buddy_readonly" > tests/.buildbuddy-auth.rc - name: Set with key env: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..126d262 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish Module +on: + workflow_dispatch: + push: + tags: + - '*' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + publish_module: + name: "Publish Module" + runs-on: ubuntu-22.04 + steps: + # Checkout repository + - uses: actions/checkout@v4 + with: + path: libraries/bzlmodrio-ni + + - name: Create Archive + run: git archive HEAD --format=tar.gz --output="bzlmodrio-ni-${GITHUB_REF_NAME}.tar.gz" + working-directory: libraries/bzlmodrio-ni + + - name: Setup archive name + run: echo "ARCHIVE_NAME=libraries/bzlmodrio-ni/bzlmodrio-ni-${GITHUB_REF_NAME}.tar.gz" >> "$GITHUB_ENV" + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: "${{ env.ARCHIVE_NAME }}" diff --git a/MODULE.bazel b/MODULE.bazel index 53af56d..50801c3 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,14 +1,13 @@ module( name = "bzlmodrio-ni", - version = "2024.2.1", + version = "2024.2.1.bcr1", compatibility_level = 2024, ) bazel_dep(name = "platforms", version = "0.0.9") bazel_dep(name = "rules_cc", version = "0.0.9") bazel_dep(name = "rules_java", version = "7.6.5") -bazel_dep(name = "rules_bazelrio", version = "0.0.14") -bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1") +bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1.bcr1") setup_bzlmodrio_ni_cpp_dependencies = use_extension("//:maven_cpp_deps.bzl", "setup_bzlmodrio_ni_cpp_dependencies") use_repo( diff --git a/private/non_bzlmod_dependencies/download_dependencies.bzl b/private/non_bzlmod_dependencies/download_dependencies.bzl index 14cc505..f106a43 100644 --- a/private/non_bzlmod_dependencies/download_dependencies.bzl +++ b/private/non_bzlmod_dependencies/download_dependencies.bzl @@ -26,8 +26,8 @@ def download_dependencies(): # Roborio Toolchain http_archive( name = "rules_bzlmodrio_toolchains", - sha256 = "cd3ff046427e9c6dbc0c86a458c8cf081b8045fc3fb4265d08c0ebfc17f9cb30", - url = "https://github.com/bzlmodRio/rules_bzlmodRio_toolchains/releases/download/2024-1/rules_bzlmodRio_toolchains-2024-1.tar.gz", + sha256 = "2ef1cafce7f4fd4e909bb5de8b0dc771a934646afd55d5f100ff31f6b500df98", + url = "https://github.com/wpilibsuite/rules_bzlmodRio_toolchains/releases/download/2024-1.bcr1/rules_bzlmodRio_toolchains-2024-1.bcr1.tar.gz", ) ######################## diff --git a/tests/.bazelrc-buildbuddy b/tests/.bazelrc-buildbuddy index fa9aca6..58c5b58 100644 --- a/tests/.bazelrc-buildbuddy +++ b/tests/.bazelrc-buildbuddy @@ -25,4 +25,3 @@ build:remote_user --remote_download_toplevel build:ci --config=build_buddy build:ci --remote_download_minimal build:ci --build_metadata=ROLE=CI -build:ci --remote_download_minimal diff --git a/tests/MODULE.bazel b/tests/MODULE.bazel index 682fd32..4d57796 100644 --- a/tests/MODULE.bazel +++ b/tests/MODULE.bazel @@ -9,7 +9,7 @@ bazel_dep(name = "rules_cc", version = "0.0.9") bazel_dep(name = "rules_java", version = "7.6.5") bazel_dep(name = "rules_jvm_external", version = "6.1") bazel_dep(name = "rules_bazelrio", version = "0.0.14") -bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1") +bazel_dep(name = "rules_bzlmodrio_toolchains", version = "2024-1.bcr1") bazel_dep(name = "rules_pmd", version = "7.2.0") bazel_dep(name = "rules_checkstyle", version = "10.12.2") bazel_dep(name = "rules_wpiformat", version = "2024.34") diff --git a/tests/MODULE.bazel.lock b/tests/MODULE.bazel.lock index db7d29c..95e01f2 100644 --- a/tests/MODULE.bazel.lock +++ b/tests/MODULE.bazel.lock @@ -39,8 +39,8 @@ "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_bazelrio/0.0.14/MODULE.bazel": "e4004326cab72e5b27b697a01b03139276ac04c6e7c177ddb9424afc8709e51b", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_bazelrio/0.0.14/source.json": "7da669bc69d497942a9ac21b8f76c05f4a91b4212e3a697a1e27d9358576e995", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_bzlmodrio_toolchains/2024-1/MODULE.bazel": "4479aad521d4d7905e8b1f5afc592a4c3067612058d3150d451fa96adf3ad85a", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_bzlmodrio_toolchains/2024-1/source.json": "3487a7873b3e2aeb26bd4f69ad494511e51ada975bfe592c3a81009a3b2a0b31", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_bzlmodrio_toolchains/2024-1.bcr1/MODULE.bazel": "c9eb05f0f01e748a5d923d56e6f846f01c630e823f01d79d40f2b04638cc43f7", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_bzlmodrio_toolchains/2024-1.bcr1/source.json": "ede33537e659d196e38226a94a3d8543b739f38f7ced571745cb469f6adebd02", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f", @@ -54,7 +54,8 @@ "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/6.4.0/MODULE.bazel": "e986a9fe25aeaa84ac17ca093ef13a4637f6107375f64667a15999f77db6c8f6", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.3.2/MODULE.bazel": "50dece891cfdf1741ea230d001aa9c14398062f2b7c066470accace78e412bc2", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.1/source.json": "8f3f3076554e1558e8e468b2232991c510ecbcbed9e6f8c06ac31c93bcf38362", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.5/MODULE.bazel": "481164be5e02e4cab6e77a36927683263be56b7e36fef918b458d7a8a1ebadb1", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_java/7.6.5/source.json": "a805b889531d1690e3c72a7a7e47a870d00323186a9904b36af83aa3d053ee8d", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_jvm_external/5.3/MODULE.bazel": "bf93870767689637164657731849fb887ad086739bd5d360d90007a581d5527d", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/rules_jvm_external/6.1/MODULE.bazel": "75b5fec090dbd46cf9b7d8ea08cf84a0472d92ba3585b476f44c326eda8059c4", @@ -91,8 +92,8 @@ "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/upb/0.0.0-20220923-a547704/source.json": "f1ef7d3f9e0e26d4b23d1c39b5f5de71f584dd7d1b4ef83d9bbba6ec7a6a6459", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.2.12/MODULE.bazel": "3b1a8834ada2a883674be8cbd36ede1b6ec481477ada359cd2d3ddc562340b27", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3/MODULE.bazel": "6a9c02f19a24dcedb05572b2381446e27c272cd383aed11d41d99da9e3167a72", - "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3/source.json": "b6b43d0737af846022636e6e255fd4a96fee0d34f08f3830e6e0bac51465c37c" + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3.1.bcr.3/MODULE.bazel": "af322bc08976524477c79d1e45e241b6efbeb918c497e8840b8ab116802dda79", + "https://raw.githubusercontent.com/pjreiniger/bazel-central-registry/bzlmodrio/modules/zlib/1.3.1.bcr.3/source.json": "2be409ac3c7601245958cd4fcdff4288be79ed23bd690b4b951f500d54ee6e7d" }, "selectedYankedVersions": {}, "moduleExtensions": { @@ -144,7 +145,7 @@ "@@rules_bzlmodrio_toolchains~//:extensions.bzl%sh_configure": { "general": { "bzlTransitiveDigest": "j4O0iFZXZn73f671MC8nnNxQjAgGlUpgGlxBz+nI3Ks=", - "usagesDigest": "KICWImhyQI7s9EpJ8C0PiCIFZi0j2wtjrA8e/tajlEA=", + "usagesDigest": "RBlVaNI5Fi1NROynWhJLKM6Cw+BnO3zMR0SEwtL9fNc=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {},