Skip to content

Commit

Permalink
add test for julia install and mtime maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jan 4, 2024
1 parent 15b8728 commit 86e3f12
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/example-builds-defaultarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,17 @@ jobs:
version: ${{ matrix.julia-version }}
- run: julia --version
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
- name: "Check that the correct julia is used and that archive mtimes are maintained"
run: |
if !occursin("hostedtoolcache", Sys.BINDIR)
error("the wrong julia is being used: $Sys.BINDIR")
end
if VERSION > v"1.7.0-0" # pkgdir was introduced here, and before then mtime wasn't a problem so just skip
using Pkg
src = pkgdir(Pkg, "src", "Pkg.jl")
# mtime is when it's compacted, ctime is when the file is extracted
if !<(mtime(src), ctime(src))
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
end
end
shell: julia --startup-file=no --color=yes {0}
14 changes: 14 additions & 0 deletions .github/workflows/example-builds-nightly-defaultarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,17 @@ jobs:
version: ${{ matrix.julia-version }}
- run: julia --version
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
- name: "Check that the correct julia is used and that archive mtimes are maintained"
run: |
if !occursin("hostedtoolcache", Sys.BINDIR)
error("the wrong julia is being used: $Sys.BINDIR")
end
if VERSION > v"1.7.0-0" # pkgdir was introduced here, and before then mtime wasn't a problem so just skip
using Pkg
src = pkgdir(Pkg, "src", "Pkg.jl")
# mtime is when it's compacted, ctime is when the file is extracted
if !<(mtime(src), ctime(src))
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
end
end
shell: julia --startup-file=no --color=yes {0}
16 changes: 16 additions & 0 deletions .github/workflows/example-builds-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,19 @@ jobs:
arch: ${{ matrix.julia-arch }}
- run: julia --version
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
- name: "Check that the correct julia is used"
run: julia -e 'occursin("hostedtoolcache", Sys.BINDIR) || error()'
- name: "Check that the correct julia is used and that archive mtimes are maintained"
run: |
if !occursin("hostedtoolcache", Sys.BINDIR)
error("the wrong julia is being used: $Sys.BINDIR")
end
if VERSION > v"1.7.0-0" # pkgdir was introduced here, and before then mtime wasn't a problem so just skip
using Pkg
src = pkgdir(Pkg, "src", "Pkg.jl")
# mtime is when it's compacted, ctime is when the file is extracted
if !<(mtime(src), ctime(src))
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
end
end
shell: julia --startup-file=no --color=yes {0}
14 changes: 14 additions & 0 deletions .github/workflows/example-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,17 @@ jobs:
arch: ${{ matrix.julia-arch }}
- run: julia --version
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
- name: "Check that the correct julia is used and that archive mtimes are maintained"
run: |
if !occursin("hostedtoolcache", Sys.BINDIR)
error("the wrong julia is being used: $Sys.BINDIR")
end
if VERSION > v"1.7.0-0" # pkgdir was introduced here, and before then mtime wasn't a problem so just skip
using Pkg
src = pkgdir(Pkg, "src", "Pkg.jl")
# mtime is when it's compacted, ctime is when the file is extracted
if !<(mtime(src), ctime(src))
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
end
end
shell: julia --startup-file=no --color=yes {0}

0 comments on commit 86e3f12

Please sign in to comment.