Skip to content

Commit 5761090

Browse files
committed
Merge branch 'master' of ../ChainRulesTestUtils.jl
2 parents 89b202c + 170048b commit 5761090

36 files changed

+3348
-0
lines changed

.github/workflows/CI.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [master]
5+
tags: [v*]
6+
pull_request:
7+
schedule:
8+
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
9+
10+
jobs:
11+
test:
12+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
version:
18+
- "1.0" # LTS
19+
- "1" # Latest Release
20+
os:
21+
- ubuntu-latest
22+
- macOS-latest
23+
- windows-latest
24+
arch:
25+
- x86
26+
- x64
27+
exclude:
28+
# 32-bit Julia binaries are not available on macOS
29+
- os: macOS-latest
30+
arch: x86
31+
steps:
32+
- uses: actions/checkout@v2
33+
- uses: julia-actions/setup-julia@v1
34+
with:
35+
version: ${{ matrix.version }}
36+
arch: ${{ matrix.arch }}
37+
- uses: actions/cache@v2
38+
env:
39+
cache-name: cache-artifacts
40+
with:
41+
path: ~/.julia/artifacts
42+
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
43+
restore-keys: |
44+
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
45+
${{ runner.os }}-${{ matrix.arch }}-test-
46+
${{ runner.os }}-${{ matrix.arch }}-
47+
${{ runner.os }}-
48+
- uses: julia-actions/julia-buildpkg@v1
49+
- uses: julia-actions/julia-runtest@v1
50+
51+
slack:
52+
name: Notify Slack Failure
53+
needs: test
54+
runs-on: ubuntu-latest
55+
if: always() && github.event_name == 'schedule'
56+
steps:
57+
- uses: technote-space/workflow-conclusion-action@v2
58+
- uses: voxmedia/github-action-slack-notify-build@v1
59+
if: env.WORKFLOW_CONCLUSION == 'failure'
60+
with:
61+
channel: nightly-rse
62+
status: FAILED
63+
color: danger
64+
env:
65+
SLACK_BOT_TOKEN: ${{ secrets.INVENIA_SLACK_BOT_TOKEN }}

.github/workflows/CompatHelper.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CompatHelper
2+
3+
on:
4+
schedule:
5+
- cron: '00 00 * * *'
6+
7+
jobs:
8+
CompatHelper:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: julia-actions/setup-julia@latest
12+
with:
13+
version: 1.3
14+
- name: Pkg.add("CompatHelper")
15+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
16+
- name: CompatHelper.main()
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/Documenter.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Documenter
2+
on:
3+
push:
4+
branches: [master]
5+
tags: [v*]
6+
pull_request:
7+
8+
jobs:
9+
docs:
10+
name: Documentation
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: julia-actions/setup-julia@v1
15+
with:
16+
version: '1.6'
17+
- uses: julia-actions/julia-docdeploy@latest
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/IntegrationTest.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: IntegrationTest
2+
on:
3+
push:
4+
branches: [master]
5+
tags: [v*]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: ${{ matrix.package.repo }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
julia-version: [1]
16+
os: [ubuntu-latest]
17+
package:
18+
- {user: JuliaDiff, repo: ChainRules.jl}
19+
- {user: JuliaMath, repo: SpecialFunctions.jl}
20+
- {user: invenia, repo: BlockDiagonals.jl}
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: julia-actions/setup-julia@v1
24+
with:
25+
version: ${{ matrix.julia-version }}
26+
arch: x64
27+
- uses: julia-actions/julia-buildpkg@latest
28+
- name: Clone Downstream
29+
uses: actions/checkout@v2
30+
with:
31+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
32+
path: downstream
33+
- name: Load this and run the downstream tests
34+
shell: julia --project=downstream {0}
35+
run: |
36+
using Pkg
37+
try
38+
# force it to use this PR's version of the package
39+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
40+
Pkg.update()
41+
Pkg.test() # resolver may fail with test time deps
42+
catch err
43+
err isa Pkg.Resolve.ResolverError || rethrow()
44+
# If we can't resolve that means this is incompatible by SemVer and this is fine
45+
# It means we marked this as a breaking change, so we don't need to worry about
46+
# Mistakenly introducing a breaking change, as we have intentionally made one
47+
48+
@info "Not compatible with this release. No problem." exception=err
49+
exit(0) # Exit immediately, as a success
50+
end

.github/workflows/JuliaNightly.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: JuliaNightly
2+
# Nightly Version of Julia.
3+
# Runs on PRs and pushes to `master`, but seperate workflow to `CI`
4+
# to avoid inclusion in nightly cron build with failure notifications.
5+
on:
6+
push:
7+
branches: [master]
8+
tags: ["*"]
9+
pull_request:
10+
jobs:
11+
test:
12+
name: Julia Nightly - Ubuntu - x64
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: julia-actions/setup-julia@v1
17+
with:
18+
version: nightly
19+
arch: x64
20+
- uses: actions/cache@v2
21+
env:
22+
cache-name: julia-nightly-cache-artifacts
23+
with:
24+
path: ~/.julia/artifacts
25+
key: ${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
26+
restore-keys: |
27+
${{ env.cache-name }}-
28+
- uses: julia-actions/julia-buildpkg@latest
29+
- uses: julia-actions/julia-runtest@latest
30+
- uses: julia-actions/julia-processcoverage@v1
31+
- uses: codecov/codecov-action@v1
32+
with:
33+
file: lcov.info

.github/workflows/TagBot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/fix_doctests.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: fix_doctests
2+
on:
3+
pull_request:
4+
jobs:
5+
doctests:
6+
name: Fix doctests (Julia ${{ matrix.julia-version }} - ${{ github.event_name }})
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
julia-version: [1.6]
11+
steps:
12+
- uses: julia-actions/setup-julia@latest
13+
with:
14+
version: ${{ matrix.julia-version }}
15+
- uses: actions/checkout@v1
16+
- name: Fix doctests
17+
shell: julia --project=docs/ {0}
18+
run: |
19+
using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()
20+
using Documenter
21+
using ChainRulesTestUtils
22+
doctest(ChainRulesTestUtils, fix=true)
23+
# don't push changes to Manifest in suggestions, as it removes `path=..`
24+
run(`git restore docs/Manifest.toml`)
25+
- uses: reviewdog/action-suggester@v1
26+
if: github.event_name == 'pull_request'
27+
with:
28+
tool_name: Documenter (fix doctests)
29+
fail_on_error: true

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
dev/
2+
3+
# Files generated by invoking Julia with --code-coverage
4+
*.jl.cov
5+
*.jl.*.cov
6+
7+
# Files generated by invoking Julia with --track-allocation
8+
*.jl.mem
9+
10+
# System-specific files and directories generated by the BinaryProvider and BinDeps packages
11+
# They contain absolute paths specific to the host computer, and so should not be committed
12+
deps/deps.jl
13+
deps/build.log
14+
deps/downloads/
15+
deps/usr/
16+
deps/src/
17+
18+
# Build artifacts for creating documentation generated by the Documenter package
19+
docs/build/
20+
docs/site/
21+
22+
# File generated by Pkg, the package manager, based on a corresponding Project.toml
23+
# It records a fixed state of all packages used by the project. As such, it should not be
24+
# committed for packages, but should be committed for applications that require a static
25+
# environment.
26+
/Manifest.toml
27+
28+
# JetBrains meta files
29+
.idea/*

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 JuliaDiff
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Project.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name = "ChainRulesTestUtils"
2+
uuid = "cdddcdb0-9152-4a09-a978-84456f9df70a"
3+
version = "0.7.13"
4+
5+
[deps]
6+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
7+
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
8+
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
9+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
10+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
11+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
12+
13+
[compat]
14+
ChainRulesCore = "0.10.12"
15+
Compat = "3"
16+
FiniteDifferences = "0.12.12"
17+
julia = "1"

0 commit comments

Comments
 (0)