Skip to content

Commit 3f4eb58

Browse files
authored
Update GitHub actions and add coverage (#59)
* Update action version and add coverage * Remove Manifest, formatting, info printing * Use testsets * Change job name * Other name as well
1 parent ffa6f0a commit 3f4eb58

File tree

6 files changed

+104
-218
lines changed

6 files changed

+104
-218
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,48 @@
1-
name: julia 1.6
1+
name: julia
22
on:
33
push:
44
branches:
55
- master
66
pull_request:
7-
7+
88
jobs:
99
testMKLjl:
10-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
10+
name: ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
version:
16-
- '1.6'
16+
- "1.6"
17+
- "1.8"
1718
os:
1819
- ubuntu-latest
1920
- macOS-latest
2021
- windows-latest
2122
arch:
2223
- x64
2324
steps:
24-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
2526
- uses: julia-actions/setup-julia@latest
2627
with:
2728
version: ${{ matrix.version }}
2829
arch: ${{ matrix.arch }}
2930
- name: Cache artifacts
30-
uses: actions/cache@v1
31+
uses: actions/cache@v2
3132
env:
3233
cache-name: cache-artifacts
3334
with:
34-
path: ~/.julia/artifacts
35+
path: ~/.julia/artifacts
3536
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
3637
restore-keys: |
3738
${{ runner.os }}-test-${{ env.cache-name }}-
3839
${{ runner.os }}-test-
3940
${{ runner.os }}-
4041
- uses: julia-actions/julia-buildpkg@latest
4142
- uses: julia-actions/julia-runtest@latest
42-
43-
# testAptMKL:
44-
# name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
45-
# runs-on: ${{ matrix.os }}
46-
# strategy:
47-
# matrix:
48-
# version:
49-
# - '1.0'
50-
# - '1.3'
51-
# os:
52-
# - ubuntu-latest
53-
# arch:
54-
# - x64
55-
# env:
56-
# LD_LIBRARY_PATH: /opt/intel/compilers_and_libraries_2019.4.243/linux/mkl/lib/intel64_lin/
57-
# steps:
58-
# - name: Install MKL via apt
59-
# run: |
60-
# curl https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB > GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
61-
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
62-
# rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
63-
# sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
64-
# sudo apt-get update
65-
# sudo apt-get install -y intel-mkl-64bit-2019.4-070
66-
# - uses: actions/checkout@v2
67-
# - uses: julia-actions/setup-julia@latest
68-
# with:
69-
# version: ${{ matrix.version }}
70-
# arch: ${{ matrix.arch }}
71-
# - uses: julia-actions/julia-buildpkg@latest
72-
# - uses: julia-actions/julia-runtest@latest
43+
- uses: julia-actions/julia-processcoverage@v1
44+
- if: matrix.version == '1.8' && matrix.os == 'ubuntu-latest'
45+
uses: coverallsapp/github-action@master
46+
with:
47+
github-token: ${{ secrets.GITHUB_TOKEN }}
48+
path-to-lcov: ./lcov.info

.github/workflows/nightly.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ on:
55
- master
66
pull_request:
77
schedule:
8-
- cron: '1 0 1,15 * *'
9-
8+
- cron: "1 0 1,15 * *"
9+
1010
jobs:
1111
testMKLjl:
12-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
12+
name: ${{ matrix.os }} - ${{ matrix.arch }}
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
fail-fast: false
1616
matrix:
1717
version:
18-
- 'nightly'
18+
- "nightly"
1919
os:
2020
- ubuntu-latest
2121
- macOS-latest
@@ -33,7 +33,7 @@ jobs:
3333
env:
3434
cache-name: cache-artifacts
3535
with:
36-
path: ~/.julia/artifacts
36+
path: ~/.julia/artifacts
3737
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
3838
restore-keys: |
3939
${{ runner.os }}-test-${{ env.cache-name }}-
@@ -53,7 +53,7 @@ jobs:
5353
# - ubuntu-latest
5454
# arch:
5555
# - x64
56-
# env:
56+
# env:
5757
# LD_LIBRARY_PATH: /opt/intel/compilers_and_libraries_2019.4.243/linux/mkl/lib/intel64_lin/
5858
# steps:
5959
# - name: Install MKL via apt
@@ -71,4 +71,4 @@ jobs:
7171
# version: ${{ matrix.version }}
7272
# arch: ${{ matrix.arch }}
7373
# - uses: julia-actions/julia-buildpkg@latest
74-
# - uses: julia-actions/julia-runtest@latest
74+
# - uses: julia-actions/julia-runtest@latest

test/Manifest.toml

Lines changed: 0 additions & 101 deletions
This file was deleted.

test/common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@ function randindomain(t::Type{T}, n, domain) where {T<:Complex}
9292
d2 = convert(t, domain[2])
9393
ddiff = d2 - d1
9494
@assert isfinite(ddiff)
95-
return rand(t, 2*n) .* ddiff .+ d1
95+
return rand(t, 2 * n) .* ddiff .+ d1
9696
end

test/complex.jl

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
const NVALS_complex = 1000
33

44
const input_complex = Dict(
5-
t=>[ (randindomain(t, NVALS_complex, domain),) for (_, _, domain) in base_unary_complex ]
6-
for t in (ComplexF32, ComplexF64)
5+
t => [(randindomain(t, NVALS_complex, domain),) for (_, _, domain) in base_unary_complex]
6+
for t in (ComplexF32, ComplexF64)
77
)
88

99
const fns_complex = [x[1:2] for x in base_unary_complex]
@@ -14,30 +14,35 @@ const fns_complex = [x[1:2] for x in base_unary_complex]
1414
# )
1515

1616
@testset "Definitions and Comparison with Base for Complex" begin
17-
for t in (ComplexF32, ComplexF64), i = 1:length(fns_complex)
18-
inp = input_complex[t][i]
19-
mod, fn = fns_complex[i]
20-
base_fn = getproperty(mod, fn)
21-
vml_fn = getproperty(IntelVectorMath, fn)
22-
vml_fn! = getproperty(IntelVectorMath, Symbol(fn, "!"))
23-
24-
Test.@test parentmodule(vml_fn) == IntelVectorMath
25-
26-
# Test.test_approx_eq(output[t][i], fn(input[t][i]...), "Base $t $fn", "IntelVectorMath $t $fn")
27-
baseres = base_fn.(inp...)
28-
Test.@test vml_fn(inp...) base_fn.(inp...)
29-
30-
if inp == 1
31-
if fn != :abs && fn != :angle
32-
vml_fn!(inp[1])
33-
Test.@test inp[1] baseres
17+
for t in (ComplexF32, ComplexF64)
18+
@testset "Type: $t" begin
19+
for i = 1:length(fns_complex)
20+
inp = input_complex[t][i]
21+
mod, fn = fns_complex[i]
22+
base_fn = getproperty(mod, fn)
23+
vml_fn = getproperty(IntelVectorMath, fn)
24+
vml_fn! = getproperty(IntelVectorMath, Symbol(fn, "!"))
25+
26+
@testset "$fn" begin
27+
28+
Test.@test parentmodule(vml_fn) == IntelVectorMath
29+
30+
# Test.test_approx_eq(output[t][i], fn(input[t][i]...), "Base $t $fn", "IntelVectorMath $t $fn")
31+
baseres = base_fn.(inp...)
32+
Test.@test vml_fn(inp...) base_fn.(inp...)
33+
34+
if inp == 1
35+
if fn != :abs && fn != :angle
36+
vml_fn!(inp[1])
37+
Test.@test inp[1] baseres
38+
end
39+
elseif length(inp) == 2
40+
out = similar(inp[1])
41+
vml_fn!(out, inp...)
42+
Test.@test out baseres
43+
end
44+
end
3445
end
35-
elseif length(inp) == 2
36-
out = similar(inp[1])
37-
vml_fn!(out, inp...)
38-
Test.@test out baseres
3946
end
40-
4147
end
42-
4348
end

0 commit comments

Comments
 (0)