|
| 1 | +name: CMake |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + branches: [ master ] |
| 8 | + |
| 9 | +env: |
| 10 | + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
| 11 | + BUILD_TYPE: Release |
| 12 | + |
| 13 | +jobs: |
| 14 | + build: |
| 15 | + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. |
| 16 | + # You can convert this to a matrix build if you need cross-platform coverage. |
| 17 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 18 | + runs-on: ubuntu-latest |
| 19 | + |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v2 |
| 22 | + |
| 23 | + - name: Setup Container |
| 24 | + run: sudo apt-get update && sudo apt-get install -y git-core build-essential cmake autoconf automake libtool pkg-config libglib2.0-dev libzip-dev libudev-dev libusb-1.0-0-dev python3-dev qt5-default libboost-dev libboost-test-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev check libfftw3-dev wget |
| 25 | + - name: make staging area |
| 26 | + run: mkdir -p ${{github.workspace}}/staging/AppDir |
| 27 | + - name: build libsigrok4DSL |
| 28 | + run: cd libsigrok4DSL && ./autogen.sh && ./configure && make && make install DESTDIR=${{github.workspace}}/staging/AppDir && cd .. |
| 29 | + |
| 30 | + - name: build libsigrokdecode4DSL |
| 31 | + run: cd libsigrokdecode4DSL && ./autogen.sh && ./configure && make && make install DESTDIR=${{github.workspace}}/staging/AppDir && cd .. |
| 32 | + |
| 33 | + - name: fix AppImage pkgconfig files |
| 34 | + run: find ${{github.workspace}}/staging/AppDir/usr/local/lib/pkgconfig/*pc|xargs sed -i "s#/usr/local#${{github.workspace}}/staging/AppDir/usr/local#g" |
| 35 | + |
| 36 | + - name: build DSView |
| 37 | + run: cd DSView && PKG_CONFIG_PATH="${{github.workspace}}/staging/AppDir/usr/local/lib/pkgconfig" cmake . -DCMAKE_INSTALL_PREFIX=/usr&& make && make install DESTDIR="${{github.workspace}}/staging/AppDir" |
| 38 | + |
| 39 | + - name: get AppImage util |
| 40 | + run: cd ${{github.workspace}}/staging && wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage |
| 41 | + - name: create AppImage |
| 42 | + run: cd ${{github.workspace}}/staging && LD_LIBRARY_PATH="${{github.workspace}}/staging/AppDir/usr/local/lib" ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage || ls -l |
| 43 | + - name: Upload Artifact GitHub Action |
| 44 | + uses: actions/upload-artifact@v2 |
| 45 | + with: |
| 46 | + name: DSView.AppImage |
| 47 | + path: ${{github.workspace}}/staging/*.AppImage |
0 commit comments