From 05d4cb2af08daa9e0218ba14d9b8bc21ff4b2338 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Sun, 28 Jan 2024 00:20:49 -0600 Subject: [PATCH] Iterating --- .github/workflows/CI.yml | 14 +++++++++++--- gen/artifacts.jl | 8 ++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c753659..7e14d06 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,6 +15,7 @@ jobs: runs-on: ubuntu-latest outputs: key: ${{ steps.key.outputs.key }} + tarball_filename: ${{ steps.key.outputs.tarball_filename }} steps: - uses: dorny/paths-filter@v3 id: filter @@ -30,9 +31,10 @@ jobs: shell: julia --color=yes {0} run: | include(joinpath(pwd(), "gen", "artifacts.jl")) - key = gh_artifact_key() + (; key, tarball_filename) = gh_artifact() open(ENV["GITHUB_OUTPUT"], "a") do io println(io, "key=$key") + println(io, "tarball_filename=$tarball_filename") end test: @@ -59,18 +61,21 @@ jobs: with: workflow: Build.yaml name: ${{ needs.prerelease.outputs.key }} + - run: | + tar xvf ${{ needs.prerelease.outputs.tarball_filename }} + ls -la - shell: julia --color=yes {0} run: | artifacts_overrides_toml = joinpath(first(Base.DEPOT_PATH), "artifacts", "Overrides.toml") mkpath(dirname(artifacts_overrides_toml)) open(artifacts_overrides_toml, "w") do io println(io, "[dc5dba14-91b3-4cab-a142-028a31da12f7]") - println(io, "tzjdata = \"$(pwd)/${{ needs.prerelease.outputs.key }}\"") + println(io, "tzjdata = \"$(pwd())/${{ needs.prerelease.outputs.tarball_filename }}\"") end - run: | ls -la cat ~/.julia/artifacts/Overrides.toml - ls -la ${{ needs.prerelease.outputs.key }} + ls -la ${{ needs.prerelease.outputs.tarball_filename }} - uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.version }} @@ -78,3 +83,6 @@ jobs: - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + + +tzjfile-v1-tzdata2023d.tar.gz-ff06bf7c19783925eff4430f1571c5cf81bf9232240dd2ee98d8a66987612f24 \ No newline at end of file diff --git a/gen/artifacts.jl b/gen/artifacts.jl index e546876..14f5eee 100644 --- a/gen/artifacts.jl +++ b/gen/artifacts.jl @@ -2,12 +2,16 @@ using TOML: TOML const PKG_ROOT = joinpath(@__DIR__(), "..") -function gh_artifact_key(artifact_toml=joinpath(PKG_ROOT, "Artifacts.toml")) +function gh_artifact(artifact_toml=joinpath(PKG_ROOT, "Artifacts.toml")) toml = TOML.parsefile(artifact_toml) tarball_artifact = only(toml["tzjdata"]["download"]) tarball_filename = basename(tarball_artifact["url"]) tarball_sha256 = tarball_artifact["sha256"] key = "$(tarball_filename)-$(tarball_sha256)" - return key + return (; + tarball_filename, + tarball_sha256, + key, + ) end