-
Notifications
You must be signed in to change notification settings - Fork 87
58 lines (56 loc) · 1.93 KB
/
test_windows_job.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
name: Test build/test windows workflow
on:
pull_request:
paths:
- .github/workflows/windows_job.yml
- .github/workflows/test_windows_job.yml
workflow_dispatch:
jobs:
test-cpu:
uses: ./.github/workflows/windows_job.yml
with:
runner: windows.4xlarge
test-infra-repository: ${{ github.repository }}
test-infra-ref: ${{ github.ref }}
submodules: "recursive"
job-name: "win-py3.8-cpu"
script: |
conda create --yes --quiet -n test python=3.8
conda activate test
python -m pip install --index-url https://download.pytorch.org/whl/nightly/cpu --pre torch
# Can import pytorch
python -c 'import torch'
test-gpu:
uses: ./.github/workflows/windows_job.yml
with:
runner: windows.8xlarge.nvidia.gpu
test-infra-repository: ${{ github.repository }}
test-infra-ref: ${{ github.ref }}
submodules: ${{ 'true' }}
job-name: "win-py3.8-cu118"
timeout: 60
script: |
conda create --yes --quiet -n test python=3.8
conda activate test
python -m pip install --index-url=https://download.pytorch.org/whl/nightly/cu118 --pre torch
# Can import pytorch, cuda is available
python -c 'import torch;assert(torch.cuda.is_available())'
test-upload-artifact:
uses: ./.github/workflows/windows_job.yml
with:
runner: windows.4xlarge
test-infra-repository: ${{ github.repository }}
test-infra-ref: ${{ github.ref }}
upload-artifact: my-cool-artifact
script: |
echo "hello" > "${RUNNER_ARTIFACT_DIR}/cool_beans"
test-download-artifact:
needs: test-upload-artifact
uses: ./.github/workflows/windows_job.yml
with:
runner: windows.4xlarge
test-infra-repository: ${{ github.repository }}
test-infra-ref: ${{ github.ref }}
download-artifact: my-cool-artifact
script: |
grep "hello" "${RUNNER_ARTIFACT_DIR}/cool_beans"