File size: 1,900 Bytes
aa19284
25f8cac
c01fb54
 
 
 
 
 
 
d369a9b
c01fb54
 
 
 
 
 
 
d369a9b
c01fb54
 
 
 
 
eea7daa
 
000f989
c01fb54
 
f56fdcb
 
c01fb54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b3fd9db
c01fb54
 
 
d18011f
c01fb54
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Windows

on:
  push:
    branches:
      - '*'
    paths:
      - 'test/**'
      - 'pysr/**'
      - '.github/workflows/CI_Windows.yml'
      - 'setup.py'
  pull_request:
    branches:
      - '*'
    paths:
      - 'test/**'
      - 'pysr/**'
      - '.github/workflows/CI_Windows.yml'
      - 'setup.py'

jobs:
  test:
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: bash
    strategy:
      matrix:
        julia-version: ['1.7.1']
        python-version: ['3.9']
        os: [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"
        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
            python -c 'import pysr; pysr.install()'
      - name: "Run tests"
        run: python -m unittest test.test
      - name: "Install Torch"
        run: pip install torch # (optional import)
      - name: "Run Torch tests"
        run: python -m unittest test.test_torch