1 name: SmuView Documentation
9 - "src/python/bindings.cpp"
17 # The path where the compiled packages will be installed.
18 INSTALL_DIR: "${{ github.workspace }}/sr"
19 # Git URL for the sigrok dependencies
20 SIGROK_REPO_BASE: "https://github.com/sigrokproject"
21 # Build type for SmuView (Debug, Release, RelWithDebInfo, MinSizeRel)
24 WGET: "wget -c --quiet"
25 GIT_CLONE: "git clone --depth=1"
33 runs-on: ubuntu-latest
39 - name: Install dependencies
42 sudo apt-get install -y \
43 git-core gcc make autoconf automake libtool \
44 g++ autoconf-archive pkg-config libglib2.0-dev libglibmm-2.4-dev \
45 libzip-dev check doxygen swig \
46 cmake libboost-dev libqt5svg5-dev qtbase5-dev libqwt-qt5-dev \
47 python3-dev python-gi-dev python-setuptools \
48 asciidoctor ruby-asciidoctor-pdf coderay
50 - name: Checkout sigrok-utils
51 uses: actions/checkout@v3
53 repository: knarfS/sigrok-util
57 - name: Build dependencies
59 cd sigrok-util/cross-compile/github-actions
60 source sigrok-linux-init-toolchain.sh
61 ./sigrok-linux-build-dependencies.sh
63 - name: Checkout smuview
64 uses: actions/checkout@v3
70 source sigrok-util/cross-compile/github-actions/sigrok-linux-init-toolchain.sh
71 mkdir -p smuview/build
73 PKG_CONFIG_PATH=$P cmake \
74 -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \
75 -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
76 -DDISABLE_WERROR=TRUE \
77 -DENABLE_TESTS=FALSE \
80 make manual-publish $V
82 - name: Upload artifact
83 uses: actions/upload-artifact@v3
86 path: smuview/build/manual_publish/
90 name: SmuView Python API
92 runs-on: ubuntu-latest
98 - name: Install dependencies
101 sudo apt-get install -y \
102 git-core gcc make autoconf automake libtool \
103 g++ autoconf-archive pkg-config libglib2.0-dev libglibmm-2.4-dev \
104 libzip-dev check doxygen swig \
105 cmake libboost-dev libqt5svg5-dev qtbase5-dev libqwt-qt5-dev \
106 python3-dev python-gi-dev python-setuptools coreutils
108 - name: Checkout sigrok-utils
109 uses: actions/checkout@v3
111 repository: knarfS/sigrok-util
115 - name: Build dependencies
117 cd sigrok-util/cross-compile/github-actions
118 source sigrok-linux-init-toolchain.sh
119 ./sigrok-linux-build-dependencies.sh
121 - name: Checkout smuview
122 uses: actions/checkout@v3
126 - name: Build smuview
128 source sigrok-util/cross-compile/github-actions/sigrok-linux-init-toolchain.sh
129 mkdir -p smuview/build
131 PKG_CONFIG_PATH=$P cmake \
132 -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \
133 -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
135 -DENABLE_TESTS=FALSE \
140 - name: Build API doc
143 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$INSTALL_DIR/lib"
144 # Source versions and create destination folders
145 source smuview/build/contrib/config_version.sh
146 mkdir -p api_doc/"$SV_MANUAL_VERSION"
147 # Create script for generating the API doc
148 cat > gen_api.py << EOF
151 html_str = pdoc.html("smuview", show_type_annotations=True)
152 f = open('./api_doc/$SV_MANUAL_VERSION/python_bindings_api.html', 'w')
153 print(html_str, file=f)
156 # Generating the API doc
157 timeout --preserve-status 60 $INSTALL_DIR/bin/smuview -s gen_api.py -platform offscreen
159 - name: Upload artifact
160 uses: actions/upload-artifact@v3
162 name: SmuView_Python_API
167 name: SmuView documentation publish
169 runs-on: ubuntu-latest
176 - name: Download artifacts
177 uses: actions/download-artifact@v2
179 - name: Inspect directory after downloading artifacts
182 - name: Checkout knarfS.github.io
183 uses: actions/checkout@v3
185 repository: knarfS/knarfS.github.io
186 path: knarfS.github.io
187 persist-credentials: false
189 - name: Copy documentation
191 cp -r SmuView_manual/* knarfS.github.io/doc/smuview
192 cp -r SmuView_Python_API/* knarfS.github.io/doc/smuview
194 - name: Publish documentation
195 uses: cpina/github-action-push-to-another-repository@main
197 SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
199 source-directory: "knarfS.github.io"
200 destination-github-username: "knarfS"
201 destination-repository-name: "knarfS.github.io"
202 user-email: "frank-stettner@gmx.net"
203 target-branch: "master"
204 commit-message: "Automated update for ORIGIN_COMMIT"