Do not try to flush on secondary instances #95
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR check | |
on: | |
pull_request: | |
branches: [main, speedict] | |
jobs: | |
macos: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
py_version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.py_version }} | |
architecture: x64 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
- name: Build wheels - universal2 | |
run: | | |
export MACOSX_DEPLOYMENT_TARGET=10.14 | |
rustup target add aarch64-apple-darwin | |
pip install maturin | |
maturin build --release --target universal2-apple-darwin --out dist | |
- name: Install built wheel - universal2 | |
run: | | |
pip install rocksdict --no-index --find-links dist --force-reinstall || true | |
pip install speedict --no-index --find-links dist --force-reinstall || true | |
- name: Python UnitTest | |
run: | | |
python -m unittest discover -v test | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
windows: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [x64, x86] | |
py_version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.py_version }} | |
architecture: ${{ matrix.target }} | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: 11.0 | |
directory: ${{ runner.temp }}/llvm-11.0 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
- name: Build wheels | |
uses: messense/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist | |
env: | |
LIBCLANG_PATH: ${{ runner.temp }}/llvm-11.0/lib | |
- name: Install built wheel and test | |
run: | | |
pip install rocksdict --no-index --find-links dist --force-reinstall || true | |
pip install speedict --no-index --find-links dist --force-reinstall || true | |
python -m unittest discover -v test | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
manylinux_2_28: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [x86_64] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
architecture: x64 | |
- name: Build Wheels | |
uses: messense/maturin-action@v1 | |
with: | |
rust-toolchain: stable | |
rustup-components: rustfmt | |
target: ${{ matrix.target }} | |
manylinux: 2_28 | |
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12' | |
container: messense/manylinux_2_28-cross:${{ matrix.target }} | |
- name: Install built wheel and test | |
if: matrix.target == 'x86_64' | |
run: | | |
pip install rocksdict --no-index --find-links dist --force-reinstall || true | |
pip install speedict --no-index --find-links dist --force-reinstall || true | |
python -m unittest discover -v test | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
manylinux2014: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [x86_64] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
architecture: x64 | |
- name: Build Wheels | |
uses: messense/maturin-action@v1 | |
with: | |
rust-toolchain: stable | |
rustup-components: rustfmt | |
target: ${{ matrix.target }} | |
manylinux: 2014 | |
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12' | |
container: congyuwang/manylinux2014:${{ matrix.target }} | |
- name: Install built wheel and test | |
if: matrix.target == 'x86_64' | |
run: | | |
pip install rocksdict --no-index --find-links dist --force-reinstall || true | |
pip install speedict --no-index --find-links dist --force-reinstall || true | |
python -m unittest discover -v test | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
linux-cross: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [aarch64] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Build Wheels | |
uses: messense/maturin-action@v1 | |
with: | |
rust-toolchain: stable | |
rustup-components: rustfmt | |
target: ${{ matrix.target }} | |
manylinux: 2_28 | |
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12' | |
container: congyuwang/manylinux_2_28-cross:${{ matrix.target }} | |
- uses: uraimo/run-on-arch-action@v2 | |
if: matrix.target != 'ppc64' | |
name: Install built wheel and test | |
with: | |
arch: ${{ matrix.target }} | |
distro: ubuntu22.04 | |
githubToken: ${{ github.token }} | |
install: | | |
apt-get update | |
apt-get install -y --no-install-recommends python3 python3-pip | |
pip3 install -U pip | |
run: | | |
pip3 install rocksdict --no-index --find-links dist --force-reinstall || true | |
pip3 install speedict --no-index --find-links dist --force-reinstall || true | |
python3 -m unittest discover -v test | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist |