Skip to content

Initial PR-based artifact update workflow #45

Initial PR-based artifact update workflow

Initial PR-based artifact update workflow #45

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
tags: ["*"]
concurrency:
# Skip intermediate builds: on all builds except on the "main" branch.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.run_number || 0 }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
prerelease:
runs-on: ubuntu-latest
outputs:
key: ${{ steps.key.outputs.key }}
steps:
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
modified_artifacts_toml:
- Artifacts.toml
- uses: actions/checkout@v4
if: ${{ steps.filter.outputs.modified_artifacts_toml == 'true' }}
- name: Check for unpublished artifact
if: ${{ steps.filter.outputs.modified_artifacts_toml == 'true' }}
id: key
shell: julia --color=yes {0}
run: |
include(joinpath(pwd(), "gen", "artifacts.jl"))
key = gh_artifact_key()
open(ENV["GITHUB_OUTPUT"], "a") do io
println(io, "key=$key")
end
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
needs: prerelease
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
matrix:
version:
- "1.6" # LTS / Oldest supported version
- "1" # Latest release
- "nightly"
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v3
- uses: dawidd6/action-download-artifact@v3
if: ${{ needs.prerelease.outputs.key }}
id: action-artifact
with:
workflow: Build.yaml
name: ${{ needs.prerelease.outputs.key }}
- shell: julia --color=yes {0}
run: |
open(joinpath(first(Base.DEPOT_PATH), "artifacts", "Overrides.toml"), "w") do io
println(io, "[dc5dba14-91b3-4cab-a142-028a31da12f7]")
println(io, "tzjdata = "$(pwd)/${{ needs.prerelease.outputs.key }}")
end
- run: |
ls -la ${{ needs.prerelease.outputs.key }}
cat ~/.julia/artifacts/Overrides.toml
- 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