RapidFuzz/.github/workflows/branchbuild.yml

134 lines
3.5 KiB
YAML
Raw Normal View History

2021-09-23 20:41:10 +00:00
name: Build
on:
push:
branches-ignore:
- main
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"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2022-03-06 17:57:34 +00:00
pip install numpy rapidfuzz_capi Cython==3.0.0a10
2022-02-12 17:58:10 +00:00
- name: Generate cython
run: |
2022-03-06 12:24:01 +00:00
chmod +x ./rapidfuzz/generate.sh
./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"
- 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 jarowinkler-cpp
run: |
git clone https://github.com/maxbachmann/jarowinkler-cpp.git
cd jarowinkler-cpp
git checkout v1.0.0
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"
- 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:
python-version: ["3.6", "3.9", "3.10"]
2021-09-23 20:41:10 +00:00
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2022-02-11 19:50:52 +00:00
pip install pytest hypothesis pandas mypy
2021-09-23 20:41:10 +00:00
- name: build
run: |
pip install . -v
2021-09-23 20:41:10 +00:00
2022-02-11 19:50:52 +00:00
- name: Test type stubs
if: matrix.python-version != '3.6'
2022-03-06 17:57:34 +00:00
# prevent import from rapidfuzz
working-directory: .github
2022-02-11 19:50:52 +00:00
run: |
python -m mypy.stubtest rapidfuzz --ignore-missing-stub
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