avoid private access to loaded_precompile #517
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
tags: '*' | |
jobs: | |
test: | |
name: Install & test Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.allow_failure }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.6' # LTS | |
- '1.9' # parsing errors branch on 1.10, so test the last pre-1.10 version | |
- '1' # current stable | |
- 'pre' # next release, if available | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
arch: | |
- x64 | |
allow_failure: [false] | |
include: | |
- version: 'nightly' | |
os: ubuntu-latest | |
arch: x64 | |
allow_failure: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
show-versioninfo: ${{ matrix.version == 'nightly' }} | |
- uses: julia-actions/cache@v2 | |
- uses: julia-actions/julia-buildpkg@latest | |
# Revise's tests need significant customization | |
# Populate the precompile cache with an extraneous file, to catch issues like in #460 | |
- name: populate_compiled | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: julia -e 'include(joinpath("test", "populate_compiled.jl"))' | |
- uses: julia-actions/julia-runtest@latest | |
- name: filewatching | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.version != '1.0' }} | |
run: julia --project -e 'using Pkg; Pkg.build(); Pkg.test(; test_args=["REVISE_TESTS_WATCH_FILES"], coverage=true)' | |
- name: extra tests | |
if: ${{ matrix.os != 'windows-latest' && matrix.version != '1.0' }} | |
run: | | |
echo $TERM | |
# Tests for when using polling | |
echo "Polling" | |
julia --project --code-coverage=user -e ' | |
ENV["JULIA_REVISE_POLL"]="1" | |
using Pkg, Revise | |
include(joinpath(dirname(pathof(Revise)), "..", "test", "polling.jl")) | |
' | |
# The REPL wasn't initialized, so the "Methods at REPL" tests didn't run. Pick those up now. | |
echo "Methods at REPL" | |
TERM="xterm" julia --project --code-coverage=user -e ' | |
using InteractiveUtils, REPL, Revise | |
t = @async( | |
VERSION >= v"1.12.0-DEV.612" ? Base.run_main_repl(true, true, :no, true) : | |
VERSION >= v"1.11.0-DEV.222" ? Base.run_main_repl(true, true, :no, true, false) : | |
Base.run_main_repl(true, true, false, true, false)) | |
isdefined(Base, :errormonitor) && Base.errormonitor(t) | |
while (!isdefined(Base, :active_repl_backend) || isnothing(Base.active_repl_backend)) sleep(0.1) end | |
pushfirst!(Base.active_repl_backend.ast_transforms, Revise.revise_first) | |
include(joinpath("test", "runtests.jl")) | |
if Base.VERSION.major == 1 && Base.VERSION.minor >= 9 | |
REPL.eval_user_input(:(exit()), Base.active_repl_backend, Main) | |
else | |
REPL.eval_user_input(:(exit()), Base.active_repl_backend) | |
end' "Methods at REPL" | |
# We also need to pick up the Git tests, but for that we need to `dev` the package | |
echo "Git tests" | |
julia --code-coverage=user -e ' | |
using Pkg; Pkg.develop(PackageSpec(path=".")) | |
include(joinpath("test", "runtests.jl")) | |
' "Git" | |
# Check #664 | |
echo "Test #664" | |
TERM="xterm" julia --startup-file=no --project test/start_late.jl | |
# Check #697 | |
echo "Test #697" | |
dn=$(mktemp -d) | |
path=$(julia -e '(!isempty(VERSION.prerelease) && VERSION.prerelease[1] == "DEV") ? println(Base.GIT_VERSION_INFO.commit) : println("refs/tags/v",VERSION)') | |
curl -s -L https://github.com/JuliaLang/julia/archive/$path.tar.gz --output - | tar -xz -C $dn | |
julia --project test/juliadir.jl "$dn/julia-$ver" | |
# # Running out of inotify storage (see #26) | |
# - name: inotify | |
# if: ${{ matrix.os == 'ubuntu-latest' }} | |
# run: echo 4 | sudo tee -a /proc/sys/fs/inotify/max_user_watches; julia --project --code-coverage=user -e 'using Pkg, Revise; cd(joinpath(dirname(pathof(Revise)), "..", "test")); include("inotify.jl")' | |
- uses: julia-actions/julia-processcoverage@latest | |
- uses: codecov/codecov-action@v4 | |
with: | |
file: lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |