mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-22 16:25:30 +00:00
* Update docs-check.yml Bump actions/setup-python to v5 Bump python-version to 3.12 (default on ubuntu-latest) Switch actions-rs/toolchain to dtolnay/rust-toolchain as the former one is no longer maintained * Update node-release.yml Bump actions/setup-python to v5 Switch actions-rs/toolchain to dtolnay/rust-toolchain as the former one is no longer maintained Bump actions/cache to v4 Bump actions/setup-node to v4 Bump actions/upload-artifact to v4 Bump actions/download-artifact to v4 * Update node.yml Switch actions-rs/toolchain to dtolnay/rust-toolchain as the former one is no longer maintained Bump actions/cache to v4 Bump actions/setup-node to v4 * Update python-release-conda.yml Switch actions-rs/toolchain to dtolnay/rust-toolchain as the former one is no longer maintained Bump conda-incubator/setup-miniconda to v3 * Update python-release.yml Bump actions/setup-python to v5 Bump actions/download-artifact to v4 * Update rust-release.yml Switch actions-rs/toolchain to dtolnay/rust-toolchain as the former one is no longer maintained Bump actions/cache to v4 * Update stale.yml Bump actions/stale to v9 * Update python.yml Bump actions/setup-python to v5
130 lines
3.8 KiB
YAML
130 lines
3.8 KiB
YAML
name: Python Release - Conda
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
env:
|
|
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
|
|
|
|
jobs:
|
|
build_and_package:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, macos-latest]
|
|
python: ["3.8", "3.9", "3.10", "3.11"]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install miniconda
|
|
uses: conda-incubator/setup-miniconda@v3
|
|
with:
|
|
auto-update-conda: true
|
|
python-version: ${{ matrix.python }}
|
|
|
|
- name: Conda info
|
|
shell: bash -l {0}
|
|
run: conda info
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup conda env
|
|
shell: bash -l {0}
|
|
run: |
|
|
conda install setuptools-rust
|
|
conda install -c defaults anaconda-client conda-build
|
|
|
|
- name: Extract version
|
|
shell: bash -l {0}
|
|
working-directory: ./bindings/python
|
|
run: echo "TOKENIZERS_VERSION=`grep -m 1 version Cargo.toml | grep -e '".*"' -o | tr -d '"' | sed s/-/./ `" >> $GITHUB_ENV
|
|
|
|
- name: Build conda packages
|
|
shell: bash -l {0}
|
|
run: |
|
|
conda info
|
|
conda list
|
|
conda-build .github/conda --python=${{ matrix.python }}
|
|
|
|
- name: Upload to Anaconda
|
|
shell: bash -l {0}
|
|
run: |
|
|
anaconda upload `conda-build .github/conda --output` --force
|
|
|
|
build_and_package_linux:
|
|
runs-on: ubuntu-latest
|
|
container: quay.io/pypa/manylinux2014_x86_64
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python: [38, 39, 310, 311]
|
|
include:
|
|
- python: 38
|
|
checksum: e2a4438671e0e42c5bba14cb51de6ce9763938184d6ca2967340bbe972bbe7e6
|
|
- python: 39
|
|
checksum: 9829d95f639bd0053b2ed06d1204e60644617bf37dd5cc57523732e0e8d64516
|
|
- python: 310
|
|
checksum: ea5e6e8a3d5a0247b9df85382d27220fac8e59b5778fd313c5913879cd9baafc
|
|
- python: 311
|
|
checksum: 634d76df5e489c44ade4085552b97bebc786d49245ed1a830022b0b406de5817
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install miniconda
|
|
run: |
|
|
yum install -y wget openssl-devel
|
|
export FILENAME=Miniconda3-py${{ matrix.python }}_23.5.2-0-Linux-x86_64.sh
|
|
wget https://repo.anaconda.com/miniconda/$FILENAME
|
|
sha256sum $FILENAME | awk '$1=="${{ matrix.checksum}}"{print"good to go"}'
|
|
bash $FILENAME -b -p $HOME/miniconda
|
|
source $HOME/miniconda/bin/activate
|
|
|
|
- name: Show glibc information
|
|
shell: bash -l {0}
|
|
run: ldd --version
|
|
|
|
- name: Conda info
|
|
shell: bash -l {0}
|
|
run: |
|
|
source $HOME/miniconda/bin/activate
|
|
conda info
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Setup conda env
|
|
shell: bash -l {0}
|
|
run: |
|
|
source $HOME/miniconda/bin/activate
|
|
conda install setuptools-rust
|
|
conda install -c defaults anaconda-client conda-build
|
|
|
|
- name: Extract version
|
|
shell: bash -l {0}
|
|
working-directory: ./bindings/python
|
|
run: |
|
|
source $HOME/miniconda/bin/activate
|
|
echo "TOKENIZERS_VERSION=`grep -m 1 version Cargo.toml | grep -e '".*"' -o | tr -d '"' | sed s/-/./ `" >> $GITHUB_ENV
|
|
|
|
- name: Build conda packages
|
|
shell: bash -l {0}
|
|
run: |
|
|
source $HOME/miniconda/bin/activate
|
|
conda info
|
|
conda list
|
|
conda-build .github/conda --python=${{ matrix.python }}
|
|
|
|
- name: Upload to Anaconda
|
|
shell: bash -l {0}
|
|
run: |
|
|
source $HOME/miniconda/bin/activate
|
|
anaconda upload `conda-build .github/conda --output` --force
|