Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 26 additions & 39 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Run check and build of the lib using the Bitcraze builder docker image
name: Nightly Build

on:
Expand All @@ -13,78 +12,66 @@ jobs:
matrix:
os: [ubuntu-latest, lab-mac, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
exclude:
- os: lab-mac
python-version: "3.13"

runs-on: ${{ matrix.os }}

env:
UV_PYTHON_PREFERENCE: only-managed

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
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Set up Python ${{ matrix.python-version }} and venv on macOS
if: runner.os == 'macOS'
- name: Create venv
shell: bash
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
uv venv --clear --python ${{ matrix.python-version }}
if [ "$RUNNER_OS" = "Windows" ]; then
echo "$PWD/.venv/Scripts" >> $GITHUB_PATH
else
echo "$PWD/.venv/bin" >> $GITHUB_PATH
fi

- 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
run: uv build --wheel

- name: Install the built wheel
shell: bash
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'
uv pip install "$WHEEL_FILE"

- name: Test
run: python3 -m unittest discover test/
run: python -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
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.x'
python-version: "3.13"
enable-cache: true
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install pdoc3 pyyaml
uv venv --clear
uv pip install -e . pdoc3
echo "$PWD/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$PWD/.venv" >> $GITHUB_ENV
- name: Build docs
run: ./tools/build-docs/build-docs
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dependencies = [
"scipy~=1.14",
"numpy~=2.2",
"packaging~=25.0",
"pyyaml>=6.0.3",
]

[project.urls]
Expand Down
Loading