MilesCranmer commited on
Commit
25f8cac
1 Parent(s): 2a07166

Make CI less redundant

Browse files
.github/workflows/CI.yml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  on:
2
  push:
3
  branches:
 
1
+ name: CI
2
+
3
  on:
4
  push:
5
  branches:
.github/workflows/CI_Windows.yml CHANGED
@@ -1,3 +1,5 @@
 
 
1
  on:
2
  push:
3
  branches:
@@ -23,8 +25,8 @@ jobs:
23
  runs-on: ${{ matrix.os }}
24
  strategy:
25
  matrix:
26
- julia-version: ['1.5.0', '1.6.1']
27
- python-version: ['3.6', '3.8']
28
  os: [windows-latest]
29
 
30
  steps:
@@ -59,8 +61,6 @@ jobs:
59
  python -m pip install --upgrade pip
60
  pip install -r requirements.txt
61
  python setup.py install
62
- - name: "Install Coverage tool"
63
- run: pip install coverage coveralls
64
  - name: "Run tests"
65
  run: python -m unittest test.test
66
  shell: bash
 
1
+ name: CI_w
2
+
3
  on:
4
  push:
5
  branches:
 
25
  runs-on: ${{ matrix.os }}
26
  strategy:
27
  matrix:
28
+ julia-version: ['1.6.1']
29
+ python-version: ['3.8']
30
  os: [windows-latest]
31
 
32
  steps:
 
61
  python -m pip install --upgrade pip
62
  pip install -r requirements.txt
63
  python setup.py install
 
 
64
  - name: "Run tests"
65
  run: python -m unittest test.test
66
  shell: bash
.github/workflows/CI_mac.yml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: CI_m
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '*'
7
+ paths:
8
+ - 'test/**'
9
+ - 'pysr/**'
10
+ - '.github/workflows/**'
11
+ - 'setup.py'
12
+ - 'Project.toml'
13
+ pull_request:
14
+ branches:
15
+ - '*'
16
+ paths:
17
+ - 'test/**'
18
+ - 'pysr/**'
19
+ - '.github/workflows/**'
20
+ - 'setup.py'
21
+ - 'Project.toml'
22
+
23
+ jobs:
24
+ test:
25
+ runs-on: ${{ matrix.os }}
26
+ strategy:
27
+ matrix:
28
+ julia-version: ['1.6.1']
29
+ python-version: ['3.8']
30
+ os: [macos-latest]
31
+
32
+ steps:
33
+ - uses: actions/[email protected]
34
+ - name: "Set up Julia"
35
+ uses: julia-actions/[email protected]
36
+ with:
37
+ version: ${{ matrix.julia-version }}
38
+ - name: "Change package server"
39
+ shell: bash
40
+ env:
41
+ JULIA_PKG_SERVER: ""
42
+ run: |
43
+ julia -e 'using Pkg; Pkg.Registry.add("General")'
44
+ - name: "Cache dependencies"
45
+ uses: actions/cache@v1 # Thanks FromFile.jl
46
+ env:
47
+ cache-name: cache-artifacts
48
+ with:
49
+ path: ~/.julia/artifacts
50
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
51
+ restore-keys: |
52
+ ${{ runner.os }}-build-${{ env.cache-name }}-
53
+ ${{ runner.os }}-build-
54
+ ${{ runner.os }}-
55
+ - name: "Set up Python"
56
+ uses: actions/setup-python@v1
57
+ with:
58
+ python-version: ${{ matrix.python-version }}
59
+ - name: "Install PySR"
60
+ run: |
61
+ python -m pip install --upgrade pip
62
+ pip install -r requirements.txt
63
+ python setup.py install
64
+ - name: "Run tests"
65
+ run: python -m unittest test.test
66
+ shell: bash
67
+ - name: "Install JAX"
68
+ run: pip install jax jaxlib # (optional import)
69
+ shell: bash
70
+ - name: "Run JAX tests"
71
+ run: python -m unittest test.test_jax
72
+ shell: bash
73
+ - name: "Install Torch"
74
+ run: pip install torch # (optional import)
75
+ shell: bash
76
+ - name: "Run Torch tests"
77
+ run: python -m unittest test.test_torch
78
+ shell: bash