Skip to content

Commit

Permalink
Add a test for ComponentArrays.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Apr 30, 2024
1 parent c55ccd8 commit 1e08cba
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 10 deletions.
26 changes: 20 additions & 6 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- label: "Nvidia GPUs -- CUDA.jl"
plugins:
- JuliaCI/julia#v1:
version: 1.9
version: 1.10
agents:
queue: "juliagpu"
cuda: "*"
Expand All @@ -22,7 +22,7 @@ steps:
- label: "AMD GPUs -- AMDGPU.jl"
plugins:
- JuliaCI/julia#v1:
version: 1.9
version: 1.10
agents:
queue: "juliagpu"
rocm: "*"
Expand All @@ -43,7 +43,7 @@ steps:
- label: "Intel GPUs -- oneAPI.jl"
plugins:
- JuliaCI/julia#v1:
version: 1.9
version: 1.10
agents:
queue: "juliagpu"
intel: "*"
Expand All @@ -58,7 +58,7 @@ steps:
- label: "Apple M1 GPUs -- Metal.jl"
plugins:
- JuliaCI/julia#v1:
version: 1.9
version: 1.10
agents:
queue: "juliaecosystem"
os: "macos"
Expand All @@ -74,13 +74,27 @@ steps:
- label: "CPUs -- StaticArrays.jl"
plugins:
- JuliaCI/julia#v1:
version: 1.9
version: 1.10
agents:
queue: "juliaecosystem"
command: |
julia --color=yes --project -e '
using Pkg
Pkg.add("StaticArrays")
Pkg.instantiate()
include("test/test_extensions.jl")'
include("test/cpu/static_arrays.jl")'
timeout_in_minutes: 30

- label: "CPUs -- ComponentArrays.jl"
plugins:
- JuliaCI/julia#v1:
version: 1.10
agents:
queue: "juliaecosystem"
command: |
julia --color=yes --project -e '
using Pkg
Pkg.add("ComponentArrays")
Pkg.instantiate()
include("test/cpu/component_arrays.jl")'
timeout_in_minutes: 30
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ task:
- JULIA_VERSION: 1
- name: MacOS M1
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
image: ghcr.io/cirruslabs/macos-ventura-base:latest
env:
- JULIA_VERSION: 1
install_script: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
version: ['1.6', '1']
os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, macos-13, windows-latest]
arch: [x64]
allow_failure: [false]
include:
Expand All @@ -23,15 +23,15 @@ jobs:
arch: x64
allow_failure: true
- version: 'nightly'
os: macOS-latest
os: macos-13
arch: x64
allow_failure: true
- version: 'nightly'
os: windows-latest
arch: x64
allow_failure: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
Expand Down
16 changes: 16 additions & 0 deletions test/cpu/component_arrays.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using LinearAlgebra, SparseArrays, Test
using Krylov, ComponentArrays

@testset "ComponentArrays" begin
n = 5

for T in (Float32, Float64)
A = rand(T, n, n)

b = ComponentArrays{T}(a=[1, 2, 3], b=[4, 5])
@test Krylov.ktypeof(b) == Vector{T}
x, stats = gmres(A, b)
@test stats.solved

end
end
File renamed without changes.

0 comments on commit 1e08cba

Please sign in to comment.