Skip to content

Commit 69ad547

Browse files
author
Eyal Gal
committed
fixing the github workflow to suite the bre 22.04
1 parent 734256c commit 69ad547

File tree

1 file changed

+46
-37
lines changed

1 file changed

+46
-37
lines changed

.github/workflows/cmake.yml

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,57 @@
1-
name: CMake
1+
name: Build DSView AppImage
22

33
on:
4+
workflow_dispatch:
45
push:
5-
branches: [ master ]
6+
branches: [ main ]
67
pull_request:
7-
branches: [ master ]
8-
9-
env:
10-
BUILD_TYPE: Release
118

129
jobs:
13-
build:
14-
runs-on: ubuntu-latest
10+
build-appimage:
11+
runs-on: ubuntu-22.04
1512

1613
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
4453
uses: actions/upload-artifact@v4
4554
with:
46-
name: DSView.AppImage
47-
path: ${{github.workspace}}/staging/*.AppImage
55+
name: DSView-AppImage
56+
path: DSView/build/*.AppImage
4857

0 commit comments

Comments
 (0)