Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 46 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,50 @@ concurrency:

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
- '1.11'
- '1.12'
- 'nightly'
- '1'
- '1.9'
os:
- ubuntu-latest
- windows-latest
arch:
- x64
- x86
include:
- os: macOS-latest
arch: aarch64
version: '1'
- os: macOS-latest
arch: aarch64
version: 'nightly'
- macos-15-intel # Intel
- macos-latest # Apple Silicon
julia-wordsize:
# The value here only affects the version of Julia binary that we download.
# It does not affect the architecture of the GitHub Runner (virtual machine) that
# we run on.
- '32' # 32-bit Julia. Only available on x86_64. Not available on aarch64.
- '64' # 64-bit Julia.
exclude:
- os: windows-latest # Killing workers doesn't work on windows in 1.9
version: '1.9'
# Killing workers doesn't work on Windows in Julia 1.10:
- os: windows-latest
version: '1.10'
# We don't have 32-bit builds of Julia for Intel macOS:
- os: macos-15-intel # Intel
julia-wordsize: '32'
#
# We don't have 32-bit builds of Julia for Apple Silicon macOS:
- os: macos-latest # Apple Silicon
julia-wordsize: '32'

steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
# If `julia-wordsize` is 32, then we set `arch` to `x86`, because we know that
# 32-bit builds of Julia are only available for x86.
#
# If `julia-wordsize` is 64, then we set `arch` to `${{ runner.arch }}`, which
# GitHub will automatically expand to the correct value (`x86_64` or `aarch64`)
# based on the architecture of the underlying GitHub Runner (virtual machine).
arch: ${{ github.ref == '32' && 'x86' || runner.arch }}
- uses: actions/cache@v5
env:
cache-name: cache-artifacts
Expand All @@ -60,9 +72,26 @@ jobs:
${{ runner.os }}-test-${{ matrix.os }}
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- name: Decide what the value of JULIA_NUM_THREADS should be
id: decide-numthreads-str
run: |
if Base.VERSION >= v"1.12-"
# The x,y format for threadpools requires Julia 1.9 or above.
# However, Julia didn't begin starting with 1 interactive thread by default until Julia 1.12
# So we don't need to bother with this on Julia 1.11 and earlier
value = "1,0"
else
value = "1"
end
open(ENV["GITHUB_OUTPUT"], "a") do io
name = "numthreads"
line = "$(name)=$(value)"
println(io, line)
end
shell: julia --color=yes {0}
- uses: julia-actions/julia-runtest@v1
env:
JULIA_NUM_THREADS: 4,4
JULIA_NUM_THREADS: ${{ steps.decide-numthreads-str.outputs.numthreads }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
Expand Down
8 changes: 8 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ cmd = `$test_exename $test_exeflags`
if Sys.isunix()
# Run the SSH tests with a single thread because LibSSH.jl is not thread-safe
sshtestfile = joinpath(@__DIR__, "sshmanager.jl")
if Base.VERSION >= v"1.12-"
# The x,y format for threadpools requires Julia 1.9 or above.
# However, Julia didn't begin starting with 1 interactive thread by default until Julia 1.12
# So we don't need to bother with this on Julia 1.11 and earlier
JULIA_NUM_THREADS = "1,0"
else
JULIA_NUM_THREADS = "1"
end
run(addenv(`$cmd $sshtestfile`, "JULIA_NUM_THREADS" => "1"))
else
@warn "Skipping the SSH tests because this platform is not supported"
Expand Down
Loading