-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
c22006d
commit 3cb5259
Showing
1 changed file
with
80 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,80 @@ | ||
name: Build and Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Checkout master and HEAD | ||
run: | | ||
git checkout -t origin/master | ||
git checkout ${{ github.event.pull_request.head.sha }} | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10.2' | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r .circleci/requirements.txt # Assuming requirements.txt is located in the .circleci directory | ||
- name: Install PyTorch, torchvision and torchaudio | ||
run: | | ||
pip install torch==1.12.1+cpu torchvision==0.13.1+cpu torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cpu | ||
- name: Install llvmlite | ||
run: | | ||
pip install llvmlite | ||
- name: Install package | ||
run: | | ||
python setup.py install build_ext --inplace | ||
- name: Run TF tests | ||
run: | | ||
TL_BACKEND=tensorflow pytest | ||
- name: Run TH tests | ||
run: | | ||
TL_BACKEND=torch pytest | ||
- name: Run PD tests | ||
run: | | ||
TL_BACKEND=paddle pytest | ||
#name: redis | ||
#version: 5.6 | ||
#port: 6379 | ||
#stdin: true | ||
#image: null/~ | ||
##data and time formate ISO 8601 | ||
#data: 2023-11-04 | ||
#time: 2023-11-04T08:30:10+08:00 | ||
# | ||
#long string: > | ||
# hello world, I am | ||
# a student in BUPT. | ||
# | ||
# | ||
# | ||
#one: 1 | ||
#two: 2 | ||
#three: | ||
# four: 4 | ||
# five: 5 | ||
#values: | ||
# - value1 | ||
# - value2 | ||
# - value3 | ||
# | ||
#valuetemp: [value, value22] | ||
|