Skip to content

Commit b9a927e

Browse files
add test for julia instal and mtime maintenance
1 parent 15b8728 commit b9a927e

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

.github/workflows/example-builds-defaultarch.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,18 @@ jobs:
4444
version: ${{ matrix.julia-version }}
4545
- run: julia --version
4646
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
47+
- name: "Check that the correct julia is used and that archive mtimes are maintained"
48+
run: |
49+
if !occursin("hostedtoolcache", Sys.BINDIR)
50+
error("the wrong julia is being used: $Sys.BINDIR")
51+
end
52+
shell: julia --startup-file=no --color=yes {0}
53+
- name: "Check that archive mtimes are maintained"
54+
run: |
55+
using MbedTLS_jll
56+
src = pkgdir(MbedTLS_jll, "src", "MbedTLS_jll.jl")
57+
# mtime is when it's compacted, ctime is when the file is extracted
58+
if !<(mtime(src), ctime(src))
59+
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
60+
end
61+
shell: julia --startup-file=no --color=yes {0}

.github/workflows/example-builds-nightly-defaultarch.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,15 @@ jobs:
4242
version: ${{ matrix.julia-version }}
4343
- run: julia --version
4444
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
45+
- name: "Check that the correct julia is used and that archive mtimes are maintained"
46+
run: |
47+
if !occursin("hostedtoolcache", Sys.BINDIR)
48+
error("the wrong julia is being used: $Sys.BINDIR")
49+
end
50+
using MbedTLS_jll
51+
src = pkgdir(MbedTLS_jll, "src", "MbedTLS_jll.jl")
52+
# mtime is when it's compacted, ctime is when the file is extracted
53+
if !<(mtime(src), ctime(src))
54+
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
55+
end
56+
shell: julia --startup-file=no --color=yes {0}

.github/workflows/example-builds-nightly.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,17 @@ jobs:
5050
arch: ${{ matrix.julia-arch }}
5151
- run: julia --version
5252
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
53+
- name: "Check that the correct julia is used"
54+
run: julia -e 'occursin("hostedtoolcache", Sys.BINDIR) || error()'
55+
- name: "Check that the correct julia is used and that archive mtimes are maintained"
56+
run: |
57+
if !occursin("hostedtoolcache", Sys.BINDIR)
58+
error("the wrong julia is being used: $Sys.BINDIR")
59+
end
60+
using MbedTLS_jll
61+
src = pkgdir(MbedTLS_jll, "src", "MbedTLS_jll.jl")
62+
# mtime is when it's compacted, ctime is when the file is extracted
63+
if !<(mtime(src), ctime(src))
64+
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
65+
end
66+
shell: julia --startup-file=no --color=yes {0}

.github/workflows/example-builds.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,15 @@ jobs:
5050
arch: ${{ matrix.julia-arch }}
5151
- run: julia --version
5252
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
53+
- name: "Check that the correct julia is used and that archive mtimes are maintained"
54+
run: |
55+
if !occursin("hostedtoolcache", Sys.BINDIR)
56+
error("the wrong julia is being used: $Sys.BINDIR")
57+
end
58+
using MbedTLS_jll
59+
src = pkgdir(MbedTLS_jll, "src", "MbedTLS_jll.jl")
60+
# mtime is when it's compacted, ctime is when the file is extracted
61+
if !<(mtime(src), ctime(src))
62+
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
63+
end
64+
shell: julia --startup-file=no --color=yes {0}

0 commit comments

Comments
 (0)