diff --git a/.github/workflows/build-deb-rpm.yml b/.github/workflows/build-deb-rpm.yml new file mode 100644 index 000000000..ffb60fd74 --- /dev/null +++ b/.github/workflows/build-deb-rpm.yml @@ -0,0 +1,51 @@ +on: + push: + branches: [master, deb] +name: deb and rpm build +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install dependencies + run: sudo apt-get update && + sudo apt-get install -y + build-essential cmake + rpm git + libgtkdatabox-dev libaio-dev libiio-dev + libjansson-dev libmatio-dev libfftw3-dev + + - name: Build libad9166-iio + run: | + git -c http.sslVerify=false clone https://github.com/analogdevicesinc/libad9166-iio + mkdir libad9166-iio/build && cd $_ + cmake .. + make && sudo make install + + - name: Build libad9361-iio + run: | + git -c http.sslVerify=false clone -b v0.2 https://github.com/analogdevicesinc/libad9361-iio + mkdir libad9361-iio/build && cd $_ + cmake .. + make && sudo make install + + - name: Generate deb and rpm package + run: mkdir build && cd $_ && + cmake -DENABLE_PACKAGING=ON .. && make package + + - name: Grab deb package + uses: actions/upload-artifact@v3 + with: + path: | + build/iio-oscilloscope-*-Linux.deb + if-no-files-found: error + + - name: Grab rpm package + uses: actions/upload-artifact@v3 + with: + path: | + build/iio-oscilloscope-*-Linux.rpm + if-no-files-found: error diff --git a/cmake/LinuxPackaging.cmake b/cmake/LinuxPackaging.cmake index b535ab822..78c67391a 100644 --- a/cmake/LinuxPackaging.cmake +++ b/cmake/LinuxPackaging.cmake @@ -16,7 +16,7 @@ set(CPACK_PACKAGE_VERSION_PATCH ${OSC_VERSION_GIT}) set(CPACK_BUNDLE_NAME osc) set(CPACK_PACKAGE_VERSION ${OSCIO_VERSION}) # debian specific package settings -set(CPACK_PACKAGE_CONTACT "Engineerzone ") +set(CPACK_PACKAGE_CONTACT "Engineerzone ") option(DEB_DETECT_DEPENDENCIES "Detect dependencies for .deb packages" OFF)