Skip to content

Commit

Permalink
Add clang-tidy check
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 5, 2024
1 parent 587604c commit fe30708
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
BUILD_ROOT="/home/runner"
echo "BUILD_ROOT=${BUILD_ROOT}" >> $GITHUB_ENV
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
echo "CMAKE_BUILD_DIR=${BUILD_ROOT}/builddir" >> $GITHUB_ENV
- name: πŸ’Ž Setup ruby
uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -59,7 +58,7 @@ jobs:
source ./scripts/ci/generate-version-details.sh
cmake -S "${{ github.workspace }}" \
-B "${CMAKE_BUILD_DIR}" \
-B "build" \
-G Ninja \
-D CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-D WITH_VCPKG=ON \
Expand All @@ -74,6 +73,7 @@ jobs:
-D SENTRY_DSN=${{ secrets.SENTRY_DSN }} \
-D SENTRY_ENV="${APP_ENV}" \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON \
-D LINUXDEPLOY_EXECUTABLE=${{ env.BUILD_ROOT }}/linuxdeploy-x86_64.AppImage
- name: πŸ“‘ Upload dep build logs
Expand All @@ -82,7 +82,7 @@ jobs:
with:
name: build-logs-x64-linux
path: |
${{ env.CMAKE_BUILD_DIR }}/**/*.log
build/**/*.log
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand All @@ -91,13 +91,19 @@ jobs:

- name: πŸŒ‹ Build
run: |
xvfb-run cmake --build "${{ env.CMAKE_BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
xvfb-run cmake --build build --config ${{ env.BUILD_TYPE }}
- uses: ZedThree/clang-tidy-review@v0.18.0
id: review
with:
build_dir: "build"
lgtm_comment_body: ''

- name: Package
run: |
export LD_LIBRARY_PATH="${{ env.CMAKE_BUILD_DIR }}/vcpkg_installed/x64-linux/lib/":${LD_LIBRARY_PATH}
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target bundle --config ${{ env.BUILD_TYPE }}
echo "ARTIFACT_PATHNAME=${{ env.CMAKE_BUILD_DIR }}/QField-x86_64.AppImage" >> $GITHUB_ENV
export LD_LIBRARY_PATH="${{ github.workspace }}/build/vcpkg_installed/x64-linux/lib/":${LD_LIBRARY_PATH}
cmake --build "build" --target bundle --config ${{ env.BUILD_TYPE }}
echo "ARTIFACT_PATHNAME=build/QField-x86_64.AppImage" >> $GITHUB_ENV
echo "ARTIFACT_NAME=qfield-${{ env.CI_PACKAGE_FILE_SUFFIX }}-linux-x64.AppImage" >> $GITHUB_ENV
- name: πŸ“¦ Upload package
Expand All @@ -109,25 +115,25 @@ jobs:

- name: 🧫 Test
env:
PROJ_LIB: ${{ env.CMAKE_BUILD_DIR }}/vcpkg_installed/x64-linux/share/proj
PROJ_LIB: ${{ github.workspace }}/build/vcpkg_installed/x64-linux/share/proj
run: |
pip install -r "${{ github.workspace }}/test/spix/requirements.txt"
cd "${{ env.CMAKE_BUILD_DIR }}"
cd build
xvfb-run --server-args="-screen 0 640x480x24" ctest --output-on-failure -C ${{ env.BUILD_TYPE }}
- name: πŸ“‘ Upload package logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: package-logs-x64-linux
path: ${{ env.BUILD_ROOT }}/builddir/_CPack_Packages/**/*.log
path: build/_CPack_Packages/**/*.log

- name: πŸ“Š Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: "test-report-x64-linux-${{ env.BUILD_TYPE }}"
path: "${{ env.CMAKE_BUILD_DIR }}/report"
path: "build/report"

- name: πŸš€ Upload release asset
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && env.ARTIFACT_NAME != null
Expand All @@ -145,7 +151,7 @@ jobs:
SENTRY_ORG_SLUG: opengisch
SENTRY_PROJECT_SLUG: qfield
run: |
bundle exec fastlane run sentry_upload_dif path:${{ env.CMAKE_BUILD_DIR }}
bundle exec fastlane run sentry_upload_dif path:build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down

0 comments on commit fe30708

Please sign in to comment.