Skip to content

Add training benchmarking script #834

Add training benchmarking script

Add training benchmarking script #834

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
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/') }}
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
jobs:
test:
name: ${{ matrix.suite }} - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1' # Replace this with the minimum Julia version that your package supports.
- 'nightly'
os:
- ubuntu-latest
# - macOS-latest
# - windows-latest
arch:
- x64
suite:
- '["AlexNet", "VGG"]'
- '["GoogLeNet", "SqueezeNet", "MobileNets"]'
- '"EfficientNet"'
- 'r"/*/ResNet*"'
- 'r"/*/SEResNet*"'
- '[r"Res2Net", r"Res2NeXt"]'
- '"Inception"'
- '"DenseNet"'
- '"UNet"'
- '["ConvNeXt", "ConvMixer"]'
- 'r"Mixers"'
- 'r"ViTs"'
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- name: "Setup environment"
run: |
julia --project=./test -e 'using Pkg; Pkg.develop(path = ".")'
- name: "Run tests + coverage"
if: matrix.version == '1' && matrix.os == 'ubuntu-latest'
run: |
julia --code-coverage=user --color=yes --depwarn=yes --project=./test -e 'include("test/retest.jl"); retest(${{ matrix.suite }})'
shell: bash
- name: "Run tests only"
if: ${{ !(matrix.version == '1' && matrix.os == 'ubuntu-latest') }}
run: |
julia --color=yes --depwarn=yes --project=./test -e 'include("test/retest.jl"); retest(${{ matrix.suite }})'
continue-on-error: ${{ matrix.version == 'nightly' }}
shell: bash
- uses: actions/upload-artifact@v3
with:
name: coverage-${{ hashFiles('**/*.cov') }}
path: '**/*.cov'
if: matrix.version == '1' && matrix.os == 'ubuntu-latest'
coverage:
name: "Coverage"
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1'
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: actions/download-artifact@v3
- run: |
cp -r coverage-*/* .
rm -rf coverage-*
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1.6'
- uses: julia-actions/cache@v1
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: |
julia --color=yes --project=docs/ -e '
using Metalhead
# using Pkg; Pkg.activate("docs")
using Documenter
using Documenter: doctest
DocMeta.setdocmeta!(Metalhead, :DocTestSetup, :(using Metalhead); recursive=true)
doctest(Metalhead)'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}