Skip to content

Commit

Permalink
Iterating
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Jan 28, 2024
1 parent 185508a commit 05d4cb2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -59,22 +61,28 @@ 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 }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1


tzjfile-v1-tzdata2023d.tar.gz-ff06bf7c19783925eff4430f1571c5cf81bf9232240dd2ee98d8a66987612f24
8 changes: 6 additions & 2 deletions gen/artifacts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 05d4cb2

Please sign in to comment.