diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index e72fd26d..2a4b4adc 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -73,7 +73,7 @@ jobs: working-directory: ${{github.workspace}}/build_windows run: | export PATH=${{github.workspace}}/llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64/bin:$PATH - make -j6 package + make -j$(nproc) package - name: Rename installer shell: bash @@ -153,26 +153,26 @@ jobs: working-directory: ${{github.workspace}}\FreeDV-Install-Location\bin run: | .\TestFreeDVFullDuplex.ps1 -RadioToComputerDevice "${{env.RADIO_TO_COMPUTER_DEVICE}}" -ComputerToRadioDevice "${{env.COMPUTER_TO_RADIO_DEVICE}}" -MicrophoneToComputerDevice "${{env.MICROPHONE_TO_COMPUTER_DEVICE}}" -ComputerToSpeakerDevice "${{env.COMPUTER_TO_SPEAKER_DEVICE}}" -ModeToTest RADEV1 -NumberOfRuns 1 - timeout-minutes: 5 + timeout-minutes: 10 - name: Test 700D shell: pwsh working-directory: ${{github.workspace}}\FreeDV-Install-Location\bin run: | .\TestFreeDVFullDuplex.ps1 -RadioToComputerDevice "${{env.RADIO_TO_COMPUTER_DEVICE}}" -ComputerToRadioDevice "${{env.COMPUTER_TO_RADIO_DEVICE}}" -MicrophoneToComputerDevice "${{env.MICROPHONE_TO_COMPUTER_DEVICE}}" -ComputerToSpeakerDevice "${{env.COMPUTER_TO_SPEAKER_DEVICE}}" -ModeToTest 700D -NumberOfRuns 1 - timeout-minutes: 5 + timeout-minutes: 10 - name: Test 700E shell: pwsh working-directory: ${{github.workspace}}\FreeDV-Install-Location\bin run: | .\TestFreeDVFullDuplex.ps1 -RadioToComputerDevice "${{env.RADIO_TO_COMPUTER_DEVICE}}" -ComputerToRadioDevice "${{env.COMPUTER_TO_RADIO_DEVICE}}" -MicrophoneToComputerDevice "${{env.MICROPHONE_TO_COMPUTER_DEVICE}}" -ComputerToSpeakerDevice "${{env.COMPUTER_TO_SPEAKER_DEVICE}}" -ModeToTest 700E -NumberOfRuns 1 - timeout-minutes: 5 + timeout-minutes: 10 - name: Test 1600 shell: pwsh working-directory: ${{github.workspace}}\FreeDV-Install-Location\bin run: | .\TestFreeDVFullDuplex.ps1 -RadioToComputerDevice "${{env.RADIO_TO_COMPUTER_DEVICE}}" -ComputerToRadioDevice "${{env.COMPUTER_TO_RADIO_DEVICE}}" -MicrophoneToComputerDevice "${{env.MICROPHONE_TO_COMPUTER_DEVICE}}" -ComputerToSpeakerDevice "${{env.COMPUTER_TO_SPEAKER_DEVICE}}" -ModeToTest 1600 -NumberOfRuns 1 - timeout-minutes: 5 + timeout-minutes: 10 diff --git a/USER_MANUAL.md b/USER_MANUAL.md index c3f48254..2f07f032 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -917,6 +917,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes * Allow overrriding the version tag when building. (PR #727) * Update wxWidgets to 3.2.6. (PR #748) * Update Hamlib to 4.6.2. (PR #834) + * Use optimal number of parallel builds during build process. (PR #842) 4. Miscellaneous: * Add issue template for SW bugs. (PR #759) diff --git a/build_linux.sh b/build_linux.sh index 0099cca6..6fd7c60f 100755 --- a/build_linux.sh +++ b/build_linux.sh @@ -35,7 +35,7 @@ if [ $LPCNET_DISABLE == 0 ]; then mkdir -p build_linux && cd build_linux && rm -Rf * cmake .. if [ $? == 0 ]; then - make + make -j$(nproc) if [ $? == 0 ]; then # sanity check test cd src && sox ../../wav/wia.wav -t raw -r 16000 - | ./lpcnet_enc -s | ./lpcnet_dec -s > /dev/null @@ -59,7 +59,7 @@ if [ ! -d codec2 ]; then git clone https://github.com/drowe67/codec2.git fi cd codec2 && git switch main && git pull && git checkout $CODEC2_BRANCH -mkdir -p build_linux && cd build_linux && rm -Rf * && cmake $LPCNET_CMAKE_CMD .. && make VERBOSE=1 +mkdir -p build_linux && cd build_linux && rm -Rf * && cmake $LPCNET_CMAKE_CMD .. && make VERBOSE=1 -j$(nproc) if [ $LPCNET_DISABLE == 0 ]; then # sanity check test cd src @@ -79,4 +79,4 @@ else PULSEAUDIO_PARAM="-DUSE_PULSEAUDIO=0" fi cmake $PULSEAUDIO_PARAM -DUNITTEST=$UT_ENABLE -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/build_linux $LPCNET_CMAKE_CMD .. -make VERBOSE=1 +make VERBOSE=1 -j$(nproc) diff --git a/build_osx.sh b/build_osx.sh index d43ac6b5..a79d57d1 100755 --- a/build_osx.sh +++ b/build_osx.sh @@ -20,7 +20,7 @@ if [ ! -d macdylibbundler ]; then git clone https://github.com/tmiw/macdylibbundler.git fi cd macdylibbundler && git checkout main && git pull -make -j4 +make -j$(sysctl -n hw.logicalcpu) cd .. # Prerequisite: Python @@ -49,7 +49,7 @@ else CFLAGS="-g -O2 -mmacosx-version-min=10.9" CXXFLAGS="-g -O2 -mmacosx-version-min=10.9" ./configure --enable-shared --prefix $HAMLIBDIR fi -make -j4 +make -j$(sysctl -n hw.logicalcpu) make install # OK, build and test LPCNet @@ -62,7 +62,7 @@ if [ $LPCNET_DISABLE == 0 ]; then mkdir -p build_osx && cd build_osx && rm -Rf * cmake -DBUILD_OSX_UNIVERSAL=${UNIV_BUILD} .. if [ $? == 0 ]; then - make -j4 + make -j$(sysctl -n hw.logicalcpu) if [ $? == 0 ]; then # sanity check test cd src && sox ../../wav/wia.wav -t raw -r 16000 - | ./lpcnet_enc -s | ./lpcnet_dec -s > /dev/null @@ -86,7 +86,7 @@ if [ ! -d codec2 ]; then git clone https://github.com/drowe67/codec2-new.git codec2 fi cd codec2 && git switch main && git pull && git checkout $CODEC2_BRANCH -mkdir -p build_osx && cd build_osx && rm -Rf * && cmake ${LPCNET_CMAKE_CMD} -DBUILD_OSX_UNIVERSAL=${UNIV_BUILD} .. && make VERBOSE=1 -j4 +mkdir -p build_osx && cd build_osx && rm -Rf * && cmake ${LPCNET_CMAKE_CMD} -DBUILD_OSX_UNIVERSAL=${UNIV_BUILD} .. && make VERBOSE=1 -j$(sysctl -n hw.logicalcpu) # sanity check test cd src @@ -105,4 +105,4 @@ if [ "$CODESIGN_KEYCHAIN_PROFILE" != "" ]; then fi cmake -DPython3_ROOT_DIR=$PWD/../Python.framework/Versions/3.12 -DUNITTEST=1 -DBUILD_OSX_UNIVERSAL=${UNIV_BUILD} -DUNITTEST=$UT_ENABLE -DCMAKE_BUILD_TYPE=Debug -DBOOTSTRAP_WXWIDGETS=1 -DUSE_STATIC_SPEEXDSP=1 -DUSE_STATIC_PORTAUDIO=1 -DUSE_STATIC_SAMPLERATE=1 -DUSE_STATIC_SNDFILE=1 -DHAMLIB_INCLUDE_DIR=${HAMLIBDIR}/include -DHAMLIB_LIBRARY=${HAMLIBDIR}/lib/libhamlib.dylib -DCODEC2_BUILD_DIR=$CODEC2DIR/build_osx ${LPCNET_CMAKE_CMD} -DMACOS_CODESIGN_IDENTITY=${CODESIGN_IDENTITY} ${CODESIGN_KEYCHAIN_PROFILE_ARG} .. -make VERBOSE=1 -j8 +make VERBOSE=1 -j$(sysctl -n hw.logicalcpu) diff --git a/build_signed_windows_release.sh b/build_signed_windows_release.sh index b9b9e5e0..acbda1e0 100755 --- a/build_signed_windows_release.sh +++ b/build_signed_windows_release.sh @@ -43,7 +43,7 @@ for arch in x86_64; do # Kick off new build with the given architecture cmake -DLPCNET_DISABLE=1 -DPython3_ROOT_DIR=`pwd`/../wine-env/drive_c/Program\ Files/Python312 -DSIGN_WINDOWS_BINARIES=1 -DPKCS11_CERTIFICATE_FILE=$CERT_URL_FILE -DPKCS11_KEY_FILE=$KEY_URL_FILE -DINTERMEDIATE_CERT_FILE=$INTERMEDIATE_CERT_FILE -DCMAKE_TOOLCHAIN_FILE=$SCRIPT_DIR/cross-compile/freedv-mingw-llvm-$arch.cmake $SCRIPT_DIR - make -j6 package + make -j$(nproc) package cp FreeDV-*.exe $WIN_BUILD_DIR cd $WIN_BUILD_DIR done diff --git a/src/config/CMakeLists.txt b/src/config/CMakeLists.txt index 10ce2b35..73f7f42b 100644 --- a/src/config/CMakeLists.txt +++ b/src/config/CMakeLists.txt @@ -8,9 +8,10 @@ add_library(fdv_config STATIC ) target_include_directories(fdv_config PRIVATE ${CODEC2_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..) +add_dependencies(fdv_config build_rade) if(BOOTSTRAP_WXWIDGETS) add_dependencies(fdv_config wx::core wx::base wx::aui wx::html wx::net wx::adv wx::propgrid wx::xrc) target_compile_definitions(fdv_config PRIVATE ${WXBUILD_BUILD_DEFS}) target_include_directories(fdv_config PRIVATE ${WXBUILD_INCLUDES}) -endif(BOOTSTRAP_WXWIDGETS) \ No newline at end of file +endif(BOOTSTRAP_WXWIDGETS)