RapidFuzz/.github/workflows/branchbuild.yml

133 lines
3.4 KiB
YAML
Raw Normal View History

2022-08-10 18:27:00 +00:00
name: Test Build
2021-09-23 20:41:10 +00:00
on:
push:
2022-08-10 18:27:00 +00:00
paths-ignore:
- 'docs/**'
2021-09-23 20:41:10 +00:00
jobs:
2022-02-12 17:58:10 +00:00
no_cython_install:
name: "Test install with generated cython files"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
2022-06-28 21:24:20 +00:00
with:
submodules: 'true'
2022-02-12 17:58:10 +00:00
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2022-08-07 10:22:10 +00:00
pip install numpy rapidfuzz_capi Cython==3.0.0a11
2022-02-12 17:58:10 +00:00
- name: Generate cython
run: |
2022-07-04 17:55:28 +00:00
chmod +x ./src/rapidfuzz/generate.sh
./src/rapidfuzz/generate.sh
2022-02-12 17:58:10 +00:00
- name: build
run: |
2022-06-09 11:37:27 +00:00
git apply ./tools/sdist.patch
2022-02-12 17:58:10 +00:00
pip install build; python -m build --sdist
# test whether tarball contains all files required for compiling
pip install dist/rapidfuzz-*.tar.gz -v
system_install:
name: "Test installation using system supplied libs"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
2022-06-28 21:24:20 +00:00
with:
submodules: 'true'
- name: Install rapidfuzz-cpp
run: |
git clone https://github.com/maxbachmann/rapidfuzz-cpp.git
cd rapidfuzz-cpp
git checkout v1.0.1
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo cmake --build . --target install
- name: Install taskflow
run: |
git clone https://github.com/taskflow/taskflow.git
cd taskflow
git checkout v2.7.0
mkdir build && cd build
cmake .. -DTF_BUILD_TESTS=0 -DTF_BUILD_EXAMPLES=0
cmake --build .
sudo cmake --build . --target install
- name: build
run: |
pip install . -v
2022-02-12 17:58:10 +00:00
system_install2:
name: "Test installation using newest version of Taskflow"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
2022-06-28 21:24:20 +00:00
with:
submodules: 'true'
- name: Install taskflow
run: |
git clone https://github.com/taskflow/taskflow.git
cd taskflow
git checkout v3.3.0
mkdir build && cd build
cmake .. -DTF_BUILD_TESTS=0 -DTF_BUILD_EXAMPLES=0
cmake --build .
sudo cmake --build . --target install
- name: build
run: |
pip install . -v
2021-09-23 20:41:10 +00:00
tests:
name: "Python ${{ matrix.python-version }}"
2022-02-12 17:58:10 +00:00
runs-on: ${{matrix.os}}
2021-09-23 20:41:10 +00:00
strategy:
2022-02-11 19:50:52 +00:00
fail-fast: false
2021-09-23 20:41:10 +00:00
matrix:
2022-10-06 19:32:12 +00:00
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
2021-09-23 20:41:10 +00:00
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: "actions/checkout@v2"
2022-06-28 21:24:20 +00:00
with:
submodules: 'true'
2021-09-23 20:41:10 +00:00
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2022-10-24 17:49:52 +00:00
pip install pytest hypothesis pandas mypy pyinstaller[hook_testing]
2021-09-23 20:41:10 +00:00
- name: build
run: |
pip install . -v
2021-09-23 20:41:10 +00:00
2022-10-06 21:30:15 +00:00
#- name: Test type stubs
# run: |
# python -m mypy.stubtest rapidfuzz --ignore-missing-stub
2022-02-11 19:50:52 +00:00
2022-02-19 15:43:06 +00:00
- name: Test with pytest and backtrace in case of SegFault
if: runner.os == 'Linux'
run: |
tools/seg_wrapper.sh pytest tests
2021-09-23 20:41:10 +00:00
- name: Test with pytest
2022-02-19 15:43:06 +00:00
if: runner.os != 'Linux'
2021-09-23 20:41:10 +00:00
run: |
pytest tests
2022-10-24 17:49:52 +00:00
- name: test pyinstaller packaging
run: |
python -m PyInstaller.utils.run_tests --include_only rapidfuzz.