-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathbuild.yml
50 lines (40 loc) · 1.49 KB
/
build.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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest] # macos-13 (intel) did not work because it requires a different version of pytorch
python-version: ["3.9", "3.12"] #, "3.13"] python v 3.13 did not work for the 3 OS tested. TODO: fix this
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (Unix)
if: runner.os != 'Windows'
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if (Test-Path requirements.txt) { pip install -r requirements.txt }
- name: Build Package
run: |
pip install -e . -v
# - name: Run tests
# run: |
# pytest