Nightly Build #18
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
# Run check and build of the lib using the Bitcraze builder docker image | |
name: Nightly Build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
build-and-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, lab-mac, windows-latest] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
if: runner.os == 'Linux' || runner.os == 'Windows' | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Python ${{ matrix.python-version }} and venv on macOS | |
if: runner.os == 'macOS' | |
run: | | |
brew install python@${{ matrix.python-version }} | |
$(brew --prefix)/bin/python${{ matrix.python-version }} -m venv venv | |
echo "PATH=$(pwd)/venv/bin:$PATH" >> $GITHUB_ENV | |
- name: Set up MSVC environment (Windows) | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
if: runner.os == 'Windows' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip build setuptools | |
python3 -m pip install pre-commit | |
- name: Code quality checks | |
run: pre-commit run --all-files | |
- name: Build wheel | |
run: python3 -m build --wheel | |
- name: Install the built wheel | |
run: | | |
# Find the built wheel | |
WHEEL_FILE=$(ls dist/*.whl | head -n 1) | |
echo "Installing wheel: $WHEEL_FILE" | |
pip install "$WHEEL_FILE" | |
shell: bash | |
if: runner.os != 'Windows' | |
- name: Install the built wheel (Windows) | |
run: | | |
for /f %%i in ('dir /b dist\*.whl') do set WHEEL_FILE=dist\%%i | |
echo Installing wheel: %WHEEL_FILE% | |
pip install %WHEEL_FILE% | |
shell: cmd | |
if: runner.os == 'Windows' | |
- name: Test | |
run: python3 -m unittest discover test/ | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools | |
python3 -m pip install pdoc3 pyyaml | |
- name: Build docs | |
run: ./tools/build-docs/build-docs |