File tree 3 files changed +94
-4
lines changed
3 files changed +94
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : " Test conda-build"
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - master
8
+ pull_request :
9
+
10
+ jobs :
11
+ build :
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ platform : [ubuntu-latest] # add after 2.6.0: windows-latest, macos-latest
16
+ python-version : ["3.6", "3.8"]
17
+
18
+ runs-on : ${{ matrix.platform }}
19
+
20
+ # The setup-miniconda action needs this to activate miniconda
21
+ defaults :
22
+ run :
23
+ shell : " bash -l {0}"
24
+
25
+ steps :
26
+ - uses : actions/checkout@v2
27
+
28
+ - name : Get conda
29
+ uses : conda-incubator/setup-miniconda@v1
30
+ with :
31
+ python-version : ${{ matrix.python-version }}
32
+
33
+ - name : Prepare
34
+ run : conda install conda-build conda-verify
35
+
36
+ - name : Build
37
+ run : conda build conda.recipe
38
+
39
+ - name : Install
40
+ run : conda install -c ${CONDA_PREFIX}/conda-bld/ python_example
41
+
42
+ - name : Test
43
+ run : python tests/test.py
Original file line number Diff line number Diff line change
1
+ name : " Test pip build"
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ pull_request :
6
+ push :
7
+ branches :
8
+ - master
9
+
10
+ jobs :
11
+ build :
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ platform : [windows-latest, macos-latest, ubuntu-latest]
16
+ python-version : ["2.7", "3.5", "3.8"]
17
+
18
+ runs-on : ${{ matrix.platform }}
19
+
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+
23
+ - uses : actions/setup-python@v2
24
+ with :
25
+ python-version : ${{ matrix.python-version }}
26
+
27
+ - name : Add requirements
28
+ run : python -m pip install --upgrade wheel setuptools
29
+
30
+ # Eventually Microsoft might have an action for setting up
31
+ # MSVC, but for now, this action works:
32
+ - name : Prepare compiler environment for Windows 🐍 2.7
33
+ if : matrix.python-version == 2.7 && runner.os == 'Windows'
34
+ uses : ilammy/msvc-dev-cmd@v1
35
+ with :
36
+ arch : x64
37
+
38
+ # This makes two environment variables available in the following step(s)
39
+ - name : Set Windows 🐍 2.7 environment variables
40
+ if : matrix.python-version == 2.7 && runner.os == 'Windows'
41
+ run : |
42
+ echo "::set-env name=DISTUTILS_USE_SDK::1"
43
+ echo "::set-env name=MSSdk::1"
44
+
45
+ - name : Build and install
46
+ run : pip install --verbose .
47
+
48
+ - name : Test
49
+ run : python tests/test.py
Original file line number Diff line number Diff line change 1
1
package :
2
2
name : python_example
3
- version : {{ environ.get('GIT_DESCRIBE_TAG', 'dev') }}
3
+ version : 0.0.1
4
4
5
5
source :
6
6
path : ..
7
7
8
8
build :
9
- number : {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
10
- {% if environ.get('GIT_DESCRIBE_NUMBER', '0') == '0' %}string: py{{ environ.get('PY_VER').replace('.', '') }}_0
11
- {% else %}string: py{{ environ.get('PY_VER').replace('.', '') }}_{{ environ.get('GIT_BUILD_STR', 'GIT_STUB') }}{% endif %}
9
+ number : 0
12
10
script : |
13
11
# This is a total hack because we are not using conda-forge pybind11. Remove after 2.6.0.
14
12
# And never do this yourself unless you know what you are doing (it
You can’t perform that action at this time.
0 commit comments