Skip to content

Commit a1c3399

Browse files
committed
ci: switch to amazon runners
1 parent 0744e23 commit a1c3399

File tree

2 files changed

+23
-27
lines changed

2 files changed

+23
-27
lines changed

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
runs-on: ubuntu-20.04
1212
steps:
1313
- name: Setup Python
14-
uses: actions/setup-python@v2
14+
uses: actions/setup-python@v3
1515
with:
1616
python-version: "3.10"
1717
architecture: x64
1818
- name: Checkout
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020
- name: Install Dependencies
2121
run: |
2222
set -eux

.github/workflows/unittest.yaml

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,29 @@ jobs:
1010
unittest:
1111
strategy:
1212
matrix:
13-
os:
14-
- ubuntu-20.04
15-
- "linux.4xlarge.nvidia.gpu"
16-
runs-on: ${{ matrix.os }}
17-
steps:
18-
- name: Setup Python
19-
uses: actions/setup-python@v2
20-
with:
21-
python-version: "3.10"
22-
architecture: x64
23-
- name: Checkout
24-
uses: actions/checkout@v2
25-
- name: Install Dependencies
26-
run: |
27-
set -eux
13+
include:
14+
- runs-on: "linux.2xlarge"
15+
gpu-arch-type: "cpu"
16+
gpu-arch-version: ""
17+
- runs-on: "linux.4xlarge.nvidia.gpu"
18+
gpu-arch-type: "cuda"
19+
gpu-arch-version: "12.1"
2820

29-
sudo apt-get install -y protobuf-compiler
21+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
22+
with:
23+
timeout: 120
24+
runner: ${{ matrix.runs-on }}
25+
gpu-arch-type: ${{ matrix.gpu-arch-type }}
26+
gpu-arch-version: ${{ matrix.gpu-arch-version }}
27+
script: |
28+
conda create -n venv python=3.10 -y
29+
conda activate venv
3030
31-
pip install -e .[dev] -v
32-
- name: Run Python Tests
33-
run: |
34-
set -eux
31+
yum install -y rust cargo protobuf-compiler
3532
36-
pytest -v
37-
- name: Run Rust Lint
38-
run: |
39-
set -eux
33+
python -m pip install --upgrade pip
34+
pip install -e .[dev] -v
4035
41-
cargo test -v
36+
pytest -v
37+
cargo test -v
4238

0 commit comments

Comments
 (0)