Using ScopedQPointer. #326
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: linux | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'README.md' | |
| - 'LICENSE.md' | |
| - 'CONTRIBUTING.md' | |
| - 'CODE_OF_CONDUCT.md' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| VCPKG_INSTALLED_DIR: ${{ github.workspace }}/builds/ci/vcpkg_installed | |
| VCPKG_BINARY_SOURCES: 'default,readwrite' | |
| jobs: | |
| build-all-matrix: | |
| name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build_type }} | |
| runs-on: ${{ matrix.os }} | |
| if: github.event_name == 'push' | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu22.04, rpios12] | |
| build_type: [release, debug] | |
| include: | |
| - os: ubuntu22.04 | |
| arch: x64 | |
| triplet: x64-linux | |
| - os: rpios12 | |
| arch: arm64 | |
| triplet: arm64-linux | |
| steps: | |
| # Step 1 | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| # Step 2 | |
| - name: Dependencies, Build, Tests (Linux/Bash) | |
| env: | |
| # This vars used inside CMake | |
| VCPKG_DEFAULT_BINARY_CACHE: /home/shared/vcpkg/bincache-${{ matrix.triplet }} | |
| VCPKG_TRIPLET: ${{ matrix.triplet }} | |
| VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.triplet }} | |
| VCPKG_DOWNLOADS: /home/shared/vcpkg/downloads | |
| run: | | |
| env | |
| if [ -z "${{ matrix.triplet }}" ]; then | |
| echo "VCPKG_TRIPLET is empty" | |
| exit 1 | |
| fi | |
| # Need to backup vcpkg executable to prevent it's rebuild/redownload each time | |
| if [ -f $VCPKG_DEFAULT_BINARY_CACHE/vcpkg.bak ]; then | |
| echo "Restore vcpkg executable" | |
| cp $VCPKG_DEFAULT_BINARY_CACHE/vcpkg.bak vcpkg4aspia/vcpkg | |
| fi | |
| mkdir -p $VCPKG_DEFAULT_BINARY_CACHE | |
| mkdir -p $VCPKG_DOWNLOADS | |
| # Build vcpkg dependencies | |
| cmake --preset ci | |
| # Build project | |
| cmake --build --preset ci-${{ matrix.build_type }} | |
| # Run tests | |
| ctest --preset ci-${{ matrix.build_type }} | |
| # Create deb packages | |
| cpack --config ${{ github.workspace }}/builds/ci/CPackConfig.cmake -C ${{ matrix.build_type }} | |
| # Need to backup vcpkg executable to prevent it's rebuild/redownload each time | |
| if [ -f vcpkg4aspia/vcpkg ]; then | |
| echo "Backup vcpkg executable" | |
| cp vcpkg4aspia/vcpkg $VCPKG_DEFAULT_BINARY_CACHE/vcpkg.bak | |
| fi | |
| # Step 4 | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: build-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build_type }} | |
| path: | | |
| ${{ github.workspace }}/*.deb | |
| if-no-files-found: error | |
| retention-days: 7 |