-
-
Notifications
You must be signed in to change notification settings - Fork 4
156 lines (154 loc) · 5.56 KB
/
build.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Build and test Python package
on: [push, pull_request]
jobs:
build_docker_prereq:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: whoan/docker-build-with-cache-action@v2
if: github.event_name == 'push' && endsWith(github.event.ref, '/master')
with:
username: "${{ secrets.DOCKER_USERNAME }}"
password: "${{ secrets.DOCKER_PASSWORD }}"
dockerfile: "Dockerfile-sage_conda-cbc_conda"
image_name: "mkoeppe/conda-sagemath-coinor"
docker_build_and_test:
needs: [build_docker_prereq]
runs-on: ubuntu-latest
container: "mkoeppe/conda-sagemath-coinor"
steps:
- uses: actions/checkout@v1
- name: Test package
shell: bash -l {0}
run: |
conda activate sagecoin
sage --version
python3 setup.py test
homebrew_build_and_test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install homebrew cbc and sage
run: |
brew cask install sage --no-quarantine
brew install pkg-config coin-or-tools/coinor/cbc
- name: Test package
run: |
sage --version
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ sage setup.py test
- name: Run parts of the Sage test suite
run: |
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ sage setup.py check_sage_testsuite || echo "Ignoring failures"
- name: Install package
run: |
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ sage -python -m pip install --no-dependencies -v -v .
- name: Patch in
run: ./patch_and_check.sh
conda_build_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v1
- uses: goanpeca/setup-miniconda@v1
with:
auto-update-conda: true
activate-environment: sagecoin
environment-file: environment.yml
python-version: 3.7
auto-activate-base: false
- name: Test package
shell: bash -l {0}
run: |
sage --version
python3 setup.py test
- name: Run parts of the Sage test suite
shell: bash -l {0}
run: sage setup.py check_sage_testsuite || echo "Ignoring failures"
- name: Install package
shell: bash -l {0}
# sage -pip does not work on Ubuntu bionic
run: sage -python -m pip install .
- name: Patch in
shell: bash -l {0}
run: ./patch_and_check.sh
ubuntu_sagemath_build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install SageMath and CBC
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install sagemath coinor-cbc coinor-libcbc-dev python-pkgconfig python-setuptools python-sphinx cython
- name: Show package info
run: |
sage -python -m pip list
- name: Test package
run: |
sage --version
sage setup.py test
- name: Install package
run: |
sage -python -m pip install --no-dependencies -v -v .
- name: Patch in
run: |
sudo sage patch_into_sage_module.py
sage check_get_solver_with_name.py
docker_ubuntu_sagemath_build_and_test:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
# debian:oldstable = stretch only has Sage 7.4, too old.
container: [ "ubuntu:disco", "ubuntu:devel", "debian:stable", "debian:unstable" ]
steps:
- uses: actions/checkout@v1
- name: Install SageMath and CBC
run: |
DEBIAN_FRONTEND=noninteractive apt-get update
DEBIAN_FRONTEND=noninteractive apt-get --yes install sagemath coinor-cbc coinor-libcbc-dev coinor-libcgl-dev coinor-libclp-dev cython g++ python-pip python3-pip libpari-dev
- name: Show package info
run: |
sage -python -m pip list
- name: Test package
run: |
sage --version
sage setup.py test
- name: Install package
run: |
sage -python -m pip install --no-dependencies -v -v .
- name: Patch in
run: ./patch_and_check.sh
docker_fedora_sagemath_build_and_test:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
container: [ "fedora:latest" ]
steps:
- uses: actions/checkout@v1
- name: Install SageMath and CBC
# Bizarre - the Sage doctester fails if the ipywidgets package is not installed. It is not in Fedora.
# File "/usr/lib64/python3.7/site-packages/sage/doctest/forker.py", line 172, in init_sage
# import sage.repl.ipython_kernel.all_jupyter
# File "/usr/lib64/python3.7/site-packages/sage/repl/ipython_kernel/all_jupyter.py", line 7, in <module>
# from .widgets_sagenb import (input_box, text_control, slider,
# File "/usr/lib64/python3.7/site-packages/sage/repl/ipython_kernel/widgets_sagenb.py", line 30, in <module>
# from ipywidgets.widgets import (IntSlider, IntRangeSlider, FloatSlider,
# ModuleNotFoundError: No module named 'ipywidgets'
run: |
yum install -y sagemath coin-or-Cbc-devel python-pip pkg-config python-pkgconfig python3-cysignals-devel gcc-c++ pari-devel
sage -python -m pip install ipywidgets
- name: Show package info
run: |
sage -python -m pip list
- name: Test package
run: |
sage --version
sage setup.py test
- name: Install package
run: |
sage -python -m pip install --no-dependencies -v -v .
- name: Patch in
run: ./patch_and_check.sh