# 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 installbuilder_hash_macos: 833717ad9189efdee7af3bbb5808bdf6b826c835cbc9c41817be750ae94a939b 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 buildMacOS: runs-on: macos-15 needs: [preBuild] env: BACKTRACE_SYMBOL_TOKEN: ${{ secrets.BACKTRACE_SYMBOL_TOKEN }} BACKTRACE_MINIDUMP_TOKEN: ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }} BITROCK_BUILDER: /Applications/installbuilder/bin/Builder.app/Contents/MacOS/installbuilder.sh 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.dmg key: installbuilder-${{ env.bitrock_version }}-osx - name: Download InstallBuilder if: steps.cache-bitrock.outputs.cache-hit != 'true' run: | wget --retry-connrefused -t 10 -w 10 -T 60 -O $HOME/installbuilder.dmg ${{ env.bitrock_url }}/installbuilder-${{ env.bitrock_version }}-osx-installer.dmg echo "${{ env.installbuilder_hash_macos }} $HOME/installbuilder.dmg" | sha256sum -c - - name: Install InstallBuilder run: | hdiutil attach $HOME/installbuilder.dmg cp -rf "/Volumes/InstallBuilder Qt/installbuilder-${{ env.bitrock_version }}-osx-installer.app" /Applications hdiutil detach "/Volumes/InstallBuilder Qt" sudo xattr -r -d com.apple.quarantine /Applications/installbuilder-${{ env.bitrock_version }}-osx-installer.app sudo /Applications/installbuilder-${{ env.bitrock_version }}-osx-installer.app/Contents/MacOs/installbuilder.sh --mode unattended --prefix /Applications/installbuilder cat >~/license.xml < CMakeUserPresets.json 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_mac conan install . --output-folder=build_conan_arm --deployer=full_deploy -pr=ci/profile_mac_arm # https://doc.qt.io/qt-6/macos-issues.html#d-bus-and-macos conan install --requires=dbus/1.15.8 --output-folder build_conan_dbus_shared --deployer=full_deploy -o "dbus/*:shared=True" -o "dbus/*:message_bus=True" -pr=ci/profile_mac - name: Create Vatsim key file if: ${{ env.do_vatsim_key == 'true' }} run: | cat >vatsim.json <