Skip to content

Enable autograd using Zygote #297

Enable autograd using Zygote

Enable autograd using Zygote #297

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
tags: '*'
jobs:
jl-test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.8'
- '1'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
file: lcov.info
py-test:
name: Python ${{ matrix.python-version }} - ${{ github.event_name }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install libsuitesparse-dev
curl -sSL https://raw.githubusercontent.com/vallis/libstempo/master/install_tempo2.sh | sh
python -m pip install --upgrade pip setuptools wheel pytest pytest-cov
pip install -r requirements.txt
julia -e 'import Pkg; Pkg.add(path=".")'
pip install .
- name: Test with pytest
run: |
pytest --full-trace --cov-report xml --cov enterprise_gwecc
# - name: Codecov
# uses: codecov/codecov-action@v3
examples:
name: Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install libsuitesparse-dev
curl -sSL https://raw.githubusercontent.com/vallis/libstempo/master/install_tempo2.sh | sh
python -m pip install --upgrade pip setuptools wheel pytest pytest-cov libstempo
pip install -r requirements.txt
julia -e 'import Pkg; Pkg.add(path="."); Pkg.add(["BenchmarkTools", "PyPlot", "PythonCall"])'
pip install .
- name: Run examples
run: |
cd examples
julia benchmark.jl
julia lbar_gammabar_vs_e.jl
julia residuals_1psr.jl
julia residuals_components.jl
julia residuals_terms.jl
julia residuals_terms_px.jl
julia tau_vs_e.jl
julia waveform_residuals_px.jl
python simulation_example.py
python enterprise_example.py
cd ..
format:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install black
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
- name: Test formatting
run: |
julia -e 'import JuliaFormatter; @assert JuliaFormatter.format(".")'
black .