MilesCranmer's picture
Make CI install better Julia registry
4ef59ef
raw
history blame
1.72 kB
on:
push:
branches:
- master
paths:
- 'test/**'
- 'pysr/**'
- '.github/workflows/**'
- 'setup.py'
- 'Project.toml'
pull_request:
branches:
- master
paths:
- 'test/**'
- 'pysr/**'
- '.github/workflows/**'
- 'setup.py'
- 'Project.toml'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.5.0']
python-version: ['3.6']
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/[email protected]
- name: "Set up Julia"
uses: julia-actions/[email protected]
with:
version: ${{ matrix.julia-version }}
- name: "Change package server"
shell: bash
env:
JULIA_PKG_SERVER: ""
run: |
julia -e 'using Pkg; Pkg.Registry.add("General")'
- name: "Cache dependencies"
uses: actions/cache@v1 # Thanks FromFile.jl
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: "Set up Python"
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: "Install PySR"
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python setup.py install
shell: bash
- name: "Run tests"
run: python test/test.py
shell: bash