mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 02:56:54 +08:00
add test for julia install and mtime maintenance (#200)
This commit is contained in:
11
.github/scripts/common-tests.jl
vendored
Normal file
11
.github/scripts/common-tests.jl
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
if !occursin("hostedtoolcache", Sys.BINDIR)
|
||||||
|
error("the wrong julia is being used: $(Sys.BINDIR)")
|
||||||
|
end
|
||||||
|
if VERSION >= v"1.7.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 compressed, 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
|
||||||
@@ -44,3 +44,5 @@ jobs:
|
|||||||
version: ${{ matrix.julia-version }}
|
version: ${{ matrix.julia-version }}
|
||||||
- run: julia --version
|
- run: julia --version
|
||||||
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
|
- 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: julia --startup-file=no --color=yes ./.github/scripts/common-tests.jl
|
||||||
|
|||||||
@@ -42,3 +42,5 @@ jobs:
|
|||||||
version: ${{ matrix.julia-version }}
|
version: ${{ matrix.julia-version }}
|
||||||
- run: julia --version
|
- run: julia --version
|
||||||
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
|
- 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: julia --startup-file=no --color=yes ./.github/scripts/common-tests.jl
|
||||||
|
|||||||
2
.github/workflows/example-builds-nightly.yml
vendored
2
.github/workflows/example-builds-nightly.yml
vendored
@@ -50,3 +50,5 @@ jobs:
|
|||||||
arch: ${{ matrix.julia-arch }}
|
arch: ${{ matrix.julia-arch }}
|
||||||
- run: julia --version
|
- run: julia --version
|
||||||
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
|
- 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: julia --startup-file=no --color=yes ./.github/scripts/common-tests.jl
|
||||||
|
|||||||
2
.github/workflows/example-builds.yml
vendored
2
.github/workflows/example-builds.yml
vendored
@@ -50,3 +50,5 @@ jobs:
|
|||||||
arch: ${{ matrix.julia-arch }}
|
arch: ${{ matrix.julia-arch }}
|
||||||
- run: julia --version
|
- run: julia --version
|
||||||
- run: julia --compile=min -O0 -e 'import InteractiveUtils; InteractiveUtils.versioninfo()'
|
- 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: julia --startup-file=no --color=yes ./.github/scripts/common-tests.jl
|
||||||
|
|||||||
Reference in New Issue
Block a user