Skip to content

Commit 07fa2a7

Browse files
authored
github ci (#83)
* github ci
1 parent f60a9fe commit 07fa2a7

File tree

8 files changed

+159
-83
lines changed

8 files changed

+159
-83
lines changed

.github/workflows/Documenter.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
docs-build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Install dependencies
16+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.build(;verbose=true)'
17+
- name: Build and deploy
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
run: julia --project=docs/ docs/make.jl

.github/workflows/UnitTest.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
6+
push:
7+
branches:
8+
- master
9+
10+
jobs:
11+
Test:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [macos-latest, ubuntu-latest]
16+
julia_version: ["1.0", "1", "nightly"]
17+
exclude:
18+
- os: macos-latest
19+
julia_version: '1.0'
20+
21+
runs-on: ${{ matrix.os }}
22+
env:
23+
MPICH_INTERFACE_HOSTNAME: localhost
24+
JULIA_MPIEXEC_ARGS: ${{ matrix.mpiexec_args }}
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
30+
- name: Install Julia
31+
uses: julia-actions/setup-julia@latest
32+
with:
33+
version: ${{ matrix.julia_version }}
34+
35+
# https://discourse.julialang.org/t/recommendation-cache-julia-artifacts-in-ci-services/35484
36+
- name: Cache artifacts
37+
uses: actions/cache@v1
38+
env:
39+
cache-name: cache-artifacts
40+
with:
41+
path: ~/.julia/artifacts
42+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
43+
restore-keys: |
44+
${{ runner.os }}-test-${{ env.cache-name }}-
45+
${{ runner.os }}-test-
46+
${{ runner.os }}-
47+
48+
- name: Disable broken dependencies on old Julia v1.0
49+
if: matrix.julia_version == '1.0'
50+
run: cp compat/Project.toml Project.toml
51+
52+
- uses: julia-actions/julia-runtest@latest
53+

.travis.yml

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

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "TensorBoardLogger"
22
uuid = "899adc3e-224a-11e9-021f-63837185c80f"
33
authors = ["Filippo Vicentini <filippovicentini@gmail.com>"]
4-
version = "0.1.11"
4+
version = "0.1.12"
55

66
[deps]
77
CRC32c = "8bf52ea8-c179-5cab-976a-9e18b702a9bc"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# TensorBoardLogger
2-
[![Build Status](https://travis-ci.org/PhilipVinc/TensorBoardLogger.jl.svg?branch=master)](https://travis-ci.org/PhilipVinc/TensorBoardLogger.jl) [![codecov](https://codecov.io/gh/PhilipVinc/TensorBoardLogger.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/PhilipVinc/TensorBoardLogger.jl)
2+
[![codecov](https://codecov.io/gh/PhilipVinc/TensorBoardLogger.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/PhilipVinc/TensorBoardLogger.jl)
33
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://philipvinc.github.io/TensorBoardLogger.jl/dev/)
44

55
**TensorBoardLogger.jl** is a native library for logging arbitrary data to

compat/Project.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name = "TensorBoardLogger"
2+
uuid = "899adc3e-224a-11e9-021f-63837185c80f"
3+
authors = ["Filippo Vicentini <filippovicentini@gmail.com>"]
4+
version = "0.1.12"
5+
6+
[deps]
7+
CRC32c = "8bf52ea8-c179-5cab-976a-9e18b702a9bc"
8+
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
9+
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
10+
FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
11+
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
12+
ProtoBuf = "3349acd9-ac6a-5e09-bcdb-63829b23a429"
13+
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
14+
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
15+
16+
[compat]
17+
ColorTypes = "0.7, 0.8, 0.9, 0.10"
18+
FileIO = "1"
19+
FixedPointNumbers = "0.6, 0.7, 0.8"
20+
ImageCore = "0.7, 0.8"
21+
ProtoBuf = "0.7, 0.8"
22+
Requires = "0.5, 1"
23+
StatsBase = "0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33"
24+
julia = "0.7, 1"
25+
26+
[extras]
27+
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
28+
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
29+
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
30+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
31+
QuartzImageIO = "dca85d43-d64c-5e67-8c65-017450d5d020"
32+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
33+
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
34+
ValueHistories = "98cad3c8-aec3-5f06-8e41-884608649ab7"
35+
WAV = "8149f6b0-98f6-5db9-b78f-408fbbb8ef88"
36+
37+
[targets]
38+
test = ["Test", "TestImages", "ImageMagick", "Logging", "LightGraphs", "Plots", "WAV", "ValueHistories", "QuartzImageIO"]

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
TensorBoardLogger = "899adc3e-224a-11e9-021f-63837185c80f"

test/runtests.jl

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using TensorBoardLogger, Logging
22
using TensorBoardLogger: preprocess, summary_impl
33
using Test
4-
using MLDatasets
54
using TestImages
65
using ImageCore
76
using ColorTypes
@@ -139,43 +138,46 @@ end
139138
@test π != log_image(logger, "rand/CLN", rand(3, 10, 2), CLN, step = step)
140139
@test π != log_image(logger, "rand/LCN", rand(10, 3, 2), LCN, step = step)
141140

142-
sample = MNIST.traintensor(1:3)
143-
@test π != log_image(logger, "mnist/HWN", sample, HWN, step = step)
144-
@test π != log_image(logger, "mnist2/HWN", Gray.(sample), step = step)
145-
sample = permutedims(sample, (2, 1, 3))
146-
@test π != log_image(logger, "mnist/WHN", sample, WHN, step = step)
147-
@test π != log_image(logger, "mnist2/WHN", Gray.(sample), WHN, step = step)
148-
sample = permutedims(sample, (3, 2, 1))
149-
@test π != log_image(logger, "mnist/NHW", sample, NHW, step = step)
150-
@test π != log_image(logger, "mnist2/NHW", Gray.(sample), NHW, step = step)
151-
sample = permutedims(sample, (1, 3, 2))
152-
@test π != log_image(logger, "mnist/NWH", sample, NWH, step = step)
153-
@test π != log_image(logger, "mnist2/NWH", Gray.(sample), NWH, step = step)
154-
sample = testimage("toucan")
155-
@test π != log_image(logger, "toucan/auto", sample, step = step)
156-
sample = [sample, sample, sample]
157-
@test π != log_images(logger, "toucans/auto", sample, step = step)
158-
@test π != log_images(logger, "toucans", sample, CHW, step = step)
159-
160-
sample = hcat(sample...)
161-
sample = reshape(sample, (150, 162, 3))
162-
@test π != log_image(logger, "toucan/CHWN", sample, CHWN, step = step)
163-
sample = permutedims(sample, (2, 1, 3))
164-
@test π != log_image(logger, "toucan/CWHN", sample, CWHN, step = step)
165-
sample = channelview(sample) #CWHN
166-
sample = permutedims(sample, (4, 1, 2, 3))
167-
@test π != log_image(logger, "toucan/NCWH", sample, NCWH, step = step)
168-
sample = permutedims(sample, (1, 2, 4, 3))
169-
@test π != log_image(logger, "toucan/NCHW", sample, NCHW, step = step)
170-
sample = permutedims(sample, (1, 4, 3, 2))
171-
@test π != log_image(logger, "toucan/NWHC", sample, NWHC, step = step)
172-
sample = permutedims(sample, (1, 3, 2, 4))
173-
@test π != log_image(logger, "toucan/NHWC", sample, NHWC, step = step)
174-
sample = permutedims(sample, (2, 3, 4, 1))
175-
@test π != log_image(logger, "toucan/HWCN", sample, HWCN, step = step)
176-
sample = permutedims(sample, (2, 1, 3, 4))
177-
@test π != log_image(logger, "toucan/WHCN", sample, WHCN, step = step)
178-
141+
if VERSION >= v"1.3.0"
142+
using MLDatasets: MNIST
143+
144+
sample = MNIST.traintensor(1:3)
145+
@test π != log_image(logger, "mnist/HWN", sample, HWN, step = step)
146+
@test π != log_image(logger, "mnist2/HWN", Gray.(sample), step = step)
147+
sample = permutedims(sample, (2, 1, 3))
148+
@test π != log_image(logger, "mnist/WHN", sample, WHN, step = step)
149+
@test π != log_image(logger, "mnist2/WHN", Gray.(sample), WHN, step = step)
150+
sample = permutedims(sample, (3, 2, 1))
151+
@test π != log_image(logger, "mnist/NHW", sample, NHW, step = step)
152+
@test π != log_image(logger, "mnist2/NHW", Gray.(sample), NHW, step = step)
153+
sample = permutedims(sample, (1, 3, 2))
154+
@test π != log_image(logger, "mnist/NWH", sample, NWH, step = step)
155+
@test π != log_image(logger, "mnist2/NWH", Gray.(sample), NWH, step = step)
156+
sample = testimage("toucan")
157+
@test π != log_image(logger, "toucan/auto", sample, step = step)
158+
sample = [sample, sample, sample]
159+
@test π != log_images(logger, "toucans/auto", sample, step = step)
160+
@test π != log_images(logger, "toucans", sample, CHW, step = step)
161+
162+
sample = hcat(sample...)
163+
sample = reshape(sample, (150, 162, 3))
164+
@test π != log_image(logger, "toucan/CHWN", sample, CHWN, step = step)
165+
sample = permutedims(sample, (2, 1, 3))
166+
@test π != log_image(logger, "toucan/CWHN", sample, CWHN, step = step)
167+
sample = channelview(sample) #CWHN
168+
sample = permutedims(sample, (4, 1, 2, 3))
169+
@test π != log_image(logger, "toucan/NCWH", sample, NCWH, step = step)
170+
sample = permutedims(sample, (1, 2, 4, 3))
171+
@test π != log_image(logger, "toucan/NCHW", sample, NCHW, step = step)
172+
sample = permutedims(sample, (1, 4, 3, 2))
173+
@test π != log_image(logger, "toucan/NWHC", sample, NWHC, step = step)
174+
sample = permutedims(sample, (1, 3, 2, 4))
175+
@test π != log_image(logger, "toucan/NHWC", sample, NHWC, step = step)
176+
sample = permutedims(sample, (2, 3, 4, 1))
177+
@test π != log_image(logger, "toucan/HWCN", sample, HWCN, step = step)
178+
sample = permutedims(sample, (2, 1, 3, 4))
179+
@test π != log_image(logger, "toucan/WHCN", sample, WHCN, step = step)
180+
end
179181
end
180182

181183
@testset "Image processing interface" begin
@@ -274,7 +276,9 @@ end
274276
include("Optional/test_Plots.jl")
275277
# Don't run PyPlot tests until I figure a way to install the dependencies
276278
#include("Optional/test_PyPlot.jl")
277-
include("Optional/test_Tracker.jl")
279+
if VERSION >= v"1.5.0"
280+
include("Optional/test_Tracker.jl")
281+
end
278282
end
279283

280284
@testset "Logger dispatch overrides" begin

0 commit comments

Comments
 (0)