File tree Expand file tree Collapse file tree 3 files changed +82
-0
lines changed Expand file tree Collapse file tree 3 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ pull_request :
9+ types : [opened, reopened, synchronize]
10+
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ jobs :
16+ build :
17+ strategy :
18+ fail-fast : false
19+ matrix :
20+ os : ["ubuntu-22.04", "windows-2022"]
21+ python : ["3.9", "3.10", "3.11", "3.12"]
22+
23+ name : " ${{ matrix.os }} / Python ${{ matrix.python }}"
24+ runs-on : ${{ matrix.os }}
25+
26+ steps :
27+ - uses : actions/checkout@v4
28+
29+ - name : Free Disk Space (Ubuntu)
30+ uses : jlumbroso/free-disk-space@main
31+ with :
32+ tool-cache : false
33+ android : true
34+ dotnet : true
35+ haskell : true
36+ large-packages : false
37+ docker-images : false
38+ swap-storage : false
39+
40+ - name : Set up Python ${{ matrix.python }}
41+ uses : actions/setup-python@v5
42+ with :
43+ python-version : ${{ matrix.python }}
44+ cache : " pip"
45+
46+ - name : Set up CUDA toolkit
47+ uses : Jimver/cuda-toolkit@master
48+ with :
49+ cuda : " 12.4.0"
50+ method : " local"
51+
52+ - name : Install torch with CUDA support
53+ run : python -m pip install torch --index-url https://download.pytorch.org/whl/cu124
54+
55+ - name : Install torchhull
56+ run : python -m pip install --editable ".[dev]"
57+
58+ - name : Run compilation
59+ run : nox --no-venv -s build
60+
61+ check_build :
62+ if : always()
63+
64+ needs :
65+ - build
66+
67+ name : " Check Build"
68+ runs-on : ubuntu-22.04
69+
70+ steps :
71+ - uses : re-actors/alls-green@release/v1
72+ with :
73+ jobs : ${{ toJSON(needs) }}
Original file line number Diff line number Diff line change 1515<a href =" https://github.com/vc-bonn/torchhull/blob/main/LICENSE " >
1616 <img alt="GitHub License" src="https://img.shields.io/badge/License-BSD--3--Clause-green.svg"/>
1717</a >
18+ <a href =" https://github.com/vc-bonn/torchhull/actions/workflows/build.yml " >
19+ <img alt="Build" src="https://github.com/vc-bonn/torchhull/actions/workflows/build.yml/badge.svg">
20+ </a >
1821<a href =" https://github.com/vc-bonn/torchhull/actions/workflows/lint.yml " >
1922 <img alt="Lint" src="https://github.com/vc-bonn/torchhull/actions/workflows/lint.yml/badge.svg">
2023</a >
Original file line number Diff line number Diff line change @@ -170,6 +170,12 @@ def lint(session: nox.Session) -> None:
170170 raise nox .command .CommandFailed
171171
172172
173+ @nox .session
174+ def build (session : nox .Session ) -> None :
175+ """Run the compilation (REQUIRES '--no-venv')."""
176+ session .run ("python" , "-c" , "import torch; import torchhull" , external = True )
177+
178+
173179@nox .session
174180def benchmarks (session : nox .Session ) -> None :
175181 """Runs the benchmarks."""
You can’t perform that action at this time.
0 commit comments