-
Notifications
You must be signed in to change notification settings - Fork 617
66 lines (54 loc) · 1.79 KB
/
win-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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: win-build
on:
pull_request: {}
# this yaml file can be cleaned up using yaml anchors, but they're not supported in github actions yet
# https://github.com/actions/runner/issues/1182
env:
TORCH_CUDA_ARCH_LIST: "8.0"
FORCE_CUDA: 1
MAX_JOBS: 4
DISTUTILS_USE_SDK: 1 # otherwise distutils will complain on windows about multiple versions of msvc
XFORMERS_BUILD_TYPE: "Release"
XFORMERS_DISABLE_FLASH_ATTN: 1
jobs:
win_build:
name: win-build
runs-on: windows-2019
env:
PY: python3
timeout-minutes: 360
defaults:
run:
shell: bash
steps:
- name: (Windows) install cuda
uses: okazunori2013/cuda-toolkit@v0.3.2
with:
cuda: "11.7.0"
method: network
- name: (Windows) install python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: (Windows) setup msvc
uses: ilammy/msvc-dev-cmd@v1
- name: configure Pagefile
uses: al-cheb/configure-pagefile-action@v1.2
with:
minimum-size: 8GB
# really unfortunate: https://github.com/ilammy/msvc-dev-cmd#name-conflicts-with-shell-bash
- name: (Windows) Remove link.exe
run: rm /usr/bin/link
- name: Recursive checkout
uses: actions/checkout@v3
with:
submodules: recursive
path: "."
- name: Install build dependencies
run: |
$PY -m pip install wheel setuptools ninja torch==1.13 -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu117
git config --global --add safe.directory "*"
$PY -c "import torch; print('torch', torch.__version__)"
$PY -c "import torch; print('torch.cuda', torch.version.cuda)"
- name: Build
run: $PY setup.py develop