diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a71c6ce..db4b9dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,6 +59,12 @@ jobs: - target: linuxjack os: ubuntu-18.04 os_name: linux + - target: linux_arm32 + os: ubuntu-18.04 + os_name: linux + - target: linux_arm64 + os: ubuntu-18.04 + os_name: linux - target: macos_x86_64 os: macos-10.15 os_name: macos @@ -73,8 +79,9 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: sreimers/action-archlinux-mingw@main + - name: mingw if: ${{ matrix.os_name == 'mingw' }} + uses: sreimers/action-archlinux-mingw@main with: run: "./dist/build_windows.sh" diff --git a/dist/before_build.sh b/dist/before_build.sh index f17b957..bdf0e36 100755 --- a/dist/before_build.sh +++ b/dist/before_build.sh @@ -3,9 +3,37 @@ if [ "$BUILD_OS" == "linux" ]; then sudo apt-get update sudo apt-get install -y libasound2-dev libjack-jackd2-dev libpulse-dev libpulse0 - wget http://lv2plug.in/spec/lv2-1.14.0.tar.bz2 - tar xjf lv2-1.14.0.tar.bz2 - pushd lv2-1.14.0 && ./waf configure && ./waf build && sudo ./waf install && popd + + if [ "$BUILD_TARGET" == "linux_arm32" ] || [ "$BUILD_TARGET" == "linux_arm64" ]; then + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ + gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf + + wget http://ports.ubuntu.com/pool/main/a/alsa-lib/libasound2_1.1.3-5_armhf.deb + wget http://ports.ubuntu.com/pool/main/a/alsa-lib/libasound2_1.1.3-5_arm64.deb + + wget http://ports.ubuntu.com/pool/main/p/pulseaudio/libpulse0_11.1-1ubuntu7_armhf.deb + wget http://ports.ubuntu.com/pool/main/p/pulseaudio/libpulse0_11.1-1ubuntu7_arm64.deb + + sudo dpkg-deb -x libasound2_1.1.3-5_armhf.deb / + sudo dpkg-deb -x libasound2_1.1.3-5_arm64.deb / + sudo dpkg-deb -x libpulse0_11.1-1ubuntu7_armhf.deb / + sudo dpkg-deb -x libpulse0_11.1-1ubuntu7_arm64.deb / + pushd /usr/lib/arm-linux-gnueabihf + sudo ln -s libasound.so.2.0.0 libasound.so + sudo ln -s libpulse-simple.so.0.1.1 libpulse-simple.so + sudo ln -s libpulse.so.0.20.2 libpulse.so + popd + pushd /usr/lib/aarch64-linux-gnu + sudo ln -s libasound.so.2.0.0 libasound.so + sudo ln -s libpulse-simple.so.0.1.1 libpulse-simple.so + sudo ln -s libpulse.so.0.20.2 libpulse.so + popd + else + + wget http://lv2plug.in/spec/lv2-1.14.0.tar.bz2 + tar xjf lv2-1.14.0.tar.bz2 + pushd lv2-1.14.0 && ./waf configure && ./waf build && sudo ./waf install && popd + fi elif [ "$BUILD_OS" == "macos" ]; then security create-keychain -p travis sl-build.keychain security list-keychains -s ~/Library/Keychains/sl-build.keychain diff --git a/dist/build.sh b/dist/build.sh index 34dc0d7..b56b303 100755 --- a/dist/build.sh +++ b/dist/build.sh @@ -3,22 +3,13 @@ source dist/lib/versions.sh source dist/lib/functions.sh -make_opts="-j4 SYSROOT_ALT=../3rdparty" +make_opts="-j4 SYSROOT_ALT=../3rdparty " if [ "$BUILD_TARGET" == "ccheck" ]; then dist/tools/ccheck.sh exit 0 fi -if [ "$BUILD_TARGET" == "linuxarm" ]; then - git clone https://github.com/raspberrypi/tools $HOME/rpi-tools - export PATH=$PATH:$HOME/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin - export ARCH=arm - export CCPREFIX=$HOME/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- - export CC=arm-linux-gnueabihf-gcc - export CXX=arm-linux-gnueabihf-g++ - export RPI_CROSS_COMPILE=true -fi # Start build #----------------------------------------------------------------------------- @@ -28,24 +19,39 @@ sl_3rdparty sl_extra_lflags="-L ../opus -L ../my_include " sl_extra_cflags="" +if [ "$BUILD_TARGET" == "linux_arm32" ]; then + make_opts+="SYSROOT=/usr/arm-linux-gnueabihf" + sl_extra_lflags+="-L /usr/lib/arm-linux-gnueabihf " + export CC=arm-linux-gnueabihf-gcc + export CXX=arm-linux-gnueabihf-g++ + +fi + +if [ "$BUILD_TARGET" == "linux_arm64" ]; then + make_opts+="SYSROOT=/usr/aarch64-linux-gnu" + sl_extra_lflags+="-L ./usr/lib/aarch64-linux-gnu " + export CC=aarch64-linux-gnu-gcc + export CXX=aarch64-linux-gnu-g++ +fi + if [ "$BUILD_OS" == "macos" ]; then use_ssl='USE_OPENSSL="yes" USE_OPENSSL_DTLS="yes" USE_OPENSSL_SRTP="yes"' else use_ssl='USE_OPENSSL="yes"' fi -if [ "$BUILD_TARGET" == "linux" ]; then - sl_extra_modules="alsa slaudio" +if [ "$BUILD_OS" == "linux" ]; then + sl_extra_modules="alsa slaudio " fi if [ "$BUILD_TARGET" == "linuxjack" ]; then - sl_extra_modules="jack alsa slaudio" + sl_extra_modules+="jack " fi if [ "$BUILD_OS" == "macos" ]; then export MACOSX_DEPLOYMENT_TARGET=10.10 sl_extra_lflags+="-L ../openssl ../openssl/libssl.a ../openssl/libcrypto.a " sl_extra_lflags+="-framework SystemConfiguration " sl_extra_lflags+="-framework CoreFoundation" - sl_extra_modules="slaudio" + sl_extra_modules="slaudio " sed_opt="-i ''" if [ "$BUILD_TARGET" == "macos_arm64" ]; then @@ -62,7 +68,7 @@ if [ "$BUILD_OS" == "macos" ]; then fi fi -sl_extra_modules="$sl_extra_modules g722 slogging dtls_srtp" +sl_extra_modules+="g722 slogging dtls_srtp" # Build libre #----------------------------------------------------------------------------- @@ -93,7 +99,8 @@ if [ ! -d baresip-$baresip ]; then pushd baresip-$baresip # Standalone - if [ "$BUILD_TARGET" == "linux" ] || [ "$BUILD_TARGET" == "linuxjack" ]; then + if [ "$BUILD_TARGET" == "linux" ] || [ "$BUILD_TARGET" == "linuxjack" ] || \ + [ "$BUILD_TARGET" == "linux_arm32" ] || [ "$BUILD_TARGET" == "linux_arm64" ]; then make $debug $make_opts $use_ssl LIBRE_SO=../re LIBREM_PATH=../rem STATIC=1 \ MODULES="opus stdio ice g711 turn stun uuid auloop webapp $sl_extra_modules" \ EXTRA_CFLAGS="-I ../my_include $sl_extra_cflags" \ @@ -232,12 +239,9 @@ fi s3_path="s3_upload/$GIT_BRANCH/$version_t/$BUILD_TARGET" mkdir -p $s3_path -if [ "$BUILD_TARGET" == "linuxjack" ]; then - #./studio-link-standalone -t 5 - ldd studio-link-standalone - - strip --strip-all studio-link-standalone - +if [ "$BUILD_TARGET" == "linuxjack" ] || \ + [ "$BUILD_TARGET" == "linux_arm32" ] || \ + [ "$BUILD_TARGET" == "linux_arm64" ]; then chmod +x studio-link-standalone mv studio-link-standalone studio-link-standalone-$version_tc tar -cvzf studio-link-standalone-$version_tc.tar.gz studio-link-standalone-$version_tc diff --git a/dist/lib/versions.sh b/dist/lib/versions.sh index 68e4f67..06eef71 100644 --- a/dist/lib/versions.sh +++ b/dist/lib/versions.sh @@ -6,7 +6,7 @@ baresip="1.0.0" baresip_lib="1.0.0" re="1.1.0" rem="0.6.0" -sl3rdparty="v21.12.0" +sl3rdparty="v22.02.0" overlay="v19.09.0" juce="6.0.7" github_org="https://github.com/Studio-Link"