Remove wheel build from test step and verify package contents in Gith… #9
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: | | |
python3 -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: Install | |
run: | | |
python3 -m pip install -v . | |
python3 -m pip list | |
python3 -m pip show -f newmap | |
- name: Run tests | |
run: | | |
python3 -m unittest | |
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@v3 | |
with: | |
name: newmap-build | |
path: wheelhouse/* |