ci: Temporarily disable unused stages #1508
Workflow file for this run
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
| # SPDX-FileCopyrightText: Copyright (C) swift Project Community / Contributors | |
| # SPDX-License-Identifier: CC0-1.0 | |
| name: Build swift | |
| on: | |
| push: | |
| branches-ignore: | |
| - stable/** | |
| - nobuild/** | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| do_vatsim_key: ${{ github.event_name == 'push' }} | |
| do_symbols: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| do_doxygen: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| do_static_analysis: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }} | |
| qt_version: 6.10.0 | |
| bitrock_version: qt-professional-24.7.0 | |
| bitrock_url: https://releases.installbuilder.com/installbuilder | |
| externals: swift-project/externals | |
| externals_sha: e1f1743ba159e11b0c065ea8f1ae1a0e91e3bf39 | |
| use_externals: ${{ secrets.EXTERNALS_PAT != '' }} | |
| jobs: | |
| preBuild: | |
| runs-on: ubuntu-22.04 | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }} | |
| outputs: | |
| version: ${{ steps.version.outputs.value }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version number | |
| id: version | |
| run: | | |
| echo "value=$(python3 -u scripts/utils.py --version)" >>$GITHUB_OUTPUT | |
| - name: Remove artifacts | |
| uses: swift-project/delete-artifact@swift | |
| with: | |
| name: | | |
| xswiftbus-thin-* | |
| xswiftbus-fat-* | |
| swiftsymbols-* | |
| swiftinstaller-* | |
| failOnError: false | |
| warnIfNotFound: false | |
| checks: | |
| runs-on: ubuntu-22.04 | |
| needs: preBuild | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: '0' | |
| - name: Install gitlint | |
| run: | | |
| pip install gitlint==0.19.1 | |
| - name: Run gitlint | |
| run: gitlint --commits d789f61044e63e1a00d8e9f1d4d49c8d9ffc42a9..HEAD | |
| - name: Install REUSE | |
| run: | | |
| pip install reuse==4.0.3 | |
| - name: Run REUSE lint | |
| run: reuse lint | |
| - name: Run clang-format | |
| run: | | |
| scripts/run_clang_format.py | |
| - uses: Trass3r/setup-cpp@1b63900ecf3f0b7c60ee53aa7be122f2c4fe7a2c | |
| - name: Run cppcheck | |
| run: | | |
| sudo apt-get -y install cppcheck | |
| cppcheck --template=gcc --inline-suppr --std=c++17 --enable=style,unusedFunction \ | |
| -i src/plugins/weatherdata/gfs/g2clib -DCPPCHECK --force --suppressions-list=cppcheck.supp \ | |
| --library=qt.cfg --library=posix.cfg . | |
| - name: Install Qt docs | |
| if: ${{ env.do_doxygen == 'true' }} | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: ${{ env.qt_version }} | |
| no-qt-binaries: true | |
| documentation: true | |
| cache: true | |
| - name: Run doxygen | |
| if: ${{ env.do_doxygen == 'true' }} | |
| working-directory: docs | |
| run: | | |
| sudo apt-get -y install doxygen graphviz | |
| doxygen Doxyfile | |
| env: | |
| DOXY_SRC_ROOT: .. | |
| DOXY_TAGFILES: ${{ runner.workspace }}/Qt/Docs/Qt-${{ env.qt_version }} | |
| - name: Upload doxygen | |
| if: ${{ env.do_doxygen == 'true' }} | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/html/ | |
| buildLinux: | |
| runs-on: ubuntu-22.04 | |
| needs: [preBuild, checks] | |
| env: | |
| BACKTRACE_SYMBOL_TOKEN: ${{ secrets.BACKTRACE_SYMBOL_TOKEN }} | |
| BACKTRACE_MINIDUMP_TOKEN: ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }} | |
| BITROCK_BUILDER: ~/installbuilder/bin/builder | |
| steps: | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: ${{ env.qt_version }} | |
| modules: 'qtmultimedia' | |
| cache: true | |
| - name: Cache InstallBuilder | |
| id: cache-bitrock | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/installbuilder.run | |
| key: installbuilder-${{ env.bitrock_version }}-linux-x64 | |
| - name: Download InstallBuilder | |
| if: steps.cache-bitrock.outputs.cache-hit != 'true' | |
| run: | | |
| wget --retry-connrefused -t 10 -w 10 -T 60 -O ~/installbuilder.run ${{ env.bitrock_url }}/installbuilder-${{ env.bitrock_version }}-linux-x64-installer.run | |
| - name: Install InstallBuilder | |
| run: | | |
| chmod 700 ~/installbuilder.run | |
| ~/installbuilder.run --mode unattended --prefix ~/installbuilder | |
| cat >~/license.xml <<EOF | |
| $BITROCK_LICENSE | |
| EOF | |
| env: | |
| BITROCK_LICENSE: ${{ secrets.BITROCK_LICENSE }} | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -y install dbus-x11 libglu1-mesa-dev libpulse-dev libdbus-1-dev ninja-build | |
| pip3 install requests conan | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Checkout externals | |
| if: ${{ env.use_externals == 'true' }} | |
| uses: actions/checkout@v4 | |
| env: | |
| EXTERNALS_PAT: ${{ secrets.EXTERNALS_PAT }} | |
| with: | |
| repository: ${{ env.externals }} | |
| ref: ${{ env.externals_sha }} | |
| token: ${{ env.EXTERNALS_PAT }} | |
| path: 'third_party/externals' | |
| - name: Install conan dependencies | |
| shell: bash | |
| env: | |
| ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }} | |
| ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }} | |
| run: | | |
| conan profile detect | |
| conan remote disable conancenter | |
| conan remote add swift https://artifactory.swift-project.org/artifactory/api/conan/conan-local | |
| conan remote login swift "$ARTIFACTORY_USER" --password "$ARTIFACTORY_TOKEN" | |
| conan install . --output-folder=build_conan --deployer=full_deploy -pr=ci/profile_linux | |
| - name: Start DBus session bus | |
| run: | | |
| dbus-launch --sh-syntax | tee session.sh | |
| eval $(cat session.sh) | |
| echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >>$GITHUB_ENV | |
| - name: Create Vatsim key file | |
| if: ${{ env.do_vatsim_key == 'true' }} | |
| run: | | |
| cat >vatsim.json <<EOF | |
| { "vatsim": { "id": "$VATSIM_ID", "key": "$VATSIM_KEY" } } | |
| EOF | |
| env: | |
| VATSIM_ID: ${{ secrets.VATSIM_ID }} | |
| VATSIM_KEY: ${{ secrets.VATSIM_KEY }} | |
| - uses: Trass3r/setup-cpp@1b63900ecf3f0b7c60ee53aa7be122f2c4fe7a2c | |
| - name: Build swift (without symbols) | |
| if: ${{ env.do_symbols != 'true' }} | |
| run: | | |
| python3 -u scripts/build.py -w 64 -t gcc | |
| - name: Build swift (with symbols) | |
| if: ${{ env.do_symbols == 'true' }} | |
| run: | | |
| python3 -u scripts/build.py -w 64 -t gcc --upload-symbols | |
| - name: Run static analysis | |
| run: | | |
| mkdir build_static_analysis | |
| cmake -B build_static_analysis --preset=ci-build-linux-no-pch . | |
| python3 scripts/run_static_analysis.py --build-path build_static_analysis --clang-tidy | |
| rm -rf build_static_analysis |