-
Notifications
You must be signed in to change notification settings - Fork 478
62 lines (51 loc) · 1.72 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# 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: 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'