Commit 1e01978f authored by Mat's avatar Mat
Browse files

Add CI file

Add rules to build the extension in CI with python2 and python3, and
another rule to release to PyPI.
parent 38dcfe94
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+47 −0
Original line number Diff line number Diff line
#
# This file is part of SharedArray.
# Copyright (C) 2014-2017 Mathieu Mirmont <mat@parad0x.org>
#
# SharedArray is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# SharedArray is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SharedArray.  If not, see <http://www.gnu.org/licenses/>.
#

image: debian:stable-slim

variables:
  DEBIAN_FRONTEND: "noninteractive"

before_script:
  - apt-get update

build:python2:
  stage: build
  script:
    - apt-get install -y libc6-dev gcc make python-numpy python-dev
    - python setup.py build_ext --inplace

build:python3:
  stage: build
  script:
    - apt-get install -y libc6-dev gcc make python3-numpy python3-dev
    - python3 setup.py build_ext --inplace

release:
  stage: deploy
  only:
    - tags
  script:
    - apt-get install -y python-numpy python-pypandoc ca-certificates
    - test $(python setup.py --version) = $CI_COMMIT_TAG
    - echo "$PYPIRC" > "$HOME/.pypirc"
    - python setup.py sdist upload -r pypi