Update build scripts to use optimal number of parallel builds. (#842)

* Update build scripts to use optimal number of parallel builds.

* Update Windows GH action similarly to other build scripts.

* Add PR #842 to changelog.

* Need -j6 for Windows for some reason.

* Increase Windows test timeouts.

* -j doesn't actually limit the number of parallel builds.
ms-tcp-conn-fault
Mooneer Salem 2025-03-10 22:35:54 -07:00 committed by GitHub
parent 9ae1f9d235
commit bbba124a9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 15 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)
endif(BOOTSTRAP_WXWIDGETS)