Faster computations #339
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: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
tags: '*' | |
workflow_dispatch: | |
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.9' | |
- '1.10' | |
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.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 test/test_enterprise_gwecc.py | |
# - name: Codecov | |
# uses: codecov/codecov-action@v3 | |
examples: | |
name: Examples | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v1 | |
env: | |
cache-name: cache-eg-artifacts | |
with: | |
path: ~/.julia/eg-artifacts | |
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | |
restore-keys: | | |
${{ runner.os }}-test-${{ env.cache-name }}- | |
${{ runner.os }}-test- | |
${{ runner.os }}- | |
- 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 -t 4 -e 'import Pkg; Pkg.add(path="."); Pkg.add(["BenchmarkTools", "CairoMakie"])' | |
# pip install . | |
- name: Run examples | |
run: | | |
cd examples | |
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 . |