-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
53 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# Check if WAVPACK_VERSION argument is provided | ||
if [ -z "$1" ]; then | ||
echo "Error: WAVPACK_VERSION argument is required." | ||
exit 1 | ||
else | ||
WAVPACK_VERSION=$1 | ||
fi | ||
|
||
# Check if TARGET_FOLDER argument is provided | ||
if [ -n "$1" ]; then | ||
TARGET_FOLDER=$1 | ||
# Create the target folder if it doesn't exist | ||
if [ -z "$2" ]; then | ||
TARGET_FOLDER=$(pwd) | ||
else | ||
TARGET_FOLDER=$2 | ||
mkdir -p "$TARGET_FOLDER" | ||
# Change directory to the target folder | ||
cd "$TARGET_FOLDER" | ||
fi | ||
|
||
CWD=$(pwd) | ||
cd "$TARGET_FOLDER" | ||
|
||
echo "Installing WavPack $WAVPACK_VERSION into $TARGET_FOLDER - CWD: $CWD" | ||
|
||
sudo apt update | ||
sudo apt install wget | ||
sudo apt install -y gettext | ||
|
||
WAVPACK_LATEST_VERSION="$(cat .github/wavpack_latest_version.txt)" | ||
|
||
wget "https://www.wavpack.com/wavpack-$WAVPACK_LATEST_VERSION.tar.bz2" | ||
tar -xf wavpack-$WAVPACK_LATEST_VERSION.tar.bz2 | ||
cd wavpack-$WAVPACK_LATEST_VERSION | ||
wget "https://www.wavpack.com/wavpack-${WAVPACK_VERSION}.tar.bz2" | ||
tar -xf wavpack-$WAVPACK_VERSION.tar.bz2 | ||
cd wavpack-$WAVPACK_VERSION | ||
./configure | ||
sudo make install | ||
cd .. | ||
cd .. | ||
|
||
echo "WavPack $WAVPACK_VERSION installed into $TARGET_FOLDER Changing directory to: $CWD" | ||
cd "$CWD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,35 +23,41 @@ jobs: | |
echo "GLIBC Version: $GLIBC_VERSION" | ||
echo "GLIBC_VERSION=$GLIBC_VERSION" >> $GITHUB_ENV | ||
- name: Build wavpack libraries | ||
id: build-wavpack | ||
run: | | ||
WAVPACK_LATEST_VERSION="$(cat .github/wavpack_latest_version.txt)" | ||
TARGET_FOLDER="./wavpack_src" | ||
WAVPACK_LATEST_VERSION="$(cat ./.github/wavpack_latest_version.txt)" | ||
echo "wavpack latest version: $WAVPACK_LATEST_VERSION" | ||
TARGET_FOLDER="$(pwd)/wavpack_src" | ||
chmod +x ./.github/scripts/install-wavpack-linux.sh | ||
./.github/scripts/install-wavpack-linux.sh $TARGET_FOLDER | ||
./.github/scripts/install-wavpack-linux.sh $WAVPACK_LATEST_VERSION $TARGET_FOLDER | ||
# copy the built library to the libraries/folder | ||
LIB_FOLDER_NAME="$WAVPACK_LATEST_VERSION/linux-x86_64-glibc$GLIBC_VERSION" | ||
echo "LIB_FOLDER_NAME=$LIB_FOLDER_NAME" >> $GITHUB_ENV | ||
echo "LIB_FOLDER_NAME=$LIB_FOLDER_NAME" >> "$GITHUB_OUTPUT" | ||
WAVPACK_NUMCODECS_LIB_PATH="src/wavpack_numcodecs/libraries/$LIB_FOLDER_NAME" | ||
echo "WAVPACK_NUMCODECS_LIB_PATH=$WAVPACK_NUMCODECS_LIB_PATH" >> $GITHUB_ENV | ||
# find compiled library | ||
LIBWAVPACK_PATH="$(find $TARGET_FOLDER/src/.libs -type f | grep libwavpack.so)" | ||
mv $LIBWAVPACK_PATH $WAVPACK_NUMCODECS_LIB_PATH/libwavpack.so | ||
rm -r $TARGET_FOLDER | ||
LIBWAVPACK_PATH="$(find $TARGET_FOLDER/wavpack-$WAVPACK_LATEST_VERSION/src/.libs -type f | grep libwavpack.so)" | ||
mkdir -p $WAVPACK_NUMCODECS_LIB_PATH | ||
cp $LIBWAVPACK_PATH $WAVPACK_NUMCODECS_LIB_PATH/libwavpack.so | ||
sudo rm -f -r $TARGET_FOLDER | ||
- name: Install wavpack numcodecs | ||
run: | | ||
pip install .[test] | ||
- name: Test imports | ||
run: | | ||
pytest -s tests/test_imports.py | ||
- name: Test with pytest | ||
- name: Create commits | ||
run: | | ||
pytest -v | ||
git config user.name 'Alessio Buccino' | ||
git config user.email '[email protected]' | ||
git config core.fileMode false | ||
git add -f $WAVPACK_NUMCODECS_LIB_PATH/libwavpack.so | ||
git commit -m "Updated ${{ steps.build-wavpack.outputs.LIB_FOLDER_NAME }} wavpack binaries" | ||
- name: Make PR with updated binaries | ||
uses: peter-evans/create-pull-request@v3 | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
commit-message: "Update $LIB_FOLDER_NAME wavpack binaries" | ||
title: "Update wavpack binaries" | ||
body: "This PR updates the wavpack binaries." | ||
branch: "update-wavpack-binaries" | ||
title: "Update wavpack binaries for ${{ steps.build-wavpack.outputs.LIB_FOLDER_NAME }}" | ||
body: "This PR updates the wavpack binaries for ${{ steps.build-wavpack.outputs.LIB_FOLDER_NAME }}" | ||
branch-suffix: short-commit-hash | ||
base: "main" | ||
add-paths: "src/wavpack_numcodecs/libraries" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "wavpack-numcodecs" | ||
version = "0.2.0" | ||
version = "0.2.1" | ||
description = "Numcodecs implementation of WavPack audio codec." | ||
authors = [ | ||
{name = "Alessio Buccino", email = "[email protected]"}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file removed
BIN
-668 KB
src/wavpack_numcodecs/libraries/5.7.0/linux-x86_64_glibc2.35/libwavpack.so
Binary file not shown.