From 909f8e3111d2b135d6798ea3494ad9d41a7ec117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sun, 26 Oct 2025 19:35:09 +0000 Subject: [PATCH 01/19] Start preparing code for registration --- .ci/register_package.jl | 73 ++++++++----------- .github/workflows/build-reactant-reusable.yml | 49 ++++++++++++- .github/workflows/build-reactant.yml | 1 + 3 files changed, 77 insertions(+), 46 deletions(-) diff --git a/.ci/register_package.jl b/.ci/register_package.jl index 89be377..0d6b0f7 100644 --- a/.ci/register_package.jl +++ b/.ci/register_package.jl @@ -30,7 +30,7 @@ dependencies = Dependency[dep for dep in merged["dependencies"] if !(isa(dep, Bu lazy_artifacts = merged["lazy_artifacts"] augment_platform_block = merged["augment_platform_block"] build_version = BinaryBuilder.get_next_wrapper_version(name, version) -repo = "JuliaBinaryWrappers/$(name)_jll.jl" +repo = "EnzymeAD/$(name)_jll.jl" code_dir = joinpath(Pkg.devdir(), "$(name)_jll") julia_compat = merged["julia_compat"] @@ -54,17 +54,6 @@ function mvdir(src, dest) end end -function download_cached_binaries(download_dir) - NAME = ENV["NAME"] - PROJECT = ENV["PROJECT"] - artifacts = "$(PROJECT)/products/$(NAME)*.tar.*" - cmd = `buildkite-agent artifact download $artifacts $download_dir` - if !success(pipeline(cmd; stderr)) - error("Download failed") - end - mvdir(joinpath(download_dir, PROJECT, "products"), download_dir) -end - function download_binaries_from_release(download_dir) function do_download(download_dir, info) url = info["url"] @@ -96,42 +85,40 @@ for json_obj in [merged, objs_unmerged...] json_obj["dependencies"] = Dependency[dep for dep in json_obj["dependencies"] if BinaryBuilderBase.is_runtime_dependency(dep)] end skip_build = get(ENV, "SKIP_BUILD", "false") == "true" -mktempdir() do download_dir - # Grab the binaries for our package - if skip_build - # We only want to update the wrappers, so download the tarballs from the - # latest build. - download_binaries_from_release(download_dir) - else - # We are going to publish the new binaries we've just baked, take them - # out of the cache while they're hot. - download_cached_binaries(download_dir) - end - # Push up the JLL package (pointing to as-of-yet missing tarballs) - tag = "$(name)-v$(build_version)" - upload_prefix = "https://github.com/$(repo)/releases/download/$(tag)" +# binaries will be automatically placed in the `products/` subdir by the GitHub +# Actions workflow. +download_dir = joinpath(pwd(), "products") +# Grab the binaries for our package +if skip_build + # We only want to update the wrappers, so download the tarballs from the + # latest build. + download_binaries_from_release(download_dir) +end + +# Push up the JLL package (pointing to as-of-yet missing tarballs) +tag = "$(name)-v$(build_version)" +upload_prefix = "https://github.com/$(repo)/releases/download/$(tag)" - # If we didn't rebuild the tarballs, save the original Artifacts.toml - artifacts_toml = skip_build ? read(joinpath(code_dir, "Artifacts.toml"), String) : "" - # This loop over the unmerged objects necessary in the event that we have multiple packages being built by a single build_tarballs.jl - for (i,json_obj) in enumerate(objs_unmerged) - from_scratch = (i == 1) - BinaryBuilder.rebuild_jll_package(json_obj; download_dir, upload_prefix, verbose, from_scratch) - end +# If we didn't rebuild the tarballs, save the original Artifacts.toml +artifacts_toml = skip_build ? read(joinpath(code_dir, "Artifacts.toml"), String) : "" +# This loop over the unmerged objects necessary in the event that we have multiple packages being built by a single build_tarballs.jl +for (i,json_obj) in enumerate(objs_unmerged) + from_scratch = (i == 1) + BinaryBuilder.rebuild_jll_package(json_obj; download_dir, upload_prefix, verbose, from_scratch) +end - # Restore Artifacts.toml - if skip_build - write(joinpath(code_dir, "Artifacts.toml"), artifacts_toml) - end +# Restore Artifacts.toml +if skip_build + write(joinpath(code_dir, "Artifacts.toml"), artifacts_toml) +end - # Push JLL package _before_ uploading to GitHub releases, so that this version of the code is what gets tagged - BinaryBuilder.push_jll_package(name, build_version) +# Push JLL package _before_ uploading to GitHub releases, so that this version of the code is what gets tagged +BinaryBuilder.push_jll_package(name, build_version) - if !skip_build - # Upload the tarballs to GitHub releases - BinaryBuilder.upload_to_github_releases(repo, tag, download_dir; verbose=verbose) - end +if !skip_build + # Upload the tarballs to GitHub releases + BinaryBuilder.upload_to_github_releases(repo, tag, download_dir; verbose=verbose) end # Sub off to Registrator to create a PR to General. Note: it's important to pass both diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index c33225b..37e2587 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -2,6 +2,11 @@ name: "Build Reactant_jll" on: workflow_call: + secrets: + ENZYMEAD_BOT_ID: + required: true + ENZYMEAD_BOT_PRIVATE_KEY: + required: true inputs: julia_version: description: 'Julia version' @@ -212,10 +217,29 @@ jobs: needs: build-platforms steps: + - uses: actions/create-github-app-token@v2 + id: generate_token + with: + app-id: "${{ secrets.ENZYMEAD_BOT_ID }}" + private-key: "${{ secrets.ENZYMEAD_BOT_PRIVATE_KEY }}" - uses: actions/checkout@v5 with: repository: 'EnzymeAD/ReactantBuilder' ref: ${{ inputs.reactantbuilder_ref == '' && github.sha || inputs.reactantbuilder_ref }} + - name: Set JULIA_PROJECT + # We have to use `${GITHUB_WORKSPACE}` instead of `github.workspace` because GitHub + # is terrible and the two don't match inside containers: + # https://github.com/actions/runner/issues/2058 + run: + echo "JULIA_PROJECT=${GITHUB_WORKSPACE}/.ci" >> "${GITHUB_ENV}" + - name: Set and create PRODUCTS_DIR + # We have to use `${GITHUB_WORKSPACE}` instead of `github.workspace` because GitHub + # is terrible and the two don't match inside containers: + # https://github.com/actions/runner/issues/2058 + run: | + PRODUCTS_DIR=${{ inputs.build_project }}/products + mkdir -p "${PRODUCTS_DIR}" + echo "PRODUCTS_DIR=${PRODUCTS_DIR}" >> "${GITHUB_ENV}" - uses: julia-actions/setup-julia@v2 with: version: '${{ inputs.julia_version }}' @@ -225,13 +249,32 @@ jobs: - uses: actions/download-artifact@v6 with: merge-multiple: true + path: ${{ env.PRODUCTS_DIR }} - name: Change Reactant commit run: | if [[ -n "${{ inputs.reactant_commit }}" ]]; then echo 'Changing Reactant commit to ${{ inputs.reactant_commit }}...' sed -i 's/reactant_commit = ".*"/reactant_commit = "'${{ inputs.reactant_commit }}'"/' R/Reactant/build_tarballs.jl fi - - name: Check + - name: Set up git run: | - pwd - ls -lhrt + git config --global user.name "$enzymead-bot[bot]" + git config --global user.email "238314553+enzymead-bot[bot]@users.noreply.github.com" + - name: Instantiate environment + timeout-minutes: 20 + shell: julia --color=yes {0} + run: | + using Pkg + Pkg.instantiate() + - name: Generate meta.json + run: | + julia --compile=min ./build_tarballs.jl --meta-json=$(basename ${{ inputs.build_project }}).meta.json + working-directory: ${{ inputs.build_project }} + env: + GITHUB_TOKEN: + - name: Register + run: | + julia ${JULIA_PROJECT}/register_package.jl "$(basename ${{ inputs.build_project }}).meta.json" --verbose + working-directory: ${{ inputs.build_project }} + env: + GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} diff --git a/.github/workflows/build-reactant.yml b/.github/workflows/build-reactant.yml index fc097bb..71095ab 100644 --- a/.github/workflows/build-reactant.yml +++ b/.github/workflows/build-reactant.yml @@ -20,3 +20,4 @@ jobs: strategy: fail-fast: false uses: ./.github/workflows/build-reactant-reusable.yml + secrets: inherit From 21a45a805a2173c7c101dd2e445d128a6c61a0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Tue, 28 Oct 2025 22:52:51 +0000 Subject: [PATCH 02/19] DROP ME: skip all GPU platforms and debug builds --- R/Reactant/build_tarballs.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/Reactant/build_tarballs.jl b/R/Reactant/build_tarballs.jl index a3effb2..041d537 100644 --- a/R/Reactant/build_tarballs.jl +++ b/R/Reactant/build_tarballs.jl @@ -671,6 +671,9 @@ augment_platform_block=""" # for gpu in ("none", "cuda", "rocm"), mode in ("opt", "dbg"), platform in platforms for gpu in ("none", "cuda", "rocm"), mode in ("opt", "dbg"), cuda_version in ("none", "12.9", "13.0"), rocm_version in ("none", "7.1",), platform in platforms + if !Sys.islinux(platform) || gpu != "none" || mode != "opt" + continue + end augmented_platform = deepcopy(platform) augmented_platform["mode"] = mode From 7e5eb23ba713504d94d97b801603a408464a94bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= <765740+giordano@users.noreply.github.com> Date: Wed, 29 Oct 2025 23:04:44 +0000 Subject: [PATCH 03/19] Add deploy_repo argument to push_jll_package --- .ci/register_package.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/register_package.jl b/.ci/register_package.jl index 0d6b0f7..b105291 100644 --- a/.ci/register_package.jl +++ b/.ci/register_package.jl @@ -114,7 +114,7 @@ if skip_build end # Push JLL package _before_ uploading to GitHub releases, so that this version of the code is what gets tagged -BinaryBuilder.push_jll_package(name, build_version) +BinaryBuilder.push_jll_package(name, build_version; deploy_repo=repo) if !skip_build # Upload the tarballs to GitHub releases From cb4612af3a64d29376ba911143333b0600f5e3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 18:10:39 +0000 Subject: [PATCH 04/19] More colour --- .github/workflows/build-reactant-reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index 37e2587..3c286b6 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -268,13 +268,13 @@ jobs: Pkg.instantiate() - name: Generate meta.json run: | - julia --compile=min ./build_tarballs.jl --meta-json=$(basename ${{ inputs.build_project }}).meta.json + julia --color=yes --compile=min ./build_tarballs.jl --meta-json=$(basename ${{ inputs.build_project }}).meta.json working-directory: ${{ inputs.build_project }} env: GITHUB_TOKEN: - name: Register run: | - julia ${JULIA_PROJECT}/register_package.jl "$(basename ${{ inputs.build_project }}).meta.json" --verbose + julia --color=yes ${JULIA_PROJECT}/register_package.jl "$(basename ${{ inputs.build_project }}).meta.json" --verbose working-directory: ${{ inputs.build_project }} env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} From 268c0852aab4f3cdc66db5254d87b2d1fc43ea5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 18:51:50 +0000 Subject: [PATCH 05/19] DROP ME: debug --- .ci/Manifest.toml | 48 +++++++++---------- .github/workflows/build-reactant-reusable.yml | 1 + 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.ci/Manifest.toml b/.ci/Manifest.toml index 51480d8..1ea25ab 100644 --- a/.ci/Manifest.toml +++ b/.ci/Manifest.toml @@ -38,19 +38,19 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BinaryBuilder]] deps = ["ArgParse", "BinaryBuilderBase", "Binutils_jll", "Dates", "Downloads", "GitHub", "HTTP", "JLD2", "JSON", "LibGit2", "Libdl", "Logging", "LoggingExtras", "ObjectFile", "OutputCollectors", "Patchelf_jll", "Pkg", "PkgLicenses", "REPL", "Random", "Registrator", "RegistryTools", "SHA", "Scratch", "Sockets", "TOML", "UUIDs", "ghr_jll"] -git-tree-sha1 = "83b84cf0cee886d6be4f398382da760fc7c898b6" -repo-rev = "master" +git-tree-sha1 = "346e66c10cc2c17289d5a2036e677502b061e5ee" +repo-rev = "mg/debug" repo-url = "https://github.com/JuliaPackaging/BinaryBuilder.jl.git" uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae" version = "0.6.5" [[deps.BinaryBuilderBase]] deps = ["Bzip2_jll", "CodecZlib", "Downloads", "Gzip_jll", "HistoricalStdlibVersions", "InteractiveUtils", "JLLWrappers", "JSON", "LibGit2", "LibGit2_jll", "Libdl", "Logging", "OrderedCollections", "OutputCollectors", "Pkg", "Printf", "ProgressMeter", "REPL", "Random", "SHA", "Scratch", "SimpleBufferStream", "TOML", "Tar", "Tar_jll", "UUIDs", "XZ_jll", "Zstd_jll", "p7zip_jll", "pigz_jll", "unzip_jll"] -git-tree-sha1 = "d37350f8d8431a44261e29e37b4a4c1558ad121d" +git-tree-sha1 = "65d5431912c435f0f70e699e1af6f8f3f352fac1" repo-rev = "master" repo-url = "https://github.com/JuliaPackaging/BinaryBuilderBase.jl.git" uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e" -version = "1.41.0" +version = "1.42.0" [[deps.Binutils_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll", "Zstd_jll"] @@ -77,9 +77,9 @@ version = "0.7.8" [[deps.Compat]] deps = ["Dates", "LinearAlgebra", "TOML", "UUIDs"] -git-tree-sha1 = "0037835448781bb46feb39866934e243886d756a" +git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.18.0" +version = "4.18.1" [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] @@ -126,9 +126,9 @@ version = "0.1.10" [[deps.FileIO]] deps = ["Pkg", "Requires", "UUIDs"] -git-tree-sha1 = "b66970a70db13f45b7e57fbda1736e1cf72174ea" +git-tree-sha1 = "d60eb76f37d7e5a40cc2e7c36974d864b82dc802" uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -version = "1.17.0" +version = "1.17.1" [[deps.FileWatching]] uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" @@ -153,9 +153,9 @@ version = "1.14.0+0" [[deps.HTTP]] deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "ed5e9c58612c4e081aecdb6e1a479e18462e041e" +git-tree-sha1 = "5e6fe50ae7f23d171f44e311c2960294aaa0beb5" uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.17" +version = "1.10.19" [[deps.Hiccup]] deps = ["MacroTools", "Test"] @@ -252,9 +252,9 @@ uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" [[deps.LoggingExtras]] deps = ["Dates", "Logging"] -git-tree-sha1 = "f02b56007b064fbfddb4c9cd60161b6dd0f40df3" +git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" -version = "1.1.0" +version = "1.2.0" [[deps.Lz4_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -319,16 +319,16 @@ deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" [[deps.OpenSSL]] -deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "f1a7e086c677df53e064e0fdd2c9d0b0833e3f6e" +deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "NetworkOptions", "OpenSSL_jll", "Sockets"] +git-tree-sha1 = "386b47442468acfb1add94bf2d85365dea10cbab" uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.5.0" +version = "1.6.0" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "2ae7d4ddec2e13ad3bddf5c0796f7547cf682391" +git-tree-sha1 = "f19301ae653233bc88b1810ae908194f07f8db9d" uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" -version = "3.5.2+0" +version = "3.5.4+0" [[deps.OrderedCollections]] git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" @@ -513,9 +513,9 @@ version = "0.3.0" [[deps.TimeZones]] deps = ["Artifacts", "Dates", "Downloads", "InlineStrings", "Mocking", "Printf", "RecipesBase", "Scratch", "TZJData", "Unicode", "p7zip_jll"] -git-tree-sha1 = "1f9a3f379a2ce2a213a0f606895567a08a1a2d08" +git-tree-sha1 = "06f4f1f3e8ff09e42e59b043a747332e88e01aba" uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53" -version = "1.22.0" +version = "1.22.1" [[deps.TranscodingStreams]] git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" @@ -541,10 +541,10 @@ uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" version = "5.8.1+0" [[deps.ZMQ]] -deps = ["FileWatching", "PrecompileTools", "Sockets", "ZeroMQ_jll"] -git-tree-sha1 = "2d060e1f014c07561817bf6f3c0eb66b309e04bd" +deps = ["FileWatching", "PrecompileTools", "Printf", "Sockets", "ZeroMQ_jll"] +git-tree-sha1 = "5f1c7008e2258c61af0eafef8c1f536b9fffbbd2" uuid = "c2297ded-f4af-51ae-bb23-16f91089e4e1" -version = "1.4.1" +version = "1.5.1" [[deps.ZeroMQ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "libsodium_jll"] @@ -600,6 +600,6 @@ version = "4.7.2+0" [[deps.unzip_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "5d543463432c2e25027d88f5a314d40d44488391" +git-tree-sha1 = "0cd79af876ba6b5f93229d0e2c5455fcdd9930f7" uuid = "88f77b66-78eb-5ed0-bc16-ebba0796830d" -version = "6.0.2+0" +version = "6.0.3+0" diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index 3c286b6..a787f02 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -278,3 +278,4 @@ jobs: working-directory: ${{ inputs.build_project }} env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} + JULIA_DEBUG: BinaryBuilder From 8f12dd636cfb02a2285cea70882f744a47efbd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 19:32:01 +0000 Subject: [PATCH 06/19] DROP ME: test hello world --- .github/workflows/build-reactant-reusable.yml | 2 +- H/HelloWorldC/build_tarballs.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index a787f02..a458c3e 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -22,7 +22,7 @@ on: description: 'The project to build' required: false type: string - default: 'R/Reactant' + default: 'H/HelloWorldC' reactantbuilder_ref: description: 'The Git ref of EnzymeAD/ReactantBuilder to check out (leave empty to use the default)' required: false diff --git a/H/HelloWorldC/build_tarballs.jl b/H/HelloWorldC/build_tarballs.jl index 465df71..27ee8ac 100644 --- a/H/HelloWorldC/build_tarballs.jl +++ b/H/HelloWorldC/build_tarballs.jl @@ -23,7 +23,7 @@ install_license /usr/share/licenses/MIT # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -platforms = supported_platforms(; exclude=p->arch(p)=="riscv64") +platforms = supported_platforms(; exclude=p->arch(p)=="riscv64")[1:2] # The products that we will ensure are always built products = [ From a7b4ac22190840ed0a3a735d25c2f224bfc741a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 20:04:14 +0000 Subject: [PATCH 07/19] Save cache --- .github/workflows/build-reactant-reusable.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index a458c3e..0b88fcc 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -279,3 +279,11 @@ jobs: env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} JULIA_DEBUG: BinaryBuilder + - name: Save Julia depot cache on cancel or failure + id: julia-cache-save + if: cancelled() || failure() + uses: actions/cache/save@v4 + with: + path: | + ${{ steps.julia-cache.outputs.cache-paths }} + key: ${{ steps.julia-cache.outputs.cache-key }} From af01815574943fef36df716bd990eddf7813d317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 23:08:57 +0000 Subject: [PATCH 08/19] Set repositories for the app --- .github/workflows/build-reactant-reusable.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index 0b88fcc..f959a66 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -222,6 +222,12 @@ jobs: with: app-id: "${{ secrets.ENZYMEAD_BOT_ID }}" private-key: "${{ secrets.ENZYMEAD_BOT_PRIVATE_KEY }}" + owner: EnzymeAD + repositories: | + Reactant_jll.jl + HelloWorldC_jll.jl + ReactantBuilder + General - uses: actions/checkout@v5 with: repository: 'EnzymeAD/ReactantBuilder' From 80fbadedf75bd3635e7a4b5ad4ccfdcb9623cc67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 7 Nov 2025 23:31:43 +0000 Subject: [PATCH 09/19] Decouple upstream registry and its fork during registration --- .ci/Manifest.toml | 2 +- .ci/Project.toml | 14 ++++++++++---- .ci/register_package.jl | 16 ++++++++++++++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.ci/Manifest.toml b/.ci/Manifest.toml index 1ea25ab..8659595 100644 --- a/.ci/Manifest.toml +++ b/.ci/Manifest.toml @@ -38,7 +38,7 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BinaryBuilder]] deps = ["ArgParse", "BinaryBuilderBase", "Binutils_jll", "Dates", "Downloads", "GitHub", "HTTP", "JLD2", "JSON", "LibGit2", "Libdl", "Logging", "LoggingExtras", "ObjectFile", "OutputCollectors", "Patchelf_jll", "Pkg", "PkgLicenses", "REPL", "Random", "Registrator", "RegistryTools", "SHA", "Scratch", "Sockets", "TOML", "UUIDs", "ghr_jll"] -git-tree-sha1 = "346e66c10cc2c17289d5a2036e677502b061e5ee" +git-tree-sha1 = "199e2279812c43eada98939d28c00df559d0f38f" repo-rev = "mg/debug" repo-url = "https://github.com/JuliaPackaging/BinaryBuilder.jl.git" uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae" diff --git a/.ci/Project.toml b/.ci/Project.toml index 2b9b041..431e84b 100644 --- a/.ci/Project.toml +++ b/.ci/Project.toml @@ -3,6 +3,7 @@ BinaryBuilder = "12aac903-9f7c-5d81-afc2-d9565ea332ae" BinaryBuilderBase = "7f725544-6523-48cd-82d1-3fa08ff4056e" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +GitHub = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26" HistoricalStdlibVersions = "6df8b67a-e8a0-4029-b4b7-ac196fe72102" JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -12,10 +13,15 @@ TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533" squashfs_tools_jll = "eed32e3e-a7c5-5bf9-9121-5cf3ab653887" -[sources] -BinaryBuilder = {rev = "master", url = "https://github.com/JuliaPackaging/BinaryBuilder.jl.git"} -BinaryBuilderBase = {rev = "master", url = "https://github.com/JuliaPackaging/BinaryBuilderBase.jl.git"} - [compat] +GitHub = "5" HistoricalStdlibVersions = "=2.0.2" ghr_jll = "0.14.0" + +[sources.BinaryBuilder] +rev = "master" +url = "https://github.com/JuliaPackaging/BinaryBuilder.jl.git" + +[sources.BinaryBuilderBase] +rev = "master" +url = "https://github.com/JuliaPackaging/BinaryBuilderBase.jl.git" diff --git a/.ci/register_package.jl b/.ci/register_package.jl index b105291..1020686 100644 --- a/.ci/register_package.jl +++ b/.ci/register_package.jl @@ -1,4 +1,5 @@ -using BinaryBuilder, BinaryBuilderBase, Downloads, Pkg +using BinaryBuilder, BinaryBuilder.Wizard, BinaryBuilderBase, Downloads, Pkg +import GitHub: gh_get_json, DEFAULT_API # FIXME: Golang auto-upgrades to HTTP2, this can cause issue like https://github.com/google/go-github/issues/2113 ENV["GODEBUG"] = "http2client=0" @@ -123,4 +124,15 @@ end # Sub off to Registrator to create a PR to General. Note: it's important to pass both # `augment_platform_block` and `lazy_artifacts` to build the right Project dictionary -BinaryBuilder.register_jll(name, build_version, dependencies, julia_compat; augment_platform_block, lazy_artifacts) +gh_auth = Wizard.github_auth(;allow_anonymous=false) +gh_username = "enzymead-bot[bot]" +registry_url = "https://github.com/JuliaRegistries/General" +registry_fork_url = "https://$(gh_username):$(gh_auth.token)@github.com/EnzymeAD/General" +BinaryBuilder.register_jll(name, build_version, dependencies, julia_compat; + augment_platform_block, + lazy_artifacts, + gh_auth, + gh_username, + registry_url, + registry_fork_url, + ) From 8b834bacbb0e661372585b5133ccfc056732b660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sat, 8 Nov 2025 00:27:20 +0000 Subject: [PATCH 10/19] Use different token for registration PR --- .ci/Manifest.toml | 2 +- .ci/register_package.jl | 4 +++- .github/workflows/build-reactant-reusable.yml | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.ci/Manifest.toml b/.ci/Manifest.toml index 8659595..bd35552 100644 --- a/.ci/Manifest.toml +++ b/.ci/Manifest.toml @@ -38,7 +38,7 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BinaryBuilder]] deps = ["ArgParse", "BinaryBuilderBase", "Binutils_jll", "Dates", "Downloads", "GitHub", "HTTP", "JLD2", "JSON", "LibGit2", "Libdl", "Logging", "LoggingExtras", "ObjectFile", "OutputCollectors", "Patchelf_jll", "Pkg", "PkgLicenses", "REPL", "Random", "Registrator", "RegistryTools", "SHA", "Scratch", "Sockets", "TOML", "UUIDs", "ghr_jll"] -git-tree-sha1 = "199e2279812c43eada98939d28c00df559d0f38f" +git-tree-sha1 = "e1553dbc9014eaec881e79530a206358ab092c1d" repo-rev = "mg/debug" repo-url = "https://github.com/JuliaPackaging/BinaryBuilder.jl.git" uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae" diff --git a/.ci/register_package.jl b/.ci/register_package.jl index 1020686..4b5dfea 100644 --- a/.ci/register_package.jl +++ b/.ci/register_package.jl @@ -1,5 +1,5 @@ using BinaryBuilder, BinaryBuilder.Wizard, BinaryBuilderBase, Downloads, Pkg -import GitHub: gh_get_json, DEFAULT_API +using GitHub: authenticate, gh_get_json, DEFAULT_API # FIXME: Golang auto-upgrades to HTTP2, this can cause issue like https://github.com/google/go-github/issues/2113 ENV["GODEBUG"] = "http2client=0" @@ -128,6 +128,7 @@ gh_auth = Wizard.github_auth(;allow_anonymous=false) gh_username = "enzymead-bot[bot]" registry_url = "https://github.com/JuliaRegistries/General" registry_fork_url = "https://$(gh_username):$(gh_auth.token)@github.com/EnzymeAD/General" +gh_auth_pr = authenticate(ENV["JLBUILD_GITHUB_TOKEN"]) BinaryBuilder.register_jll(name, build_version, dependencies, julia_compat; augment_platform_block, lazy_artifacts, @@ -135,4 +136,5 @@ BinaryBuilder.register_jll(name, build_version, dependencies, julia_compat; gh_username, registry_url, registry_fork_url, + gh_auth_pr, ) diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index f959a66..202d69c 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -284,6 +284,7 @@ jobs: working-directory: ${{ inputs.build_project }} env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} + JLBUILD_GITHUB_TOKEN: ${{ secrets.JLBUILD_GITHUB_TOKEN }} JULIA_DEBUG: BinaryBuilder - name: Save Julia depot cache on cancel or failure id: julia-cache-save From 28077e8865636739ecfc5adf0d838d070d5afd1b Mon Sep 17 00:00:00 2001 From: William Moses Date: Sun, 9 Nov 2025 14:40:15 -0600 Subject: [PATCH 11/19] Update Manifest.toml --- .ci/Manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/Manifest.toml b/.ci/Manifest.toml index bd35552..968fd3e 100644 --- a/.ci/Manifest.toml +++ b/.ci/Manifest.toml @@ -38,7 +38,7 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BinaryBuilder]] deps = ["ArgParse", "BinaryBuilderBase", "Binutils_jll", "Dates", "Downloads", "GitHub", "HTTP", "JLD2", "JSON", "LibGit2", "Libdl", "Logging", "LoggingExtras", "ObjectFile", "OutputCollectors", "Patchelf_jll", "Pkg", "PkgLicenses", "REPL", "Random", "Registrator", "RegistryTools", "SHA", "Scratch", "Sockets", "TOML", "UUIDs", "ghr_jll"] -git-tree-sha1 = "e1553dbc9014eaec881e79530a206358ab092c1d" +git-tree-sha1 = "ae9bd5d5114a2eb0c0277418fd8e6906131354e8" repo-rev = "mg/debug" repo-url = "https://github.com/JuliaPackaging/BinaryBuilder.jl.git" uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae" From aba40af6f3d06fbe061a367647b266d4d161cdf4 Mon Sep 17 00:00:00 2001 From: William Moses Date: Sun, 9 Nov 2025 14:47:24 -0600 Subject: [PATCH 12/19] Fix registry URL authentication in register_package.jl --- .ci/register_package.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/register_package.jl b/.ci/register_package.jl index 4b5dfea..75bf29c 100644 --- a/.ci/register_package.jl +++ b/.ci/register_package.jl @@ -130,6 +130,7 @@ registry_url = "https://github.com/JuliaRegistries/General" registry_fork_url = "https://$(gh_username):$(gh_auth.token)@github.com/EnzymeAD/General" gh_auth_pr = authenticate(ENV["JLBUILD_GITHUB_TOKEN"]) BinaryBuilder.register_jll(name, build_version, dependencies, julia_compat; + deploy_repo=repo, augment_platform_block, lazy_artifacts, gh_auth, From 3701cda579d206613816dfaa1edc3224a8e213d3 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 9 Nov 2025 15:12:28 -0600 Subject: [PATCH 13/19] hello world c2 --- H/{HelloWorldC => HelloWorldC2}/build_tarballs.jl | 2 +- H/{HelloWorldC => HelloWorldC2}/bundled/CMakeLists.txt | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename H/{HelloWorldC => HelloWorldC2}/build_tarballs.jl (98%) rename H/{HelloWorldC => HelloWorldC2}/bundled/CMakeLists.txt (100%) diff --git a/H/HelloWorldC/build_tarballs.jl b/H/HelloWorldC2/build_tarballs.jl similarity index 98% rename from H/HelloWorldC/build_tarballs.jl rename to H/HelloWorldC2/build_tarballs.jl index 27ee8ac..7e1612d 100644 --- a/H/HelloWorldC/build_tarballs.jl +++ b/H/HelloWorldC2/build_tarballs.jl @@ -1,6 +1,6 @@ using BinaryBuilder -name = "HelloWorldC" +name = "HelloWorldC2" version = v"1.4.1" # No sources, we're just building the testsuite diff --git a/H/HelloWorldC/bundled/CMakeLists.txt b/H/HelloWorldC2/bundled/CMakeLists.txt similarity index 100% rename from H/HelloWorldC/bundled/CMakeLists.txt rename to H/HelloWorldC2/bundled/CMakeLists.txt From ac584fd4a7ce77f804d2c3318a8e0e885da90ea1 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 9 Nov 2025 15:14:35 -0600 Subject: [PATCH 14/19] fix --- .github/workflows/build-reactant-reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index 202d69c..52c3d07 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -22,7 +22,7 @@ on: description: 'The project to build' required: false type: string - default: 'H/HelloWorldC' + default: 'H/HelloWorldC2' reactantbuilder_ref: description: 'The Git ref of EnzymeAD/ReactantBuilder to check out (leave empty to use the default)' required: false From a5ecc71e223f42d77c9fe1666704dfa9a91bb147 Mon Sep 17 00:00:00 2001 From: William Moses Date: Sun, 9 Nov 2025 15:23:41 -0600 Subject: [PATCH 15/19] Update build_tarballs.jl --- H/HelloWorldC2/build_tarballs.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/H/HelloWorldC2/build_tarballs.jl b/H/HelloWorldC2/build_tarballs.jl index 7e1612d..0604595 100644 --- a/H/HelloWorldC2/build_tarballs.jl +++ b/H/HelloWorldC2/build_tarballs.jl @@ -28,7 +28,6 @@ platforms = supported_platforms(; exclude=p->arch(p)=="riscv64")[1:2] # The products that we will ensure are always built products = [ ExecutableProduct("hello_world", :hello_world), - # This ExecutableProduct is used in tests that change one of the paths ExecutableProduct("hello_world", :hello_world_doppelganger), ] From 0a98281b1e7efa036db156583ce43cceff1f6fb0 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 9 Nov 2025 15:37:16 -0600 Subject: [PATCH 16/19] fix --- .github/workflows/build-reactant-reusable.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index 52c3d07..a87a5d3 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -226,6 +226,7 @@ jobs: repositories: | Reactant_jll.jl HelloWorldC_jll.jl + HelloWorldC2_jll.jl ReactantBuilder General - uses: actions/checkout@v5 From 0e55e558cf07a9689eb2fea77e8be22a31a7b722 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 9 Nov 2025 15:43:31 -0600 Subject: [PATCH 17/19] 1.0 baby --- H/HelloWorldC2/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/H/HelloWorldC2/build_tarballs.jl b/H/HelloWorldC2/build_tarballs.jl index 0604595..ad187f1 100644 --- a/H/HelloWorldC2/build_tarballs.jl +++ b/H/HelloWorldC2/build_tarballs.jl @@ -1,7 +1,7 @@ using BinaryBuilder name = "HelloWorldC2" -version = v"1.4.1" +version = v"1.0.0" # No sources, we're just building the testsuite sources = [ From 71849f7f0d20b2a892cf6af109dc88eed7b1bb29 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Sun, 9 Nov 2025 15:52:00 -0600 Subject: [PATCH 18/19] fix --- .ci/Manifest.toml | 2 +- .ci/register_package.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/Manifest.toml b/.ci/Manifest.toml index 968fd3e..2472686 100644 --- a/.ci/Manifest.toml +++ b/.ci/Manifest.toml @@ -38,7 +38,7 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BinaryBuilder]] deps = ["ArgParse", "BinaryBuilderBase", "Binutils_jll", "Dates", "Downloads", "GitHub", "HTTP", "JLD2", "JSON", "LibGit2", "Libdl", "Logging", "LoggingExtras", "ObjectFile", "OutputCollectors", "Patchelf_jll", "Pkg", "PkgLicenses", "REPL", "Random", "Registrator", "RegistryTools", "SHA", "Scratch", "Sockets", "TOML", "UUIDs", "ghr_jll"] -git-tree-sha1 = "ae9bd5d5114a2eb0c0277418fd8e6906131354e8" +git-tree-sha1 = "a2329cfcb49f6ab2915b1ef846fcceed1d2a7f6a" repo-rev = "mg/debug" repo-url = "https://github.com/JuliaPackaging/BinaryBuilder.jl.git" uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae" diff --git a/.ci/register_package.jl b/.ci/register_package.jl index 75bf29c..0147404 100644 --- a/.ci/register_package.jl +++ b/.ci/register_package.jl @@ -127,6 +127,7 @@ end gh_auth = Wizard.github_auth(;allow_anonymous=false) gh_username = "enzymead-bot[bot]" registry_url = "https://github.com/JuliaRegistries/General" +registry_fork_org = "EnzymeAD" registry_fork_url = "https://$(gh_username):$(gh_auth.token)@github.com/EnzymeAD/General" gh_auth_pr = authenticate(ENV["JLBUILD_GITHUB_TOKEN"]) BinaryBuilder.register_jll(name, build_version, dependencies, julia_compat; @@ -137,5 +138,6 @@ BinaryBuilder.register_jll(name, build_version, dependencies, julia_compat; gh_username, registry_url, registry_fork_url, + registry_fork_org, gh_auth_pr, ) From 8cfe8afc382548cc4998c6fa0c3f1b382c4a1464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Mon, 10 Nov 2025 23:06:50 +0000 Subject: [PATCH 19/19] Finalise everything and bump Reactant commit & version --- .ci/Manifest.toml | 4 ++-- .github/workflows/build-reactant-reusable.yml | 3 +-- R/Reactant/build_tarballs.jl | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.ci/Manifest.toml b/.ci/Manifest.toml index 2472686..73b04da 100644 --- a/.ci/Manifest.toml +++ b/.ci/Manifest.toml @@ -38,8 +38,8 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" [[deps.BinaryBuilder]] deps = ["ArgParse", "BinaryBuilderBase", "Binutils_jll", "Dates", "Downloads", "GitHub", "HTTP", "JLD2", "JSON", "LibGit2", "Libdl", "Logging", "LoggingExtras", "ObjectFile", "OutputCollectors", "Patchelf_jll", "Pkg", "PkgLicenses", "REPL", "Random", "Registrator", "RegistryTools", "SHA", "Scratch", "Sockets", "TOML", "UUIDs", "ghr_jll"] -git-tree-sha1 = "a2329cfcb49f6ab2915b1ef846fcceed1d2a7f6a" -repo-rev = "mg/debug" +git-tree-sha1 = "5caeb4f25ead6a04742d9d3140c8d699ceea1fe3" +repo-rev = "master" repo-url = "https://github.com/JuliaPackaging/BinaryBuilder.jl.git" uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae" version = "0.6.5" diff --git a/.github/workflows/build-reactant-reusable.yml b/.github/workflows/build-reactant-reusable.yml index a87a5d3..2ebafea 100644 --- a/.github/workflows/build-reactant-reusable.yml +++ b/.github/workflows/build-reactant-reusable.yml @@ -22,7 +22,7 @@ on: description: 'The project to build' required: false type: string - default: 'H/HelloWorldC2' + default: 'R/Reactant' reactantbuilder_ref: description: 'The Git ref of EnzymeAD/ReactantBuilder to check out (leave empty to use the default)' required: false @@ -286,7 +286,6 @@ jobs: env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} JLBUILD_GITHUB_TOKEN: ${{ secrets.JLBUILD_GITHUB_TOKEN }} - JULIA_DEBUG: BinaryBuilder - name: Save Julia depot cache on cancel or failure id: julia-cache-save if: cancelled() || failure() diff --git a/R/Reactant/build_tarballs.jl b/R/Reactant/build_tarballs.jl index 041d537..f33a5eb 100644 --- a/R/Reactant/build_tarballs.jl +++ b/R/Reactant/build_tarballs.jl @@ -6,8 +6,8 @@ include(joinpath(YGGDRASIL_DIR, "fancy_toys.jl")) name = "Reactant" repo = "https://github.com/EnzymeAD/Reactant.jl.git" -reactant_commit = "e2f5c8c8c77f0f936d856486e4dd207161f81bf7" -version = v"0.0.257" +reactant_commit = "78cf63e4fe20446b16cd7c36db34caaa5175ecc4" +version = v"0.0.260" sources = [ GitSource(repo, reactant_commit), @@ -463,6 +463,9 @@ if [[ "${bb_full_target}" == *gpu+rocm* ]]; then find bazel-bin find ${libdir} + install -Dvm 755 \ + $ROCM_PATH/lib/rocm_sysdeps/lib/librocm_sysdeps_dw.so* \ + -t ${libdir}/rocm_sysdeps/lib install -Dvm 755 \ $ROCM_PATH/lib/rocm_sysdeps/lib/librocm_sysdeps_numa.so* \ @@ -671,9 +674,6 @@ augment_platform_block=""" # for gpu in ("none", "cuda", "rocm"), mode in ("opt", "dbg"), platform in platforms for gpu in ("none", "cuda", "rocm"), mode in ("opt", "dbg"), cuda_version in ("none", "12.9", "13.0"), rocm_version in ("none", "7.1",), platform in platforms - if !Sys.islinux(platform) || gpu != "none" || mode != "opt" - continue - end augmented_platform = deepcopy(platform) augmented_platform["mode"] = mode