Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
gyzhou2000 committed Nov 8, 2023
1 parent c22006d commit 3cb5259
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/learn-github-actions.yml
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]

0 comments on commit 3cb5259

Please sign in to comment.