-
-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (66 loc) · 2.14 KB
/
Copy pathpython.yml
File metadata and controls
69 lines (66 loc) · 2.14 KB
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
name: Python
on:
push:
branches: [dev]
pull_request:
branches: [dev]
env:
CARGO_TERM_COLOR: always
jobs:
pytest:
name: Run Tests and Build Wheel
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Configure Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
PROTOC_OS_ARCH=linux-x86_64
echo "::set-env name=PROTOC_OS_ARCH::$PROTOC_OS_ARCH"
- name: Configure MacOS
if: startsWith(matrix.os, 'macos')
run: |
PROTOC_OS_ARCH=osx-x86_64
echo "::set-env name=PROTOC_OS_ARCH::$PROTOC_OS_ARCH"
- name: Install protoc
run: |
PROTOC_VERSION=3.12.4
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-${PROTOC_OS_ARCH}.zip"
unzip -d "${GITHUB_WORKSPACE}" "protoc-${PROTOC_VERSION}-${PROTOC_OS_ARCH}.zip" bin/protoc
chmod +x "${GITHUB_WORKSPACE}/bin/protoc"
${GITHUB_WORKSPACE}/bin/protoc --version
export PATH=${GITHUB_WORKSPACE}/bin/:$PATH
which protoc
echo "::set-env name=PATH::$PATH"
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install pip and pipenv
run: |
pip install --upgrade pip
pip install pipenv
export PATH=/home/runner/.local/bin:$PATH
which pipenv
echo "::set-env name=PATH::$PATH"
- name: Run Python Tests
working-directory: ./platforms/python
run: |
pipenv --python=3.8
pipenv run pipenv install --skip-lock
pipenv run maturin develop
pipenv run pytest
- name: Build Wheel
working-directory: ./platforms/python
run: |
pipenv --python=3.8
pipenv run pipenv install --skip-lock
pipenv run maturin build -i python