Merge pull request #109 from slimgroup/tidy_examples_2 #362
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test_cpu: | |
name: Julia ${{ matrix.version }} - ${{ matrix.tests }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
test_suite: ${{ matrix.tests }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['1.6', '1.7', '1.8', '1.9', '1.10'] | |
tests: ["basics", "layers", "networks"] | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout InvertibleNetworks.jl | |
uses: actions/checkout@v3 | |
- name: Setup julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
- name: Add SLIM registery for JOLI | |
run: | | |
julia --color=yes --check-bounds=yes -e 'using Pkg;Pkg.update();Pkg.Registry.add(RegistrySpec(url="https://github.com/slimgroup/SLIMregistryJL.git"))' | |
- name: Build InvertibleNetworks.jl | |
uses: julia-actions/julia-buildpkg@latest | |
- name: Run tests | |
id: test | |
continue-on-error: true | |
uses: julia-actions/julia-runtest@latest | |
- name: Retry tests once if failed | |
if: steps.test.outcome=='failure' | |
uses: julia-actions/julia-runtest@latest | |
- name: Run simple example | |
run: julia --project examples/layers/layer_actnorm.jl | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: lcov.info | |
test_gpu: | |
name: GPU Julia ${{ matrix.version }} - ${{ matrix.tests }} | |
runs-on: self-hosted | |
env: | |
test_suite: ${{ matrix.tests }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['1.10'] | |
tests: ["basics", "layers", "networks"] | |
steps: | |
- name: Checkout InvertibleNetworks.jl | |
uses: actions/checkout@v3 | |
- name: Setup julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
- name: Add SLIM registery for JOLI | |
run: | | |
julia --color=yes --check-bounds=yes -e 'using Pkg;Pkg.update();Pkg.Registry.add(RegistrySpec(url="https://github.com/slimgroup/SLIMregistryJL.git"))' | |
- name: Build InvertibleNetworks.jl | |
uses: julia-actions/julia-buildpkg@latest | |
- name: Run tests | |
id: test | |
continue-on-error: true | |
uses: julia-actions/julia-runtest@latest | |
- name: Retry tests once if failed | |
if: steps.test.outcome=='failure' | |
uses: julia-actions/julia-runtest@latest | |
- name: Run simple example | |
run: julia --project examples/layers/layer_actnorm.jl | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: lcov.info | |