~cnx/palace

1fdc5a648e67279fb04180d197ee8308070017d1 — Nguyễn Gia Phong 7 months ago 41969b4
Flatten CI/CD
7 files changed, 62 insertions(+), 133 deletions(-)

A .build.yml
D .builds/before
D .builds/cp36.yml
D .builds/cp37.yml
D .builds/cp38.yml
D .builds/cp39.yml
M setup.cfg
A .build.yml => .build.yml +60 -0
@@ 0,0 1,60 @@
image: debian/stretch
packages:
  - cmake/stretch-backports
  - libarchive13/stretch-backports-sloppy
  - libasound2-dev
  - libffi-dev
  - libopusfile-dev
  - libpulse-dev
  - libsndfile1-dev
  - libsqlite3-dev
  - libuv1/stretch-backports
  - libvorbis-dev
  - pulseaudio
  - unzip
  - zlib1g-dev
repositories:
  backports: http://deb.debian.org/debian stretch-backports main
  backports-sloppy: http://deb.debian.org/debian stretch-backports-sloppy main
sources:
  - https://github.com/kcat/openal-soft
  - https://github.com/kcat/alure
  - https://github.com/pyenv/pyenv
  - https://git.sr.ht/~cnx/palace
tasks:
  - deps: |
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -S openal-soft -B openal-soft/build
      sudo cmake --build openal-soft/build --parallel `nproc` --target install
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -S alure -B alure/build
      sudo cmake --build alure/build --parallel `nproc` --target install
  - build: |
      sudo pyenv/plugins/python-build/install.sh
      for minor in $(seq 6 9)
      do
        pyenv/bin/pyenv install --list |
          grep \\\s3\\\.$minor |
          tail -1 |
          xargs -I{} sudo python-build {} /usr/local
        python3.$minor -m pip install --upgrade --user pip
        python3.$minor -m pip wheel --wheel-dir=palace/dist --no-deps ./palace
      done
  - repair:
      python3 -m pip install auditwheel
      for wheel in palace/dist/palace-*.whl
      do
        python3 -m auditwheel repair --plat=manylinux_2_24_x86_64 \
          --wheel-dir=manylinux $wheel
      done
  - test:
      python3 -m pip install tox
      python3 -m tox -c palace -e py36,py37,py38,py39
  - upload:
      if [[ $(git tag --points-at HEAD) ]]
      then
        python3 -m pip install twine
        python3 -m twine upload manylinux/palace-*.whl
      fi
environment:
  PIP_PROGRESS_BAR: 'off'
secrets:
  - d5fcfb32-28a9-4a3c-9012-aa68b4b887ff

D .builds/before => .builds/before +0 -16
@@ 1,16 0,0 @@
#!/bin/sh
set -ex
yum install -y git cmake pulseaudio \
  alsa-lib-devel pulseaudio-libs-devel jack-audio-connection-kit-devel \
  libvorbis-devel opusfile-devel libsndfile-devel
pulseaudio --start

pip install cmake>=3.13
git clone --depth 1 https://github.com/kcat/openal-soft
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -S openal-soft -B openal-soft/build
cmake --build openal-soft/build --parallel `nproc` --target install

git clone --depth 1 https://github.com/kcat/alure
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -S alure -B alure/build
cmake --build alure/build --parallel `nproc` --target install
pip uninstall -y cmake

D .builds/cp36.yml => .builds/cp36.yml +0 -29
@@ 1,29 0,0 @@
image: debian/sid
packages:
  - docker.io
  - python3-pip
sources:
  - https://git.sr.ht/~cnx/palace
tasks:
  - cfg: sudo usermod -aG docker $(whoami)
  - ci: |
      cd palace
      python3 -m pip install cibuildwheel
      python3 -m cibuildwheel --output-dir=dist
  - cd: |
      cd palace
      if [[ $(git tag --points-at HEAD) ]]
      then
        python3 -m pip install twine
        python3 -m twine upload dist/*.whl
      fi
environment:
  PIP_PROGRESS_BAR: 'off'
  CIBW_PLATFORM: linux
  CIBW_BUILD: cp36-manylinux_x86_64
  CIBW_BEFORE_BUILD: .builds/before
  CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
  CIBW_TEST_COMMAND: tox -c {project}
  CIBW_TEST_REQUIRES: tox
secrets:
  - d5fcfb32-28a9-4a3c-9012-aa68b4b887ff

D .builds/cp37.yml => .builds/cp37.yml +0 -29
@@ 1,29 0,0 @@
image: debian/sid
packages:
  - docker.io
  - python3-pip
sources:
  - https://git.sr.ht/~cnx/palace
tasks:
  - cfg: sudo usermod -aG docker $(whoami)
  - ci: |
      cd palace
      python3 -m pip install cibuildwheel
      python3 -m cibuildwheel --output-dir=dist
  - cd: |
      cd palace
      if [[ $(git tag --points-at HEAD) ]]
      then
        python3 -m pip install twine
        python3 -m twine upload dist/*.whl
      fi
environment:
  PIP_PROGRESS_BAR: 'off'
  CIBW_PLATFORM: linux
  CIBW_BUILD: cp37-manylinux_x86_64
  CIBW_BEFORE_BUILD: .builds/before
  CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
  CIBW_TEST_COMMAND: tox -c {project}
  CIBW_TEST_REQUIRES: tox
secrets:
  - d5fcfb32-28a9-4a3c-9012-aa68b4b887ff

D .builds/cp38.yml => .builds/cp38.yml +0 -29
@@ 1,29 0,0 @@
image: debian/sid
packages:
  - docker.io
  - python3-pip
sources:
  - https://git.sr.ht/~cnx/palace
tasks:
  - cfg: sudo usermod -aG docker $(whoami)
  - ci: |
      cd palace
      python3 -m pip install cibuildwheel
      python3 -m cibuildwheel --output-dir=dist
  - cd: |
      cd palace
      if [[ $(git tag --points-at HEAD) ]]
      then
        python3 -m pip install twine
        python3 -m twine upload dist/*.whl
      fi
environment:
  PIP_PROGRESS_BAR: 'off'
  CIBW_PLATFORM: linux
  CIBW_BUILD: cp38-manylinux_x86_64
  CIBW_BEFORE_BUILD: .builds/before
  CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
  CIBW_TEST_COMMAND: tox -c {project}
  CIBW_TEST_REQUIRES: tox
secrets:
  - d5fcfb32-28a9-4a3c-9012-aa68b4b887ff

D .builds/cp39.yml => .builds/cp39.yml +0 -29
@@ 1,29 0,0 @@
image: debian/sid
packages:
  - docker.io
  - python3-pip
sources:
  - https://git.sr.ht/~cnx/palace
tasks:
  - cfg: sudo usermod -aG docker $(whoami)
  - ci: |
      cd palace
      python3 -m pip install cibuildwheel
      python3 -m cibuildwheel --output-dir=dist
  - cd: |
      cd palace
      if [[ $(git tag --points-at HEAD) ]]
      then
        python3 -m pip install twine
        python3 -m twine upload dist/*.whl
      fi
environment:
  PIP_PROGRESS_BAR: 'off'
  CIBW_PLATFORM: linux
  CIBW_BUILD: cp39-manylinux_x86_64
  CIBW_BEFORE_BUILD: .builds/before
  CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
  CIBW_TEST_COMMAND: tox -c {project}
  CIBW_TEST_REQUIRES: tox
secrets:
  - d5fcfb32-28a9-4a3c-9012-aa68b4b887ff

M setup.cfg => setup.cfg +2 -1
@@ 29,4 29,5 @@ keywords = openal, alure, hrtf
[options]
zip_safe = False
python_requires = >=3.6
install_requires = typing-extensions; python_version < 3.8
install_requires =
    typing-extensions; python_version < 3.8