Skip to content

Commit 734256c

Browse files
codeScriberEyal Gal
authored andcommitted
Create cmake.yml
updating apt-get command remove '\' from apt-get fix the mkdir command change cat to ls add fixing up of pkgconfig installed files print the pkconfig after the change
1 parent 2e9e2c8 commit 734256c

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CMake
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
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)
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: DSView.AppImage
47+
path: ${{github.workspace}}/staging/*.AppImage
48+

0 commit comments

Comments
 (0)