|
1 | | -name: CMake |
| 1 | +name: Build DSView AppImage |
2 | 2 |
|
3 | 3 | on: |
| 4 | + workflow_dispatch: |
4 | 5 | push: |
5 | 6 | branches: [ master ] |
6 | 7 | pull_request: |
7 | | - branches: [ master ] |
8 | | - |
9 | | -env: |
10 | | - BUILD_TYPE: Release |
11 | 8 |
|
12 | 9 | jobs: |
13 | | - build: |
14 | | - runs-on: ubuntu-latest |
| 10 | + build-appimage: |
| 11 | + runs-on: ubuntu-22.04 |
15 | 12 |
|
16 | 13 | steps: |
17 | | - - uses: actions/checkout@v4 |
18 | | - |
19 | | - - name: Setup Container |
20 | | - 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 |
21 | | - |
22 | | - - name: make staging area |
23 | | - run: mkdir -p ${{github.workspace}}/staging/AppDir |
24 | | - |
25 | | - - name: build libsigrok4DSL |
26 | | - run: cd libsigrok4DSL && ./autogen.sh && ./configure && make && make install DESTDIR=${{github.workspace}}/staging/AppDir && cd .. |
27 | | - |
28 | | - - name: build libsigrokdecode4DSL |
29 | | - run: cd libsigrokdecode4DSL && ./autogen.sh && ./configure && make && make install DESTDIR=${{github.workspace}}/staging/AppDir && cd .. |
30 | | - |
31 | | - - name: fix AppImage pkgconfig files |
32 | | - run: find ${{github.workspace}}/staging/AppDir/usr/local/lib/pkgconfig/*pc|xargs sed -i "s#/usr/local#${{github.workspace}}/staging/AppDir/usr/local#g" |
33 | | - |
34 | | - - name: build DSView |
35 | | - 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" |
36 | | - |
37 | | - - name: get AppImage util |
38 | | - run: cd ${{github.workspace}}/staging && wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage |
39 | | - |
40 | | - - name: create AppImage |
41 | | - 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 |
42 | | - |
43 | | - - name: Upload Artifact (AppImage) |
| 14 | + - name: Install dependencies |
| 15 | + run: | |
| 16 | + sudo apt-get update |
| 17 | + sudo apt-get install -y \ |
| 18 | + git gcc g++ make cmake qtbase5-dev qt5-qmake qtbase5-dev-tools \ |
| 19 | + libglib2.0-dev zlib1g-dev libusb-1.0-0-dev libboost-dev \ |
| 20 | + libfftw3-dev python3-dev libudev-dev pkg-config patchelf wget file |
| 21 | +
|
| 22 | + - name: Clone DSView |
| 23 | + run: | |
| 24 | + git clone https://github.com/DreamSourceLab/DSView.git |
| 25 | +
|
| 26 | + - name: Build and install DSView |
| 27 | + run: | |
| 28 | + cd DSView |
| 29 | + mkdir build && cd build |
| 30 | + cmake .. -DCMAKE_INSTALL_PREFIX=/usr |
| 31 | + make -j$(nproc) |
| 32 | + make DESTDIR=$PWD/AppDir install |
| 33 | +
|
| 34 | + - name: Download linuxdeploy and plugins |
| 35 | + run: | |
| 36 | + mkdir -p $HOME/linuxdeploy |
| 37 | + cd $HOME/linuxdeploy |
| 38 | + wget -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage |
| 39 | + wget -c https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage |
| 40 | + chmod +x linuxdeploy-*.AppImage |
| 41 | +
|
| 42 | + - name: Build AppImage |
| 43 | + run: | |
| 44 | + cd DSView/build |
| 45 | + export VERSION="$(git describe --tags --always)" |
| 46 | + export APPIMAGE_EXTRACT_AND_RUN=1 |
| 47 | +
|
| 48 | + $HOME/linuxdeploy/linuxdeploy-x86_64.AppImage --appdir AppDir \ |
| 49 | + --output appimage \ |
| 50 | + --plugin qt |
| 51 | +
|
| 52 | + - name: Upload AppImage artifact |
44 | 53 | uses: actions/upload-artifact@v4 |
45 | 54 | with: |
46 | | - name: DSView.AppImage |
47 | | - path: ${{github.workspace}}/staging/*.AppImage |
| 55 | + name: DSView-AppImage |
| 56 | + path: DSView/build/*.AppImage |
48 | 57 |
|
0 commit comments