Skip to content

Commit d97169f

Browse files
authored
Nightly multi platform multi Python build
1 parent 94a861f commit d97169f

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/nightly.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Run check and build of the lib using the Bitcraze builder docker image
2+
name: Nightly Build
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '0 2 * * *'
8+
9+
jobs:
10+
build-and-test:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest, lab-mac, windows-latest]
15+
python-version: ["3.10", "3.11", "3.12", "3.13"]
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
if: runner.os == 'Linux' || runner.os == 'Windows'
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Set up Python ${{ matrix.python-version }} and venv on macOS
30+
if: runner.os == 'macOS'
31+
run: |
32+
brew install python@${{ matrix.python-version }}
33+
$(brew --prefix)/bin/python${{ matrix.python-version }} -m venv venv
34+
echo "PATH=$(pwd)/venv/bin:$PATH" >> $GITHUB_ENV
35+
36+
- name: Install dependencies
37+
run: |
38+
python3 -m pip install --upgrade pip build setuptools
39+
python3 -m pip install pre-commit
40+
41+
- name: Code quality checks
42+
run: pre-commit run --all-files
43+
44+
- name: Build wheel
45+
run: python3 -m build --wheel
46+
47+
- name: Install the built wheel
48+
run: |
49+
# Find the built wheel
50+
WHEEL_FILE=$(ls dist/*.whl | head -n 1)
51+
echo "Installing wheel: $WHEEL_FILE"
52+
pip install "$WHEEL_FILE"
53+
shell: bash
54+
if: runner.os != 'Windows'
55+
56+
- name: Install the built wheel (Windows)
57+
run: |
58+
for /f %%i in ('dir /b dist\*.whl') do set WHEEL_FILE=dist\%%i
59+
echo Installing wheel: %WHEEL_FILE%
60+
pip install %WHEEL_FILE%
61+
shell: cmd
62+
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)