Skip to content

Commit

Permalink
other workflow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DBraun committed Sep 18, 2023
1 parent eb641de commit ce91330
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 26 deletions.
38 changes: 16 additions & 22 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,39 @@ jobs:
cd thirdparty/libfaust
sh download_libfaust.sh
# todo: probably don't need to install Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.3
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_PLATFORM: linux
CIBW_BUILD: ${{ matrix.cibwbuild }}
CIBW_BUILD_VERBOSITY: 3
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
CIBW_BEFORE_BUILD_LINUX:
export PYTHONLIBPATH=${{ matrix.pythonLibPath }} && export PYTHONINCLUDEPATH=${{ matrix.pythonInclude }} && pip install --upgrade pip && sh -v build_linux.sh
export PYTHONLIBPATH=${{ matrix.pythonLibPath }} && export PYTHONINCLUDEPATH=${{ matrix.pythonInclude }} && sh -v build_linux.sh
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/dawdreamer:$PWD/thirdparty/libfaust/ubuntu-x86_64/Release/lib && pip install auditwheel-symbols && (auditwheel repair -w {dest_dir} {wheel} || auditwheel-symbols --manylinux 2014 {wheel})
CIBW_TEST_REQUIRES: -r test-requirements.txt soundfile jax[cpu] flax
CIBW_TEST_COMMAND: "rm -rf dawdreamer/*.so* && cd {project}/tests && python -m pytest -v ."
CIBW_ARCHS: auto64
CIBW_ARCHS_LINUX: "auto aarch64" # On an Linux Intel runner with qemu installed, build Intel and ARM wheels
CIBW_ARCHS_LINUX: auto64 aarch64 # On an Linux Intel runner with qemu installed, build Intel and ARM wheels
CIBW_TEST_SKIP: "*38* *39* *311*" # Only care about 310 (current Google Colab version)

- uses: actions/upload-artifact@v3
with:
name: my-wheel-artifact
path: ./wheelhouse/*.whl

build-ubuntu-docker:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Build Docker image
run: docker build -t dawdreamer .

build-windows:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -140,29 +144,19 @@ jobs:
path: ./wheelhouse/*.whl

- name: "Build docs for GitHub pages"
if: ${{ matrix.python-version == '3.8' && github.event_name == 'release' && github.event.action == 'published' }}
if: ${{ matrix.python-version == '3.9' && github.event_name == 'release' && github.event.action == 'published' }}
shell: cmd
run: |
pip install -U sphinx
cd docs && make.bat html
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
# todo: make condition for being on main branch
if: ${{ matrix.python-version == '3.8' && github.event_name == 'release' && github.event.action == 'published' }}
if: ${{ matrix.python-version == '3.9' && github.event_name == 'release' && github.event.action == 'published' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html

build-ubuntu-docker:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Build Docker image
run: docker build -t dawdreamer .

build-macos:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -200,7 +194,7 @@ jobs:
sh download_libfaust.sh
- name: Build wheels ${{ matrix.python-version }}
uses: pypa/cibuildwheel@v2.12.3
uses: pypa/cibuildwheel@v2.15.0
env:
# note that the Projucer project refers to PYTHONMAJOR and pythonLocation, so they must be set here
PYTHONMAJOR: ${{ matrix.python-version }}
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ RUN sh -v build_linux.sh
WORKDIR /DawDreamer
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/DawDreamer/dawdreamer:/DawDreamer/thirdparty/libfaust/ubuntu-x86_64/Release/lib
RUN python3.10 -m venv test-env
RUN /bin/bash -c "source test-env/bin/activate && pip install librosa scipy numpy pytest build wheel && python -m build --wheel && pip install dist/dawdreamer*.whl"

# Don't test because of possible issue with glibc on GitHub Actions
# RUN /bin/bash -c "source test-env/bin/activate && cd tests && pytest -v ."
RUN /bin/bash -c "source test-env/bin/activate && pip install librosa scipy numpy pytest build wheel && python -m build --wheel && pip install dist/dawdreamer*.whl && cd tests && pytest -v ."
Empty file removed dawdreamer/null.c
Empty file.

0 comments on commit ce91330

Please sign in to comment.