-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# setup for using github runners via https://cirun.io/ | ||
runners: | ||
- name: "aws-runner" | ||
# Cloud Provider: AWS | ||
cloud: "aws" | ||
# https://aws.amazon.com/ec2/instance-types/g4/ | ||
instance_type: "g4dn.xlarge" | ||
# Ubuntu-20.4, ami image | ||
machine_image: "ami-06fd8a495a537da8b" | ||
preemptible: false | ||
# Add this label in the "runs-on" param in .github/workflows/<workflow-name>.yml | ||
# So that this runner is created for running the workflow | ||
labels: | ||
- "cirun-aws-runner" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# cicd workflow for running tests with pytest | ||
# needs to first install pdm, then install torch cpu manually and then install the package | ||
# then run the tests | ||
|
||
name: test (pip install, gpu) | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: "cirun-aws-runner--${{ github.run_id }}" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install torch (GPU CUDA 12.1) | ||
run: | | ||
python -m pip install torch --index-url https://download.pytorch.org/whl/cu121 | ||
- name: Install package (including dev dependencies) | ||
run: | | ||
python -m pip install . | ||
python -m pip install pytest | ||
- name: Run tests | ||
run: | | ||
python -m pytest |