Generate temporary index for testing counting on index #55
This file contains hidden or 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: Build and Test | |
# Workflow is triggered only on push to the master branch or a pull request to | |
# the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
install-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
# Fix ownership of the checkout dir | |
- name: Set ownership | |
run: | | |
chown -R $(id -u):$(id -g) $PWD | |
# Do not use ubuntu image for python setup | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install test dependencies | |
run: | | |
python -m pip install flake8 mypy build | |
- name: Lint with flake8 | |
run: | | |
flake8 . --exclude 'docs/source/conf.py' --count --statistics | |
- name: Type check with mypy | |
run: | | |
mypy newmap tests | |
- name: Build AvxWindowFmIndex libraries | |
run: | | |
./build_libraries.sh | |
- name: Build wheel | |
run: | | |
python -m build --wheel | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: newmap-test-build | |
path: dist/* | |
- name: Install from wheel | |
run: | | |
python --version | |
python -m pip install -v dist/*.whl | |
python -m pip list | |
python -m pip show -f newmap | |
- name: Run tests | |
run: | | |
# Make sure to be running newmap from installed site-packages | |
cd tests && python -m unittest discover | |
build-wheel: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install --upgrade cibuildwheel | |
- name: Build AvxWindowFmIndex libraries | |
run: | | |
./build_libraries.sh | |
- name: Build wheel(s) | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: newmap-build | |
path: wheelhouse/* |