Skip to content

Update neural network tests (#490) #1008

Update neural network tests (#490)

Update neural network tests (#490) #1008

Workflow file for this run

name: Test
on:
push:
branches:
- main
tags: ["*"]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test-DI:
name: ${{ matrix.version }} - DI (${{ matrix.group }})
runs-on: ubuntu-latest
timeout-minutes: 60
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- "1"
- "lts"
- "pre"
group:
- Formalities
- Internals
- Back/ChainRulesCore
- Back/Diffractor
- Back/Enzyme
- Back/FastDifferentiation
- Back/FiniteDiff
- Back/FiniteDifferences
- Back/ForwardDiff
- Back/PolyesterForwardDiff
- Back/ReverseDiff
- Back/SecondOrder
- Back/Symbolics
- Back/Tapir
- Back/Tracker
- Back/Zygote
- Misc/DifferentiateWith
- Misc/FromPrimitive
- Misc/SparsityDetector
- Misc/ZeroBackends
- Down/Flux
- Down/Lux
exclude:
# lts
- version: "lts"
group: Formalities
- version: "lts"
group: Back/ChainRulesCore
- version: "lts"
group: Back/Diffractor
- version: "lts"
group: Back/Enzyme
- version: "lts"
group: Back/FiniteDiff
- version: "lts"
group: Back/FastDifferentiation
- version: "lts"
group: Back/PolyesterForwardDiff
- version: "lts"
group: Back/SecondOrder
- version: "lts"
group: Back/Symbolics
- version: "lts"
group: Back/Tapir
- version: "lts"
group: Misc/SparsityDetector
- version: "lts"
group: Down/Flux
- version: "lts"
group: Down/Lux
# pre-release
- version: "pre"
group: Formalities
- version: "pre"
group: Back/ChainRulesCore
- version: "pre"
group: Back/Enzyme
- version: "pre"
group: Back/Tapir
- version: "pre"
group: Back/SecondOrder
- version: "pre"
group: Misc/SparsityDetector
env:
SHOULDRUN: ${{ matrix.version == '1' || !github.event.pull_request.draft }}
JULIA_DI_TEST_GROUP: ${{ matrix.group }}
steps:
- run: echo "$SHOULDRUN"
- uses: actions/checkout@v4
if: ${{ env.SHOULDRUN == 'true' }}
- uses: julia-actions/setup-julia@v2
if: ${{ env.SHOULDRUN == 'true' }}
with:
version: ${{ matrix.version }}
arch: x64
- uses: julia-actions/cache@v2
if: ${{ env.SHOULDRUN == 'true' }}
- name: Install dependencies & run tests
if: ${{ env.SHOULDRUN == 'true' }}
# how to add the local DIT to the DI test env?
run: julia --project=./DifferentiationInterface -e '
using Pkg;
Pkg.Registry.update();
Pkg.test("DifferentiationInterface"; coverage=true);'
- uses: julia-actions/julia-processcoverage@v1
if: ${{ env.SHOULDRUN == 'true' }}
with:
directories: ./DifferentiationInterface/src,./DifferentiationInterface/ext,./DifferentiationInterface/test
- uses: codecov/codecov-action@v4
if: ${{ env.SHOULDRUN == 'true' }}
with:
files: lcov.info
flags: DI
name: ${{ matrix.version }} - DI (${{ matrix.group }})
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
test-DIT:
name: ${{ matrix.version }} - DIT (${{ matrix.group }})
runs-on: ubuntu-latest
timeout-minutes: 60
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- "1"
- "lts"
- "pre"
group:
- Formalities
- Zero
- Standard
- Weird
exclude:
- version: "lts"
group: Formalities
- version: "lts"
group: Weird
env:
SHOULDRUN: ${{ matrix.version == '1' || !github.event.pull_request.draft }}
JULIA_DIT_TEST_GROUP: ${{ matrix.group }}
steps:
- run: echo "$SHOULDRUN"
- uses: actions/checkout@v4
if: ${{ env.SHOULDRUN == 'true' }}
- uses: julia-actions/setup-julia@v2
if: ${{ env.SHOULDRUN == 'true' }}
with:
version: ${{ matrix.version }}
arch: x64
- uses: julia-actions/cache@v2
if: ${{ env.SHOULDRUN == 'true' }}
- name: Install dependencies & run tests
if: ${{ env.SHOULDRUN == 'true' }}
run: julia --project=./DifferentiationInterfaceTest -e '
using Pkg;
Pkg.Registry.update();
Pkg.develop(path="./DifferentiationInterface");
Pkg.test("DifferentiationInterfaceTest"; coverage=true);'
- uses: julia-actions/julia-processcoverage@v1
if: ${{ env.SHOULDRUN == 'true' }}
with:
directories: ./DifferentiationInterfaceTest/src,./DifferentiationInterfaceTest/ext,./DifferentiationInterfaceTest/test
- uses: codecov/codecov-action@v4
if: ${{ env.SHOULDRUN == 'true' }}
with:
files: lcov.info
flags: DIT
name: ${{ matrix.version }} - DIT (${{ matrix.group }})
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true