Commit b67ad2a8 authored by yan.yan's avatar yan.yan
Browse files

fix permission for linux CI

parent f5f5e944
...@@ -11,56 +11,56 @@ on: ...@@ -11,56 +11,56 @@ on:
- '*' - '*'
jobs: jobs:
build-windows: # build-windows:
runs-on: windows-latest # runs-on: windows-latest
strategy: # strategy:
matrix: # matrix:
python-version: ['3.7', '3.8', '3.9', '3.10'] # python-version: ['3.7', '3.8', '3.9', '3.10']
cuda-version: ['10.2', '11.1', '11.4'] # cuda-version: ['10.2', '11.1', '11.4']
steps: # steps:
- uses: actions/checkout@master # - uses: actions/checkout@master
- name: Install CUDA # - name: Install CUDA
env: # env:
CUDA_VERSION: ${{ matrix.cuda-version }} # CUDA_VERSION: ${{ matrix.cuda-version }}
PYTHON_VERSION: ${{ matrix.python-version }} # PYTHON_VERSION: ${{ matrix.python-version }}
cuda: ${{ matrix.cuda-version }} # cuda: ${{ matrix.cuda-version }}
if: (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) && (env.CUDA_VERSION != '') ) || (env.CUDA_VERSION == '11.1' && env.PYTHON_VERSION == '3.10') # if: (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) && (env.CUDA_VERSION != '') ) || (env.CUDA_VERSION == '11.1' && env.PYTHON_VERSION == '3.10')
shell: powershell # shell: powershell
run: .\tools\install_windows_cuda.ps1 # run: .\tools\install_windows_cuda.ps1
- name: Set up Python ${{ matrix.python-version }} # - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 # uses: actions/setup-python@v2
with: # with:
python-version: ${{ matrix.python-version }} # python-version: ${{ matrix.python-version }}
- uses: ilammy/msvc-dev-cmd@v1 # - uses: ilammy/msvc-dev-cmd@v1
- name: Install pep build # - name: Install pep build
run: | # run: |
python -m pip install build --user # python -m pip install build --user
python -m pip install --upgrade pip twine wheel # python -m pip install --upgrade pip twine wheel
python -m pip install pytest setuptools # python -m pip install pytest setuptools
- name: Build a windows binary wheel # - name: Build a windows binary wheel
env: # env:
CUDA_VERSION: ${{ matrix.cuda-version }} # CUDA_VERSION: ${{ matrix.cuda-version }}
PYTHON_VERSION: ${{ matrix.python-version }} # PYTHON_VERSION: ${{ matrix.python-version }}
if: (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) ) || (env.CUDA_VERSION == '11.1' && env.PYTHON_VERSION == '3.10') # if: (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) ) || (env.CUDA_VERSION == '11.1' && env.PYTHON_VERSION == '3.10')
run: | # run: |
$Env:CUMM_CUDA_VERSION = "${{ matrix.cuda-version }}" # $Env:CUMM_CUDA_VERSION = "${{ matrix.cuda-version }}"
$Env:CUMM_CUDA_ARCH_LIST = "all" # $Env:CUMM_CUDA_ARCH_LIST = "all"
$Env:SPCONV_DISABLE_JIT = "1" # $Env:SPCONV_DISABLE_JIT = "1"
pip install pccm pybind11 # pip install pccm pybind11
python -m build --wheel --outdir dist/ . # python -m build --wheel --outdir dist/ .
shell: powershell # shell: powershell
- name: Publish a Python distribution to PyPI # - name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: | # run: |
$Env:TWINE_USERNAME = "__token__" # $Env:TWINE_USERNAME = "__token__"
$Env:TWINE_PASSWORD = "${{ secrets.pypi_password }}" # $Env:TWINE_PASSWORD = "${{ secrets.pypi_password }}"
twine upload dist/* # twine upload dist/*
shell: powershell # shell: powershell
build: build:
needs: build-windows # needs: build-windows
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy: strategy:
matrix: matrix:
...@@ -86,8 +86,9 @@ jobs: ...@@ -86,8 +86,9 @@ jobs:
PYTHON_VERSION: ${{ matrix.python-version }} PYTHON_VERSION: ${{ matrix.python-version }}
DOCKER_IMAGE: scrin/manylinux2014-cuda:cu${{ matrix.cuda-version }}-devel DOCKER_IMAGE: scrin/manylinux2014-cuda:cu${{ matrix.cuda-version }}-devel
PLAT: manylinux2014_x86_64 PLAT: manylinux2014_x86_64
if: (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) && (env.CUDA_VERSION != '') ) || env.CUDA_VERSION == '114' if: (github.event_name == 'push' && (startsWith(github.ref, 'refs/tags')) && (env.CUDA_VERSION != '') ) || (env.CUDA_VERSION == '114' && env.PYTHON_VERSION == '3.10')
run: | run: |
chmod +x tools/build-wheels.sh
docker run --rm -e PLAT=$PLAT -e CUMM_CUDA_VERSION=${{ matrix.cuda-version }} -e SPCONV_PYTHON_LIST=${{env.PYTHON_VERSION}} -v `pwd`:/io $DOCKER_IMAGE bash -c "/io/tools/build-wheels.sh" docker run --rm -e PLAT=$PLAT -e CUMM_CUDA_VERSION=${{ matrix.cuda-version }} -e SPCONV_PYTHON_LIST=${{env.PYTHON_VERSION}} -v `pwd`:/io $DOCKER_IMAGE bash -c "/io/tools/build-wheels.sh"
- name: Publish a Python distribution to PyPI - name: Publish a Python distribution to PyPI
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment