Skip to content

Commit 83a840a

Browse files
authored
ci: fix doc deploy (#18)
1 parent f09c761 commit 83a840a

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

.github/workflows/Documenter.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,41 @@ on:
55
tags: [v*]
66
pull_request:
77

8+
concurrency:
9+
# Skip intermediate builds: always.
10+
# Cancel intermediate builds: only if it is a pull request build.
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13+
814
jobs:
9-
Documenter:
15+
docs:
1016
name: Documentation
1117
runs-on: ubuntu-latest
18+
permissions:
19+
# needed to allow julia-actions/cache to proactively delete old caches that it has created
20+
actions: write
21+
contents: write
22+
statuses: write
1223
steps:
1324
- uses: actions/checkout@v4
14-
- uses: julia-actions/julia-buildpkg@latest
15-
- uses: julia-actions/julia-docdeploy@latest
25+
- uses: julia-actions/setup-julia@v1
26+
with:
27+
version: '1'
28+
- uses: julia-actions/cache@v1
29+
- name: Configure doc environment
30+
shell: julia --project=docs --color=yes {0}
31+
run: |
32+
using Pkg
33+
Pkg.develop(PackageSpec(path=pwd()))
34+
Pkg.instantiate()
35+
- uses: julia-actions/julia-buildpkg@v1
36+
- uses: julia-actions/julia-docdeploy@v1
1637
env:
1738
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
39+
- name: Run doctests
40+
shell: julia --project=docs --color=yes {0}
41+
run: |
42+
using Documenter: DocMeta, doctest
43+
using TensorCore
44+
DocMeta.setdocmeta!(TensorCore, :DocTestSetup, :(using TensorCore); recursive=true)
45+
doctest(TensorCore)

src/TensorCore.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ For arrays `a` and `b`, perform elementwise multiplication.
2020
julia> a = [2, 3]; b = [5, 7];
2121
2222
julia> a ⊙ b
23-
2-element Array{$Int,1}:
23+
2-element Vector{$Int}:
2424
10
2525
21
2626
2727
julia> a ⊙ [5]
28-
ERROR: DimensionMismatch("Axes of `A` and `B` must match, got (Base.OneTo(2),) and (Base.OneTo(1),)")
28+
ERROR: DimensionMismatch: Axes of `A` and `B` must match, got (Base.OneTo(2),) and (Base.OneTo(1),)
2929
[...]
3030
```
3131
@@ -74,7 +74,7 @@ For vectors `v` and `w`, the Kronecker product is related to the tensor product
7474
julia> a = [2, 3]; b = [5, 7, 11];
7575
7676
julia> a ⊗ b
77-
2×3 Array{$Int,2}:
77+
2×3 Matrix{$Int}:
7878
10 14 22
7979
15 21 33
8080
```
@@ -164,13 +164,13 @@ and hence may sometimes return another `Adjoint` vector. (And similarly for `Tra
164164
julia> M = rand(5,5); v = rand(5);
165165
166166
julia> typeof(v ⊡ M')
167-
Array{Float64,1}
167+
Vector{Float64} (alias for Array{Float64, 1})
168168
169169
julia> typeof(M ⊡ v') # adjoint of the previous line
170-
Adjoint{Float64,Array{Float64,1}}
170+
LinearAlgebra.Adjoint{Float64, Vector{Float64}}
171171
172172
julia> typeof(v' ⊡ M') # same as *, and equal to adjoint(M ⊡ v)
173-
Adjoint{Float64,Array{Float64,1}}
173+
LinearAlgebra.Adjoint{Float64, Vector{Float64}}
174174
175175
julia> typeof(v' ⊡ v)
176176
Float64

0 commit comments

Comments
 (0)