Skip to content

Commit 953727b

Browse files
committed
ci: try two more actions, build normal version number
1 parent 5666062 commit 953727b

File tree

3 files changed

+94
-4
lines changed

3 files changed

+94
-4
lines changed

.github/workflows/conda.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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

.github/workflows/pip.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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

conda.recipe/meta.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package:
22
name: python_example
3-
version: {{ environ.get('GIT_DESCRIBE_TAG', 'dev') }}
3+
version: 0.0.1
44

55
source:
66
path: ..
77

88
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
1210
script: |
1311
# This is a total hack because we are not using conda-forge pybind11. Remove after 2.6.0.
1412
# And never do this yourself unless you know what you are doing (it

0 commit comments

Comments
 (0)