Skip to content

Commit

Permalink
Add build wheels CI
Browse files Browse the repository at this point in the history
  • Loading branch information
KinglittleQ committed May 19, 2022
1 parent 797e243 commit 35c6863
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions

name: CI
name: Tests

# Controls when the workflow will run
on:
Expand All @@ -18,20 +18,26 @@ jobs:
# This workflow contains a single job called "Linux"
Linux:
# The type of runner that the job will run on
runs-on: ubuntu-latest
name: Run tests on ${{ matrix.os }}, py ${{ matrix.py_version }}, torch ${{ matrix.torch_version }}
runs-on: ${{ matrix.os }}
env:
DISABLE_TEST_LARGE_SAMPLE: True

strategy:
matrix:
os: [ubuntu-20.04]
py_version: ['3.6', '3.7', '3.8']
torch_version: ['1.8', '1.10']
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: Install Python3
uses: actions/setup-python@v2
with:
python-version: '3.6'
python-version: ${{ matrix.py_version }}
- name: Install packages
run: |
pip install numpy torch cmake tqdm pybind11>=2.8
pip install numpy cmake tqdm pybind11>=2.8
pip install torch==${{ matrix.torch_version }}
sudo apt install -y libaio-dev
- name: Build & Install
run: python setup.py install
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
push:
tags:
- '*'

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} with py ${{ matrix.py_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
py_version: ['3.6', '3.7', '3.8']

steps:
- uses: actions/checkout@v2

- name: Install Python3
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py_version }}

- name: Install packages
run: |
pip install numpy torch cmake tqdm pybind11>=2.8 wheel
sudo apt install -y libaio-dev
- name: Build wheel
run: |
python setup.py clean
python setup.py bdist_wheel
- uses: actions/upload-artifact@v2
with:
path: ./dist/*.whl

0 comments on commit 35c6863

Please sign in to comment.