Skip to content

Commit 7b9d4ed

Browse files
committed
add soundtouch workflow
1 parent a64724b commit 7b9d4ed

File tree

7 files changed

+158
-5
lines changed

7 files changed

+158
-5
lines changed

.github/workflows/all.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
run: |
2121
echo '------compile yuv------------------------------------'
2222
.github/workflows/onestep.sh yuv all
23+
echo '------compile soundtouch------------------------------------'
24+
rm -rf build || git reset --hard || git pull origin
25+
.github/workflows/onestep.sh soundtouch all
2326
echo '------compile unibreak------------------------------------'
2427
rm -rf build || git reset --hard || git pull origin
2528
.github/workflows/onestep.sh unibreak all

.github/workflows/soundtouch.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on:
2+
# push:
3+
# branches: [master]
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [master]
7+
8+
name: Create soundtouch Release
9+
10+
jobs:
11+
build:
12+
name: compile soundtouch then deploy
13+
runs-on: macos-14
14+
env:
15+
GH_TOKEN: ${{ github.token }}
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
- name: One Step
20+
run: .github/workflows/onestep.sh soundtouch all

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
MRFFToolChain products was built for ijkplayer : [https://github.com/debugly/ijkplayer](https://github.com/debugly/ijkplayer).
66

7-
At present MRFFToolChain contained `ass、bluray、dav1d、dvdread、ffmpeg、freetype、fribidi、harfbuzz、openssl、opus、unibreak、uavs3d、smb2、yuv`.
7+
At present MRFFToolChain contained `ass、bluray、dav1d、dvdread、ffmpeg、freetype、fribidi、harfbuzz、openssl、opus、unibreak、uavs3d、smb2、yuv、soundtouch`.
88

99
## Supported Plat
1010

@@ -166,6 +166,7 @@ Tips:
166166
| libuavs3d | https://github.com/uavs3/uavs3d.git | 1.2.1 |export GIT_UAVS3D_UPSTREAM=git@xx:yy/UAVS3D.git |
167167
| libsmb2 | https://github.com/sahlberg/libsmb2.git | 6.2 | export GIT_SMB2_UPSTREAM=git@xx:yy/libsmb2.git |
168168
| libyuv | https://github.com/debugly/libyuv.git | stable-eb6e7bb | export GIT_YUV_UPSTREAM=git@xx:yy/yuv.git |
169+
| soundtouch | https://codeberg.org/soundtouch/soundtouch.git | 2.3.3 | export GIT_SOUNDTOUCH_UPSTREAM=git@xx:yy/soundtouch.git |
169170

170171
## Tips
171172

configs/libs/soundtouch.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#! /usr/bin/env bash
2+
#
3+
# Copyright (C) 2021 Matt Reach<[email protected]>
4+
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
#
18+
#
19+
# brew install nasm
20+
# If you really want to compile without asm, configure with --disable-asm.
21+
22+
# LIB_DEPENDS_BIN using string because bash can't export array chttps://stackoverflow.com/questions/5564418/exporting-an-array-in-bash-script
23+
# configure: error: Package requirements (openssl) were not met
24+
25+
export LIB_NAME='soundtouch'
26+
export LIPO_LIBS="libsoundtouch"
27+
export LIB_DEPENDS_BIN="automake autoconf libtool"
28+
export GIT_LOCAL_REPO=extra/soundtouch
29+
export REPO_DIR=soundtouch
30+
export GIT_COMMIT=2.3.3
31+
export GIT_REPO_VERSION=2.3.3
32+
export PRE_COMPILE_TAG=soundtouch-2.3.3-241227155817
33+
34+
# you can export GIT_SOUNDTOUCH_UPSTREAM=git@xx:yy/soundtouch.git use your mirror
35+
if [[ "$GIT_SOUNDTOUCH_UPSTREAM" != "" ]] ;then
36+
export GIT_UPSTREAM="$GIT_SOUNDTOUCH_UPSTREAM"
37+
else
38+
export GIT_UPSTREAM=https://codeberg.org/soundtouch/soundtouch.git
39+
fi

do-compile/soundtouch.sh

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#! /usr/bin/env bash
2+
#
3+
# Copyright (C) 2021 Matt Reach<[email protected]>
4+
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# https://stackoverflow.com/questions/6003374/what-is-cmake-equivalent-of-configure-prefix-dir-make-all-install
18+
# https://cmake.org/cmake/help/v3.28/variable/CMAKE_OSX_SYSROOT.html
19+
# https://cmake.org/cmake/help/v3.14/manual/cmake-toolchains.7.html#switching-between-device-and-simulator
20+
# https://stackoverflow.com/questions/27660048/cmake-check-if-mac-os-x-use-apple-or-apple
21+
22+
set -e
23+
24+
THIS_DIR=$(DIRNAME=$(dirname "$0"); cd "$DIRNAME"; pwd)
25+
cd "$THIS_DIR"
26+
source ../tools/env_assert.sh
27+
28+
echo "=== [$0] check env begin==="
29+
env_assert "XC_ARCH"
30+
env_assert "_XC_ARCH"
31+
env_assert "XC_BUILD_NAME"
32+
env_assert "XCRUN_CC"
33+
env_assert "XC_DEPLOYMENT_TARGET"
34+
env_assert "XC_BUILD_SOURCE"
35+
env_assert "XC_BUILD_PREFIX"
36+
env_assert "XCRUN_SDK_PATH"
37+
env_assert "XC_THREAD"
38+
env_assert "XC_PLAT"
39+
echo "XC_DEBUG:$XC_DEBUG"
40+
echo "===check env end==="
41+
42+
43+
toolchain=$PWD/../tools/ios.toolchain.cmake
44+
45+
echo "----------------------"
46+
echo "[*] configurate $LIB_NAME"
47+
echo "[*] cmake config $cfg"
48+
echo "[*] cmake toolchain $toolchain"
49+
echo "----------------------"
50+
51+
build="${XC_BUILD_SOURCE}/_tmp"
52+
53+
rm -rf "$build"
54+
mkdir -p "$build"
55+
56+
cd "$build"
57+
58+
pf=
59+
if [[ "$XC_PLAT" == 'ios' ]];then
60+
if [[ $_XC_ARCH == 'arm64_simulator' ]];then
61+
pf='SIMULATORARM64'
62+
elif [[ $_XC_ARCH == 'x86_64_simulator' ]];then
63+
pf='SIMULATOR64'
64+
else
65+
pf='OS64'
66+
fi
67+
elif [[ "$XC_PLAT" == 'tvos' ]];then
68+
if [[ $_XC_ARCH == 'arm64_simulator' ]];then
69+
pf='SIMULATORARM64_TVOS'
70+
elif [[ $_XC_ARCH == 'x86_64_simulator' ]];then
71+
pf='SIMULATOR_TVOS'
72+
else
73+
pf='TVOS'
74+
fi
75+
elif [[ "$XC_PLAT" == 'macos' ]];then
76+
if [[ $_XC_ARCH == 'arm64' ]];then
77+
pf='MAC_ARM64'
78+
elif [[ $_XC_ARCH == 'x86_64' ]];then
79+
pf='MAC'
80+
fi
81+
fi
82+
83+
cmake -S ${XC_BUILD_SOURCE} -DCMAKE_INSTALL_PREFIX=${XC_BUILD_PREFIX} -GXcode -DCMAKE_TOOLCHAIN_FILE=$toolchain -DPLATFORM=$pf -DSOUNDSTRETCH=0
84+
85+
echo "----------------------"
86+
echo "[*] compile $LIB_NAME"
87+
echo "----------------------"
88+
89+
cmake --build . --target SoundTouch --config Release -- CODE_SIGNING_ALLOWED=NO
90+
cmake --install .

do-compile/uavs3d.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ elif [[ "$XC_PLAT" == 'macos' ]];then
7979
fi
8080
fi
8181

82-
cmake -S ${XC_BUILD_SOURCE} -DCMAKE_INSTALL_PREFIX=${XC_BUILD_PREFIX} -GXcode -DBUILD_SHARED_LIBS=0 -DCMAKE_TOOLCHAIN_FILE=$toolchain -DCOMPILE_10BIT=1 -DPLATFORM=$pf
82+
cmake -S ${XC_BUILD_SOURCE} -DCMAKE_INSTALL_PREFIX=${XC_BUILD_PREFIX} -GXcode -DCMAKE_TOOLCHAIN_FILE=$toolchain -DPLATFORM=$pf -DCOMPILE_10BIT=1 -DBUILD_SHARED_LIBS=0
8383

8484
echo "----------------------"
8585
echo "[*] compile $LIB_NAME"
8686
echo "----------------------"
8787

88-
cmake --build . --target uavs3d --config Release -- CODE_SIGNING_ALLOWED=NO
88+
cmake --build . --target $LIB_NAME --config Release -- CODE_SIGNING_ALLOWED=NO
8989
cmake --install .

do-compile/yuv.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ elif [[ "$XC_PLAT" == 'macos' ]];then
8080
fi
8181
fi
8282

83-
cmake -S ${XC_BUILD_SOURCE} -DCMAKE_INSTALL_PREFIX=${XC_BUILD_PREFIX} -GXcode -DBUILD_SHARED_LIBS=0 -DCMAKE_TOOLCHAIN_FILE=$toolchain -DCOMPILE_10BIT=1 -DPLATFORM=$pf
83+
cmake -S ${XC_BUILD_SOURCE} -DCMAKE_INSTALL_PREFIX=${XC_BUILD_PREFIX} -GXcode -DCMAKE_TOOLCHAIN_FILE=$toolchain -DPLATFORM=$pf
8484

8585
echo "----------------------"
8686
echo "[*] compile $LIB_NAME"
8787
echo "----------------------"
8888

89-
cmake --build . --target yuv --config Release -- CODE_SIGNING_ALLOWED=NO
89+
cmake --build . --target $LIB_NAME --config Release -- CODE_SIGNING_ALLOWED=NO
9090
cmake --install .

0 commit comments

Comments
 (0)