rename src/code_base -> src/bmdscore (#73) #46
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: Test Windows | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
pybmds: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pip | |
- name: Set dependency path | |
shell: bash | |
run: | | |
DEP="$GITHUB_WORKSPACE/deps" | |
echo "DEPENDENCY_DIR=$DEP" >> $GITHUB_ENV | |
echo "EIGEN_DIR=$DEP\eigen" >> $GITHUB_ENV | |
echo "NLOPT_DIR=$DEP\nlopt\src\api;$DEP\nlopt\build\Release;$DEP\nlopt\build" >> $GITHUB_ENV | |
echo "GSL_DIR=$DEP\gsl\build\Release;$DEP\gsl\build" >> $GITHUB_ENV | |
- name: Restore dependencies from cache | |
id: cache-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.DEPENDENCY_DIR }} | |
key: ${{runner.os}}-cache-dependencies | |
- name: Build dependencies | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
shell: bash | |
run: tools/windows_ci.sh | |
- name: Build package | |
run: | | |
python -m pip install -U pip wheel | |
python -m pip install -e ".[dev]" | |
stubgen -p pybmds.bmdscore -o src | |
ruff format src/pybmds/bmdscore.pyi | |
python -c "import pybmds; print(pybmds.bmdscore.version())" | |
- name: Check shared object linked files | |
run: | | |
python -m pip install pefile | |
python -c "from pathlib import Path; import pefile; fn = str(list(Path('src/pybmds').glob('bmdscore*'))[0].resolve()); pe = pefile.PE(fn); print([i.dll for i in pe.DIRECTORY_ENTRY_IMPORT])" | |
- name: Build package | |
run: | | |
python -m pip install -U pip wheel | |
python setup.py bdist_wheel | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./dist/*.whl |