From 2fc4af11a8270f121a3cc907e82b57fbe284f9b4 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Sun, 4 Dec 2022 19:58:54 +0800 Subject: [PATCH] action: add sonar build action --- .github/workflows/build.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70b21cda..e34d6210 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,34 @@ jobs: env: BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed steps: + - uses: actions/setup-python@v3 + with: + python-version: '3.9' + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: ${{ matrix.qt_ver }} + arch: ${{ matrix.qt_arch }} + cached: 'false' + #serialport linuxdeploy need serialport to work. + modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtserialport + setup-python: 'false' + + - name: ubuntu install thirdparty dependencies + run: | + sudo apt-get install git pkg-config build-essential + sudo apt-get install libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev + sudo apt-get install libxtst-dev liblzo2-dev libbz2-dev + sudo apt-get install libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev + sudo apt-get install doxygen libzstd-dev libxkbcommon-dev libgstreamer-plugins-base1.0-0 libgstreamer-gl1.0-0 + sudo ln -sf /usr/bin/x86_64-linux-gnu-ld.gold /usr/bin/ld + + #build opencc + git clone https://github.com/BYVoid/OpenCC + cd OpenCC/ + make PREFIX=/usr -j$(nproc) + sudo make install + cd .. - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis @@ -20,7 +48,7 @@ jobs: - name: Run build-wrapper run: | cmake . - build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make clean all + build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build . - name: Run sonar-scanner env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}