Skip to content

Commit

Permalink
Enable Python 3.9 on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Oct 10, 2020
1 parent f984611 commit 2e14d8f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,34 @@ on:
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true

- name: Build Wheels - Linux
if: startsWith(matrix.os, 'ubuntu')
env:
PYTHON_VERSION: python${{ matrix.python-version }}
run: |
docker build . -t maturin:latest
docker run --rm -v $(pwd):/io maturin:latest sh -c "source ~/.cargo/env && maturin build --release --out wheels"
docker run --rm -v $(pwd):/io maturin:latest sh -c "source ~/.cargo/env && maturin build -i $PYTHON_VERSION --release --out wheels"
- name: Build Wheels - Non-Linux
if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')
run: |
pip install maturin
maturin build --release --out wheels
maturin build -i python --release --out wheels
- name: Install wheel
run: pip install rjieba --no-index --find-links wheels
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,28 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true

- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'

- name: Build Wheels - Linux
if: startsWith(matrix.os, 'ubuntu')
env:
PYTHON_VERSION: python${{ matrix.python-version }}
run: |
docker build . -t maturin:latest
docker run --rm -v $(pwd):/io maturin:latest sh -c "source ~/.cargo/env && maturin build --release --out dist"
docker run --rm -v $(pwd):/io maturin:latest sh -c "source ~/.cargo/env && maturin build -i $PYTHON_VERSION --release --out wheels"
- name: Build Wheels - Non-Linux
if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')
run: |
pip install maturin
maturin build --release --out dist
maturin build -i python --release --out dist
- name: Publish package - Non-Linux
if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/pypa/manylinux1_x86_64
FROM quay.io/pypa/manylinux2010_x86_64

ENV HOME /root
ENV PATH $HOME/.cargo/bin:$PATH
Expand All @@ -10,7 +10,7 @@ RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y

# Add all supported python versions
ENV PATH /opt/python/cp35-cp35m/bin/:/opt/python/cp36-cp36m/bin/:/opt/python/cp37-cp37m/bin/:/opt/python/cp38-cp38/bin/:$PATH
ENV PATH /opt/python/cp35-cp35m/bin/:/opt/python/cp36-cp36m/bin/:/opt/python/cp37-cp37m/bin/:/opt/python/cp38-cp38/bin/:/opt/python/cp39-cp39/bin/:$PATH

RUN python3 -m pip install --no-cache-dir cffi
RUN python3 -m pip install maturin
Expand Down

0 comments on commit 2e14d8f

Please sign in to comment.