diff --git a/.github/workflows/cmake.yml b/.github/workflows/build.yml similarity index 53% rename from .github/workflows/cmake.yml rename to .github/workflows/build.yml index 1fd0dbc3..2cf3c44a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: CI +name: Build on: [push, pull_request, workflow_dispatch] @@ -7,43 +7,7 @@ env: BUILD_TYPE: Release jobs: - dep_target: - runs-on: ubuntu-latest - outputs: - target_ref: ${{ steps.dep_target.outputs.target_ref }} - steps: - - name: Determine dependencies target branch - id: dep_target - run: | - target_ref="develop" - - echo "Checking PR base reference..." - if [ ! -z "${{ github.base_ref }}" ] - then - echo "Base reference: ${{ github.base_ref }}" - if [ ! -z "$(echo ${{ github.base_ref }} | grep -E "^refs/.*/master$")" ] - then - echo "Reference to master found!" - target_ref="master" - fi - fi - - echo "Checking reference..." - if [ ! -z "${{ github.ref }}" ] - then - echo "Reference: ${{ github.ref }}" - if [ ! -z "$(echo ${{ github.ref }} | grep -E "^refs/.*/master$")" ] - then - echo "Reference to master found!" - target_ref="master" - fi - fi - - echo "Targetting '${target_ref}' branch..." - echo "target_ref=${target_ref}" >> $GITHUB_OUTPUT - build-linux: - needs: dep_target runs-on: ubuntu-20.04 steps: - name: Install dependencies @@ -53,7 +17,7 @@ jobs: uses: actions/checkout@v3 with: repository: BatchDrake/sigutils - ref: ${{needs.dep_target.outputs.target_ref}} + ref: master path: sigutils submodules: recursive fetch-depth: 0 @@ -109,44 +73,16 @@ jobs: path: ${{github.workspace}}/suscan/suscan-tools_0.3.0-${{steps.vars.outputs.sha_short}}_amd64.deb build-macos: - needs: dep_target runs-on: macos-latest steps: - name: Install dependencies - run: | - # Add custom homebrew repos - brew tap pothosware/homebrew-pothos - brew update - # Install deps - # soapyaudio removed from due to deprecated hamlib API - # soapyosmo removed because of random compilation errors - # soapyairspyhf removed because of random compilation errors - brew install --force --overwrite python@3.12 - brew install libsndfile volk fftw soapysdr libxml2 portaudio json-c - python3 -Im pip install setuptools - # sudo rm /usr/local/bin/2to3* /usr/local/bin/idle3* /usr/local/bin/pydoc3* - brew install soapyrtlsdr soapyhackrf soapybladerf soapyairspy soapyredpitaya soapyiris limesuite soapyplutosdr - brew install --head soapyuhd - # TODO: needed? - #sudo mkdir -p /usr/local/lib/SoapySDR/modules0.8 - #sudo chmod -R a+rw /usr/local/lib/SoapySDR/modules0.8 - # SDRPlay API - wget https://www.sdrplay.com/software/SDRplay_RSP_API-MacOSX-3.07.3.pkg - sudo installer -pkg SDRplay_RSP_API-MacOSX-3.07.3.pkg -target / - # SoapySDRPlay3 from source - git clone https://github.com/pothosware/SoapySDRPlay3 - cd SoapySDRPlay3 - cmake -DCMAKE_BUILD_TYPE=Release -B build . - cmake --build build - cd build - sudo make install - cd ../.. + run: brew install libsndfile volk fftw soapysdr json-c portaudio - name: Checkout (sigutils) uses: actions/checkout@v3 with: repository: BatchDrake/sigutils - ref: ${{needs.dep_target.outputs.target_ref}} + ref: master path: sigutils submodules: recursive fetch-depth: 0 @@ -178,7 +114,6 @@ jobs: run: cmake --build ${{github.workspace}}/suscan/build --config ${{env.BUILD_TYPE}} build-windows: - needs: dep_target runs-on: windows-latest defaults: run: @@ -187,14 +122,13 @@ jobs: - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 - update: true - install: git mingw-w64-x86_64-cc mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-libsndfile mingw-w64-x86_64-fftw mingw-w64-x86_64-volk mingw-w64-x86_64-libxml2 mingw-w64-x86_64-libusb + install: git mingw-w64-x86_64-cc mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-libsndfile mingw-w64-x86_64-fftw mingw-w64-x86_64-volk mingw-w64-x86_64-libxml2 mingw-w64-x86_64-libusb mingw-w64-x86_64-soapysdr mingw-w64-x86_64-rtl-sdr mingw-w64-x86_64-soapyrtlsdr - name: Checkout (sigutils) uses: actions/checkout@v3 with: repository: BatchDrake/sigutils - ref: ${{needs.dep_target.outputs.target_ref}} + ref: master path: sigutils submodules: recursive fetch-depth: 0 @@ -207,58 +141,7 @@ jobs: - name: Install sigutils run: /mingw64/bin/cmake --build D:\\a\\suscan\\suscan\\sigutils\\build --config ${{env.BUILD_TYPE}} --target install - - # SoapySDR - - name: Checkout (soapysdr) - uses: actions/checkout@v3 - with: - repository: pothosware/SoapySDR - ref: refs/heads/master - path: SoapySDR - - - name: Configure - run: /mingw64/bin/cmake -G"MinGW Makefiles" -B D:\\a\\suscan\\suscan\\SoapySDR\\build -DCMAKE_INSTALL_PREFIX:PATH=C:\\msys64\\mingw64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} D:\\a\\suscan\\suscan\\SoapySDR\\ - - - name: Build - run: /mingw64/bin/cmake --build D:\\a\\suscan\\suscan\\SoapySDR\\build --config ${{env.BUILD_TYPE}} - - - name: Install sigutils - run: /mingw64/bin/cmake --build D:\\a\\suscan\\suscan\\SoapySDR\\build --config ${{env.BUILD_TYPE}} --target install - - # BatchDrake's fixed rtl-sdr - - name: Checkout (rtl-sdr-blog) - uses: actions/checkout@v3 - with: - repository: BatchDrake/rtl-sdr-blog - ref: refs/heads/feature/xfer-completion - path: rtl-sdr-blog - - - name: Configure - run: /mingw64/bin/cmake -G"MinGW Makefiles" -B D:\\a\\suscan\\suscan\\rtl-sdr-blog\\build -DCMAKE_INSTALL_PREFIX:PATH=C:\\msys64\\mingw64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} D:\\a\\suscan\\suscan\\rtl-sdr-blog\\ - - - name: Build - run: /mingw64/bin/cmake --build D:\\a\\suscan\\suscan\\rtl-sdr-blog\\build --config ${{env.BUILD_TYPE}} - - - name: Install - run: /mingw64/bin/cmake --build D:\\a\\suscan\\suscan\\rtl-sdr-blog\\build --config ${{env.BUILD_TYPE}} --target install - - # SoapyRTLSDR - - name: Checkout (soapyrtlsdr) - uses: actions/checkout@v3 - with: - repository: pothosware/SoapyRTLSDR - ref: refs/heads/master - path: SoapyRTLSDR - - - name: Configure - run: /mingw64/bin/cmake -G"MinGW Makefiles" -B D:\\a\\suscan\\suscan\\SoapyRTLSDR/build -DCMAKE_INSTALL_PREFIX:PATH=C:\\msys64\\mingw64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} D:\\a\\suscan\\suscan\\SoapyRTLSDR\\ - - - name: Build - run: /mingw64/bin/cmake --build D:\\a\\suscan\\suscan\\SoapyRTLSDR\\build --config ${{env.BUILD_TYPE}} - - - name: Install - run: /mingw64/bin/cmake --build D:\\a\\suscan\\suscan\\SoapyRTLSDR\\build --config ${{env.BUILD_TYPE}} --target install - + # suscan - name: Checkout uses: actions/checkout@v3 diff --git a/README.md b/README.md index 1612a92a..e83f82dc 100644 --- a/README.md +++ b/README.md @@ -12,20 +12,23 @@ Suscan is a realtime DSP processing library. It provides a set of useful abstrac ## Getting the code Just clone it from the GitHub repository. Make sure you pass --recurse-submodules to git clone so all required submodules are also cloned. +```bash % git clone --recurse-submodules https://github.com/BatchDrake/suscan.git +``` ## Building and installing Suscan In order to build Suscan, you will need the development files for the following packages: - -``` -sigutils fftw3 sndfile SoapySDR libxml-2.0 -``` +* sigutils +* fftw3 +* sndfile +* SoapySDR +* libxml-2.0 If you are in a Debian-like operating system, you will also need `cmake` and `build-essential`. After installing all dependencies, enter Suscan's source directory and compile by typing: -``` +```bash % cd suscan % mkdir build % cd build diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 21ac76a7..00000000 --- a/TODO.md +++ /dev/null @@ -1,28 +0,0 @@ -### Suscan's STARCon 2018 tentative TO-DO List ---- -#### Must-do -- Add 7-segment widget -- Fix main screen layout -- Prevent self-correcting blocks from drifting (add limits) -- Update inspector tab with information from Costas/Gardner's blocks -- Add button to reset internal states of self-correcting blocks -- Add configuration tab for look & feel properties -- Add option to change Costas loop arm gains -- Change Start/Stop button color -- Add option to save inspector configuration -- Tweak throttle speed -- Add button to freeze channel view -- Add channel view context menu -- Add measurements menu to inspector spectrum -- Save channel list as XML -- Fix spectrum glitches on poor noise floor level calculation -- Save inspector configuration as a .c file - -#### Desirable -- Add SoapySDR support -- Allow real-time frequency selection -- Add full-spectrum analysis -- Add inspector log window? -- Generalize inspector API -- Fix freezing when opening some small channels -- Add baseband channel recorder diff --git a/analyzer/source/impl/file.c b/analyzer/source/impl/file.c index 4e85fad7..2586083a 100644 --- a/analyzer/source/impl/file.c +++ b/analyzer/source/impl/file.c @@ -20,6 +20,7 @@ #include "file.h" #include #include +#include #include #ifdef _SU_SINGLE_PRECISION