Add Strava account profile linking #12190
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
| # This is a basic workflow to help you get started with Actions | |
| name: CI | |
| env: | |
| DISPLAY: ':99' | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
| # Controls when the action will run. Triggers the workflow on push or pull request | |
| # events but only for the master branch | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ master, github-workflow-playground ] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| - cron: "0 0 * * *" | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| window-build: | |
| runs-on: windows-2022 | |
| strategy: | |
| matrix: | |
| config: | |
| - {python: true} | |
| - {python: false} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: bluetiger9/SmtpClient-for-Qt | |
| path: "src/smtpclient/" | |
| ref: 3fa4a0fe5797070339422cf18b5e9ed8dcb91f9c | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: google/googletest | |
| path: "tst/googletest/" | |
| ref: "release-1.12.1" | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: microsoft/MSIX-Toolkit | |
| path: "src/MSIX-Toolkit/" | |
| ref: b82af826d29e93e4c85d34fad8a405b6c49905e7 | |
| - uses: actions/checkout@v2 | |
| - name: Checkout qHttpServer | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: qt-labs/qthttpserver | |
| path: "src/qthttpserver" | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.7 | |
| - name: download python and paddleocr | |
| run: | | |
| python -VV | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade setuptools | |
| python -m pip install "protobuf<=3.20.2,>=3.1.0" | |
| python -m pip install paddlepaddle==2.5.1 | |
| python -m pip install paddleocr | |
| python -m pip install imutils | |
| python -m pip install "Pillow<10.0.0" | |
| python -m pip install opencv-python | |
| python -m pip install numpy | |
| python -m pip install pywin32 | |
| if: matrix.config.python | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt5-webview | |
| msystem: mingw64 | |
| release: false | |
| - name: Setup cmake | |
| uses: jwlawson/actions-setup-cmake@v1.9 | |
| with: | |
| cmake-version: '3.20.x' | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.2' | |
| host: 'windows' | |
| modules: 'qtnetworkauth qtcharts' | |
| target: "desktop" | |
| arch: win64_mingw81 | |
| dir: "${{github.workspace}}/qt/" | |
| install-deps: "true" | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-windows' | |
| - name: download 3rd party files for qthttpserver | |
| run: | | |
| cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| - name: Build qthttpserver | |
| run: | | |
| cd src\qthttpserver | |
| qmake | |
| make -j8 | |
| make install | |
| cd ../.. | |
| - name: Secrets | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| cd .. | |
| - name: Build | |
| run: | | |
| qmake | |
| make -j8 | |
| cd src/debug | |
| mkdir output | |
| mkdir appx | |
| cp qdomyos-zwift.* output/ | |
| cd output | |
| windeployqt --qmldir ../../ qdomyos-zwift.exe | |
| cp "C:/mingw64/bin/libwinpthread-1.dll" . | |
| cp "C:/mingw64/bin/libgcc_s_seh-1.dll" . | |
| cp "C:/mingw64/bin/libstdc++-6.dll" . | |
| cp ../../../icons/iOS/iTunesArtwork@2x.png . | |
| cp ../../AppxManifest.xml . | |
| cp ../../windows/*.py . | |
| cp ../../windows/*.bat . | |
| cp ../../../windows_openssl/*.* . | |
| mkdir adb | |
| mkdir python | |
| Copy-Item -Path C:\hostedtoolcache\windows\Python\3.7.9\x64 -Destination python -Recurse | |
| cp ../../adb/* adb/ | |
| cd .. | |
| cd appx | |
| #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz | |
| if: matrix.config.python | |
| - name: Build without python | |
| run: | | |
| qmake | |
| make -j8 | |
| cd src/debug | |
| mkdir output | |
| mkdir appx | |
| cp qdomyos-zwift.* output/ | |
| cd output | |
| windeployqt --qmldir ../../ qdomyos-zwift.exe | |
| cp "C:/mingw64/bin/libwinpthread-1.dll" . | |
| cp "C:/mingw64/bin/libgcc_s_seh-1.dll" . | |
| cp "C:/mingw64/bin/libstdc++-6.dll" . | |
| cp ../../../icons/iOS/iTunesArtwork@2x.png . | |
| cp ../../AppxManifest.xml . | |
| cp ../../../windows_openssl/*.* . | |
| mkdir adb | |
| cp ../../adb/* adb/ | |
| cd .. | |
| cd appx | |
| #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz | |
| if: matrix.config.python == false | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/windows/5.15.2/binary/mingw64/*.* ${{ github.workspace }}/src/debug/output/ | |
| - name: Zip artifact for deployment | |
| run: Compress-Archive src/debug/output windows-binary.zip | |
| if: matrix.config.python | |
| - name: Zip artifact for deployment | |
| run: Compress-Archive src/debug/output windows-binary-no-python.zip | |
| if: ${{ ! matrix.config.python }} | |
| - name: Archive windows binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-binary | |
| path: windows-binary.zip | |
| if: matrix.config.python | |
| - name: Archive windows binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-binary-no-python | |
| path: windows-binary-no-python.zip | |
| if: ${{ ! matrix.config.python }} | |
| # - name: Exit if not on master branch | |
| # if: github.ref == 'refs/heads/master' | |
| # run: exit 1 | |
| # - uses: actions/checkout@v3 | |
| # with: | |
| # fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags | |
| # - name: Get previous tag | |
| # id: previoustag | |
| # uses: 'WyriHaximus/github-action-get-previous-tag@v1' | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # - name: Create Release | |
| # if: ${{ ! matrix.config.python }} | |
| # id: create_release | |
| # uses: actions/create-release@v1 | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # with: | |
| # tag_name: ${{ steps.previoustag.outputs.tag }} | |
| # release_name: Release ${{ steps.previoustag.outputs.tag }} | |
| # draft: false | |
| # prerelease: false | |
| # - name: upload windows artifact | |
| # uses: actions/upload-release-asset@v1 | |
| # if: ${{ ! matrix.config.python }} | |
| # env: | |
| # GITHUB_TOKEN: ${{ github.token }} | |
| # with: | |
| # upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| # asset_path: release.zip | |
| # asset_name: windows-binary-no-python.zip | |
| # asset_content_type: application/zip | |
| # - name: upload windows artifact | |
| # uses: actions/upload-release-asset@v1 | |
| # if: ${{ matrix.config.python }} | |
| # env: | |
| # GITHUB_TOKEN: ${{ github.token }} | |
| # with: | |
| # upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| # asset_path: release.zip | |
| # asset_name: windows-binary.zip | |
| # asset_content_type: application/zip | |
| # window-steam-build: | |
| # runs-on: windows-latest | |
| # | |
| # steps: | |
| # - uses: actions/checkout@v2 | |
| # - name: Checkout submodule repo | |
| # uses: actions/checkout@v2 | |
| # with: | |
| # repository: bluetiger9/SmtpClient-for-Qt | |
| # path: "src/smtpclient/" | |
| # ref: 3fa4a0fe5797070339422cf18b5e9ed8dcb91f9c | |
| # | |
| # | |
| # - uses: msys2/setup-msys2@v2 | |
| # with: | |
| # install: mingw-w64-x86_64-toolchain | |
| # msystem: mingw64 | |
| # release: false | |
| # | |
| # - name: Setup cmake | |
| # uses: jwlawson/actions-setup-cmake@v1.9 | |
| # with: | |
| # cmake-version: '3.20.x' | |
| # | |
| # - name: Install Qt | |
| # uses: jurplel/install-qt-action@v2 | |
| # with: | |
| # version: '5.15.2' | |
| # host: 'windows' | |
| # modules: 'qtnetworkauth qtcharts' | |
| # target: "desktop" | |
| # arch: win64_mingw81 | |
| # dir: "${{github.workspace}}/qt/" | |
| # install-deps: "true" | |
| # | |
| # - name: Build | |
| # run: | | |
| # qmake | |
| # cd src | |
| # echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| # echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| # echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| # echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| # echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| # echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| # echo "#define STEAM_STORE" >> secret.h | |
| # cd .. | |
| # make -j8 | |
| # cd src/debug | |
| # mkdir output | |
| # mkdir appx | |
| # cp qdomyos-zwift.exe output/ | |
| # cd output | |
| # windeployqt --qmldir ../../ qdomyos-zwift.exe | |
| # cp "${{github.workspace}}/qt/Qt/5.15.2/mingw81_64/bin/libwinpthread-1.dll" . | |
| # cp "${{github.workspace}}/qt/Qt/5.15.2/mingw81_64/bin/libgcc_s_seh-1.dll" . | |
| # cp "${{github.workspace}}/qt/Qt/5.15.2/mingw81_64/bin/libstdc++-6.dll" . | |
| # | |
| # - uses: game-ci/steam-deploy@v1 | |
| # with: | |
| # username: ${{ secrets.STEAM_USERNAME }} | |
| # password: ${{ secrets.STEAM_PASSWORD }} | |
| # configVdf: ${{ secrets.STEAM_CONFIG_VDF}} | |
| # ssfnFileName: ${{ secrets.STEAM_SSFN_FILE_NAME }} | |
| # ssfnFileContents: ${{ secrets.STEAM_SSFN_FILE_CONTENTS }} | |
| # appId: 2267200 | |
| # buildDescription: 2.12 | |
| # rootPath: src/debug/output | |
| # depot1Path: ./ | |
| # #depot2Path: StandaloneLinux64 | |
| # releaseBranch: prerelease | |
| # This workflow contains a single job called "build" | |
| linux-x86-build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-24.04 | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - name: release | |
| uses: actions/create-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| id: create_release | |
| with: | |
| draft: false | |
| prerelease: false | |
| release_name: ${{ steps.version.outputs.version }} | |
| tag_name: ${{ github.ref }} | |
| body_path: CHANGELOG.md | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| # - name: Cache Qt Linux Desktop | |
| # id: cache-qt-linux-desktop | |
| # uses: actions/cache@v1 | |
| # with: | |
| # path: '${{ github.workspace }}/output/linux-desktop/' | |
| # key: ${{ runner.os }}-QtCache-Linux-Desktop | |
| # - name: Cache Qt Linux Android | |
| # id: cache-qt-android | |
| # uses: actions/cache@v1 | |
| # with: | |
| # path: '${{ github.workspace }}/output/android/' | |
| # key: ${{ runner.os }}-QtCache-Android | |
| - name: Xvfb install and run | |
| run: | | |
| sudo apt-get install -y xvfb | |
| Xvfb -ac ${{ env.DISPLAY }} -screen 0 1280x780x24 & | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: bluetiger9/SmtpClient-for-Qt | |
| path: "src/smtpclient/" | |
| ref: 3fa4a0fe5797070339422cf18b5e9ed8dcb91f9c | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: google/googletest | |
| path: "tst/googletest/" | |
| ref: "release-1.12.1" | |
| - uses: actions/checkout@v2 | |
| - name: Checkout qHttpServer | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: qt-labs/qthttpserver | |
| path: "src/qthttpserver" | |
| - name: Install packages required to run QZ inside workflow | |
| run: sudo apt update -y && sudo apt-get install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtquickcontrols2-5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 libqt5networkauth5-dev libqt5websockets5* libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev qtbase5-dev libqt5sql5-sqlite libqt5sql5 libqt5sql5-mysql libqt5sql5-psql | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.2' | |
| host: 'linux' | |
| modules: 'qtnetworkauth qtcharts' | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-linux' | |
| - name: download 3rd party files for qthttpserver | |
| run: | | |
| cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| - name: Build qthttpserver | |
| run: | | |
| cd src/qthttpserver | |
| qmake | |
| make -j8 | |
| make install | |
| cd ../.. | |
| - name: Compile Linux Desktop | |
| run: qmake; make -j8 | |
| - name: Archive linux-desktop binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-desktop-binary | |
| path: src/qdomyos-zwift | |
| - name: Test | |
| run: cd tst; GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ./qdomyos-zwift-tests; cd .. | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: test_results_xml | |
| path: tst/test-results/**/*.xml | |
| - name: Upload test FIT files and database | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test_fit_files_and_db | |
| path: | | |
| tst/test-artifacts/*.fit | |
| tst/test-artifacts/*.sqlite | |
| # - name: Test Peloton API | |
| # if: github.event_name == 'push' || github.event_name == 'schedule' | |
| # run: cd /home/runner/work/qdomyos-zwift/qdomyos-zwift/src/; ./qdomyos-zwift -test-peloton -peloton-username ${{ secrets.peloton_username }} -peloton-password ${{ secrets.peloton_password }} | |
| # timeout-minutes: 2 | |
| # - name: Test Home Fitness Buddy API | |
| # run: cd /home/runner/work/qdomyos-zwift/qdomyos-zwift/src/; ./qdomyos-zwift -test-hfb | |
| # timeout-minutes: 2 | |
| # - uses: actions/checkout@v2 | |
| # with: | |
| # repository: nttld/setup-ndk | |
| # path: setup-ndk | |
| # The packages.json in nttld/setup-ndk has already been updated, | |
| # https://github.com/nttld/setup-ndk/commit/831db5b02a0f0cab80614619efe461a3dcc140e6 | |
| # but `dist/*` has not been rebuilt yet. Build it. | |
| # https://github.com/nttld/setup-ndk/tree/main/dist | |
| # - name: Locally rebuilt setup-ndk | |
| # run: | | |
| # npm -prefix ./setup-ndk install | |
| # npm -prefix ./setup-ndk run all | |
| # Install using locally rebuilt setup-ndk | |
| # - name: Setup Android NDK r21d | |
| # uses: ./setup-ndk | |
| #- uses: nttld/setup-ndk@v1 | |
| # with: | |
| # ndk-version: r21d | |
| # waiting github.com/jurplel/install-qt-action/issues/63 | |
| # - name: Install Qt Android | |
| # uses: jurplel/install-qt-action@v2 | |
| # with: | |
| # version: '5.12.9' | |
| # host: 'linux' | |
| # target: 'android' | |
| # arch: 'android_armv7' | |
| # modules: 'qtcharts debug_info' | |
| # dir: '${{ github.workspace }}/output/android/' | |
| # cached: ${{ steps.cache-qt-android.outputs.cache-hit }} | |
| # - name: Compile Android | |
| # run: cd src; qmake; make -j4 | |
| # - name: Install Qt MacOS | |
| # uses: jurplel/install-qt-action@v2 | |
| # with: | |
| # version: '5.12.9' | |
| # host: 'mac' | |
| # target: 'desktop' | |
| # modules: 'qtcharts debug_info' | |
| # dir: '${{ github.workspace }}/output/macos/' | |
| # - name: Compile MacOS | |
| # run: cd src; qmake; make -j4 | |
| # This workflow contains a single job called "build" | |
| android-build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-22.04 | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| # - name: Cache Qt Linux Desktop | |
| # id: cache-qt-linux-desktop | |
| # uses: actions/cache@v1 | |
| # with: | |
| # path: '${{ github.workspace }}/output/linux-desktop/' | |
| # key: ${{ runner.os }}-QtCache-Linux-Desktop | |
| # - name: Cache Qt Linux Android | |
| # id: cache-qt-android | |
| # uses: actions/cache@v1 | |
| # with: | |
| # path: '${{ github.workspace }}/output/android/' | |
| # key: ${{ runner.os }}-QtCache-Android | |
| - name: Xvfb install and run | |
| run: | | |
| sudo apt-get install -y xvfb | |
| Xvfb -ac ${{ env.DISPLAY }} -screen 0 1280x780x24 & | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| submodules: 'false' # Prima disattiva il checkout automatico dei submodule | |
| - name: Checkout submodules with specific branches | |
| run: | | |
| git submodule init | |
| git submodule update --init --recursive | |
| - name: Install packages required to run QZ inside workflow | |
| run: sudo apt update -y && sudo apt-get install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtquickcontrols2-5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 libqt5networkauth5-dev libqt5websockets5* libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev | |
| # - name: Test Peloton API | |
| # if: github.event_name == 'push' || github.event_name == 'schedule' | |
| # run: cd /home/runner/work/qdomyos-zwift/qdomyos-zwift/src/; ./qdomyos-zwift -test-peloton -peloton-username ${{ secrets.peloton_username }} -peloton-password ${{ secrets.peloton_password }} | |
| # timeout-minutes: 2 | |
| # - name: Test Home Fitness Buddy API | |
| # run: cd /home/runner/work/qdomyos-zwift/qdomyos-zwift/src/; ./qdomyos-zwift -test-hfb | |
| # timeout-minutes: 2 | |
| # - uses: actions/checkout@v2 | |
| # with: | |
| # repository: nttld/setup-ndk | |
| # path: setup-ndk | |
| # The packages.json in nttld/setup-ndk has already been updated, | |
| # https://github.com/nttld/setup-ndk/commit/831db5b02a0f0cab80614619efe461a3dcc140e6 | |
| # but `dist/*` has not been rebuilt yet. Build it. | |
| # https://github.com/nttld/setup-ndk/tree/main/dist | |
| # - name: Locally rebuilt setup-ndk | |
| # run: | | |
| # npm -prefix ./setup-ndk install | |
| # npm -prefix ./setup-ndk run all | |
| # Install using locally rebuilt setup-ndk | |
| # - name: Setup Android NDK r21d | |
| # uses: ./setup-ndk | |
| #- uses: nttld/setup-ndk@v1 | |
| # with: | |
| # ndk-version: r21d | |
| # waiting github.com/jurplel/install-qt-action/issues/63 | |
| - name: Install Qt Android | |
| uses: jdpurcell/install-qt-action@v5 | |
| with: | |
| version: '5.15.0' | |
| host: 'linux' | |
| target: 'android' | |
| arch: 'android' | |
| modules: 'qtcharts qtnetworkauth' | |
| dir: '${{ github.workspace }}/output/android/' | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-android' | |
| - name: Install Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' # See 'Supported distributions' for available options | |
| java-version: '11.0.23+9' | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/android/5.15.0/jar/*.* ${{ github.workspace }}/output/android/Qt/5.15.0/android/jar/ | |
| - name: download 3rd party files for qthttpserver | |
| run: cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| - name: Set Android NDK 21 && build | |
| run: | | |
| # Install NDK 21 after GitHub update | |
| # https://github.com/actions/virtual-environments/issues/5595 | |
| ANDROID_ROOT="/usr/local/lib/android" | |
| ANDROID_SDK_ROOT="${ANDROID_ROOT}/sdk" | |
| SDKMANAGER="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" | |
| echo "y" | $SDKMANAGER "ndk;21.4.7075529" | |
| export ANDROID_NDK="${ANDROID_SDK_ROOT}/ndk-bundle" | |
| export ANDROID_NDK_ROOT="${ANDROID_NDK}" | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| echo "#define LICENSE" >> secret.h | |
| cd .. | |
| ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK | |
| rm -rf /usr/local/lib/android/sdk/ndk/25.1.8937393 | |
| # QTHTTPSERVER must use the same NDK | |
| cd src/qthttpserver | |
| qmake | |
| make -j8 | |
| make install | |
| cd ../.. | |
| qmake -spec android-clang 'ANDROID_ABIS=armeabi-v7a arm64-v8a x86 x86_64' 'ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/21.4.7075529' && make -j4 && make INSTALL_ROOT=${{ github.workspace }}/output/android/ install | |
| sed -i '1s|{|{\n "android-extra-libs": "${{ github.workspace }}/android_openssl/no-asm/latest/arm/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libssl_1_1.so",|' src/android-qdomyos-zwift-deployment-settings.json | |
| cat src/android-qdomyos-zwift-deployment-settings.json | |
| - name: Build APK (not usable for production due to unpatched QT library) | |
| run: cd src; androiddeployqt --input android-qdomyos-zwift-deployment-settings.json --output ${{ github.workspace }}/output/android/ --android-platform android-31 --gradle --aab | |
| - name: Archive apk binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fdroid-android-trial | |
| path: ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug.apk | |
| android-emulator-test: | |
| runs-on: ubuntu-latest | |
| needs: android-build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| api-level: [24, 26, 28, 29, 30, 31, 33, 35, 36] | |
| include: | |
| - api-level: 24 | |
| target: default | |
| arch: x86 | |
| android-version: "Android 7.0" | |
| - api-level: 26 | |
| target: default | |
| arch: x86 | |
| android-version: "Android 8.0" | |
| - api-level: 28 | |
| target: default | |
| arch: x86 | |
| android-version: "Android 9.0" | |
| - api-level: 29 | |
| target: default | |
| arch: x86 | |
| android-version: "Android 10" | |
| - api-level: 30 | |
| target: google_apis | |
| arch: x86 | |
| android-version: "Android 11" | |
| - api-level: 31 | |
| target: google_apis | |
| arch: x86_64 | |
| android-version: "Android 12" | |
| - api-level: 33 | |
| target: google_apis | |
| arch: x86_64 | |
| android-version: "Android 13" | |
| - api-level: 35 | |
| target: google_apis | |
| arch: x86_64 | |
| android-version: "Android 15" | |
| - api-level: 36 | |
| target: google_apis | |
| arch: x86_64 | |
| android-version: "Android 16" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| # Download the APK from the previous job | |
| - name: Download APK Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: fdroid-android-trial | |
| path: apk-debug | |
| - name: Setup Java for Android Emulator | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| # Use a smaller emulator configuration | |
| - name: Run tests on emulator (${{ matrix.android-version }}) | |
| uses: ReactiveCircus/android-emulator-runner@v2 | |
| with: | |
| target: ${{ matrix.target }} | |
| arch: ${{ matrix.arch }} | |
| api-level: ${{ matrix.api-level }} | |
| profile: Nexus 6 | |
| disable-animations: true | |
| script: | | |
| # Display available space | |
| df -h | |
| # List available files | |
| echo "Files in apk-debug directory:" | |
| ls -la apk-debug/ | |
| # Install the APK | |
| adb install apk-debug/android-debug.apk | |
| # Grant necessary permissions - comprehensive list for all Android APIs | |
| echo "Granting all required permissions..." | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.ACCESS_FINE_LOCATION || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.ACCESS_COARSE_LOCATION || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.BLUETOOTH || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.BLUETOOTH_ADMIN || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.BLUETOOTH_ADVERTISE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.BLUETOOTH_CONNECT || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.BLUETOOTH_SCAN || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.READ_EXTERNAL_STORAGE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.WRITE_EXTERNAL_STORAGE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.MANAGE_EXTERNAL_STORAGE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.CAMERA || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.RECORD_AUDIO || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.INTERNET || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.ACCESS_NETWORK_STATE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.ACCESS_WIFI_STATE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.CHANGE_WIFI_STATE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.WAKE_LOCK || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.VIBRATE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.READ_PHONE_STATE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.FOREGROUND_SERVICE || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS || true | |
| # Additional permissions for newer Android versions (12+) | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.POST_NOTIFICATIONS || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.SCHEDULE_EXACT_ALARM || true | |
| adb shell pm grant org.cagnulen.qdomyoszwift android.permission.USE_EXACT_ALARM || true | |
| # Enable all app ops permissions | |
| adb shell appops set org.cagnulen.qdomyoszwift MANAGE_EXTERNAL_STORAGE allow || true | |
| adb shell appops set org.cagnulen.qdomyoszwift SYSTEM_ALERT_WINDOW allow || true | |
| adb shell appops set org.cagnulen.qdomyoszwift WRITE_SETTINGS allow || true | |
| echo "All permissions granted successfully" | |
| # Start the main activity | |
| adb shell am start -n org.cagnulen.qdomyoszwift/org.cagnulen.qdomyoszwift.CustomQtActivity | |
| # Wait for app to start | |
| sleep 90 | |
| # Verify the app is running | |
| echo "Checking if app is running..." | |
| # Use different ps commands for different Android versions | |
| adb shell "ps -A 2>/dev/null || ps" > process_list.txt | |
| # Debug: show all processes to understand the format | |
| echo "=== All running processes ===" | |
| cat process_list.txt | head -20 | |
| echo "=== Looking for our app ===" | |
| grep -q "qdomyos" process_list.txt || (echo "App process not found in process list" && echo "TEST FAILED: App process not running" && exit 1) | |
| adb shell pm list packages | grep org.cagnulen.qdomyoszwift | |
| echo "=== Checking app info ===" | |
| adb shell dumpsys package org.cagnulen.qdomyoszwift | grep -A5 -B5 "state" | |
| echo "=== Logcat output for debugging ===" | |
| adb logcat -d | grep -i "qdomyos\|crash\|error\|exception\|fatal" | tail -n 50 | |
| echo "=== Full recent logcat ===" | |
| adb logcat -d | tail -n 100 | |
| echo "App is running successfully" | |
| # Take a screenshot for verification | |
| adb shell screencap -p /sdcard/screenshot.png | |
| adb pull /sdcard/screenshot.png | |
| # Test orientamento automatico con screenshot | |
| echo "Starting orientation test with automatic screenshots..." | |
| # Screenshot iniziale (orientamento corrente) | |
| adb shell screencap -p /sdcard/screenshot_orientation_0.png | |
| adb pull /sdcard/screenshot_orientation_0.png | |
| # Loop per 3 rotazioni aggiuntive (90°, 180°, 270°) | |
| for i in 1 2 3; do echo "Rotating to orientation $i (90° * $i)"; adb shell settings put system user_rotation $i; sleep 5; echo "Taking screenshot for orientation $i"; adb shell screencap -p /sdcard/screenshot_orientation_$i.png; adb pull /sdcard/screenshot_orientation_$i.png; done | |
| echo "Orientation test completed - 4 screenshots captured" | |
| # Check if the package is installed | |
| adb shell pm list packages | grep org.cagnulen.qdomyoszwift | |
| # Save logcat for debugging | |
| echo "Saving logcat for analysis..." | |
| adb logcat -d > full_logcat.txt | |
| adb logcat -d | grep -i qdomyos > qdomyos_logcat.txt | |
| - name: Upload test evidence | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-emulator-test-evidence-api${{ matrix.api-level }} | |
| path: | | |
| screenshot.png | |
| screenshot_orientation_*.png | |
| process_list.txt | |
| full_logcat.txt | |
| qdomyos_logcat.txt | |
| if-no-files-found: warn | |
| ios-build: | |
| # The type of runner that the job will run on | |
| runs-on: macos-14 | |
| permissions: | |
| contents: write | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: bluetiger9/SmtpClient-for-Qt | |
| path: "src/smtpclient/" | |
| ref: 3fa4a0fe5797070339422cf18b5e9ed8dcb91f9c | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: google/googletest | |
| path: "tst/googletest/" | |
| ref: "release-1.12.1" | |
| - name: Install Qt iOS | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.2' | |
| host: 'mac' | |
| target: 'ios' | |
| modules: 'qtcharts qtnetworkauth' | |
| dir: '${{ github.workspace }}/output/ios/' | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-ios' | |
| - name: fix qt | |
| run: find ${{ github.workspace }}/output/ios/ -name 'ios.conf' -exec sed -i '' 's/ios-simulator/iphonesimulator/g' {} \; | |
| - name: fix qt | |
| run: find ${{ github.workspace }}/output/ios/ -name 'devices.py' -exec sed -i '' 's/\/usr\/bin\/python/\/usr\/bin\/python3/g' {} \; | |
| - name: fix qt | |
| run: find ./ -name 'qdomyos-zwift-lib.pro' -exec sed -i '' 's/TARGET = qdomyos-zwift/TARGET = qdomyoszwift/g' {} \; | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/ios/5.15.2/binary/*.* ${{ github.workspace }}/output/ios/Qt/5.15.2/ios/lib/ | |
| - name: Build | |
| run: | | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| cd .. | |
| qmake CONFIG+=debug CONFIG+=iphonesimulator && make -j4 | |
| # causes iOS build on Mac to fail | |
| # - name: Commit moc files | |
| # uses: EndBug/add-and-commit@v9 | |
| # with: | |
| # message: 'moc files added' | |
| # add: 'src/moc_*.cpp --force' | |
| # if: github.ref == 'refs/heads/master' | |
| window-msvc2019-build: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| config: | |
| - {python: true} | |
| - {python: false} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: bluetiger9/SmtpClient-for-Qt | |
| path: "src/smtpclient/" | |
| ref: 3fa4a0fe5797070339422cf18b5e9ed8dcb91f9c | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: google/googletest | |
| path: "tst/googletest/" | |
| ref: "release-1.12.1" | |
| - uses: actions/checkout@v2 | |
| - name: Checkout qHttpServer | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: qt-labs/qthttpserver | |
| path: "src/qthttpserver" | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.7 | |
| - name: download python and paddleocr | |
| run: | | |
| python -VV | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade setuptools | |
| python -m pip install "protobuf<=3.20.2,>=3.1.0" | |
| python -m pip install paddlepaddle==2.5.1 | |
| python -m pip install paddleocr | |
| python -m pip install imutils | |
| python -m pip install "Pillow<10.0.0" | |
| python -m pip install opencv-python | |
| python -m pip install numpy | |
| python -m pip install pywin32 | |
| if: matrix.config.python | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.2' | |
| host: 'windows' | |
| modules: 'qtnetworkauth qtcharts' | |
| target: "desktop" | |
| arch: win64_msvc2019_64 | |
| dir: "${{github.workspace}}/qt/" | |
| install-deps: "true" | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-windows' | |
| - name: Install MSVC compiler | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| # 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo | |
| toolset: 14.2 | |
| arch: x64 | |
| - name: download 3rd party files for qthttpserver | |
| run: | | |
| cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| - name: Build qthttpserver | |
| run: | | |
| cd src\qthttpserver | |
| qmake | |
| nmake | |
| nmake install | |
| cd ../.. | |
| - name: Secrets | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| cd .. | |
| - name: Clone vcpkg | |
| run: git clone https://github.com/microsoft/vcpkg.git | |
| working-directory: ${{ runner.workspace }} | |
| - name: Bootstrap vcpkg | |
| run: .\vcpkg\bootstrap-vcpkg.bat | |
| working-directory: ${{ runner.workspace }} | |
| - name: Create vcpkg.json | |
| working-directory: ${{ runner.workspace }} | |
| run: | | |
| echo '{ | |
| "name": "qdomyos-zwift", | |
| "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", | |
| "dependencies": [ | |
| "protobuf", | |
| "protobuf-c", | |
| "abseil" | |
| ], | |
| "builtin-baseline": "8c2fcacefba009d63672f9d137f192765e632c9f" | |
| }' > vcpkg.json | |
| - name: Install dependencies | |
| run: | | |
| .\vcpkg\vcpkg install --triplet x64-windows --x-install-root=${{ runner.workspace }}\vcpkg\installed | |
| working-directory: ${{ runner.workspace }} | |
| - name: Build | |
| run: | | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination . -Verbose | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination src/ -Verbose | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\include\* -Destination src/ -Recurse -Verbose | |
| qmake | |
| nmake | |
| cd src/debug | |
| mkdir output | |
| mkdir appx | |
| cp qdomyos-zwift.* output/ | |
| cd output | |
| windeployqt --qmldir ../../ qdomyos-zwift.exe | |
| cp ../../../icons/iOS/iTunesArtwork@2x.png . | |
| cp ../../AppxManifest.xml . | |
| cp ../../windows/*.py . | |
| cp ../../windows/*.bat . | |
| cp ../../../windows_openssl/*.* . | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\bin\*.* -Destination . -Verbose | |
| mkdir adb | |
| mkdir python | |
| Copy-Item -Path C:\hostedtoolcache\windows\Python\3.7.9\x64 -Destination python -Recurse | |
| cp ../../adb/* adb/ | |
| cd .. | |
| cd appx | |
| #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz | |
| if: matrix.config.python | |
| - name: Build without python | |
| run: | | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination . -Verbose | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination src/ -Verbose | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\include\* -Destination src/ -Recurse -Verbose | |
| qmake | |
| nmake | |
| cd src/debug | |
| mkdir output | |
| mkdir appx | |
| cp qdomyos-zwift.* output/ | |
| cd output | |
| windeployqt --qmldir ../../ qdomyos-zwift.exe | |
| cp "C:/mingw64/bin/libwinpthread-1.dll" . | |
| cp "C:/mingw64/bin/libgcc_s_seh-1.dll" . | |
| cp "C:/mingw64/bin/libstdc++-6.dll" . | |
| cp ../../../icons/iOS/iTunesArtwork@2x.png . | |
| cp ../../AppxManifest.xml . | |
| cp ../../../windows_openssl/*.* . | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\bin\*.* -Destination . -Verbose | |
| mkdir adb | |
| cp ../../adb/* adb/ | |
| cd .. | |
| cd appx | |
| #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz | |
| if: matrix.config.python == false | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/windows/5.15.2/binary/msvc2019/*.* ${{ github.workspace }}/src/debug/output/ | |
| - name: Zip artifact for deployment | |
| run: Compress-Archive src/debug/output windows-msvc2019-binary.zip | |
| if: matrix.config.python | |
| - name: Zip artifact for deployment | |
| run: Compress-Archive src/debug/output windows-msvc2019-binary-no-python.zip | |
| if: ${{ ! matrix.config.python }} | |
| - name: Archive windows binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-msvc2019-binary | |
| path: windows-msvc2019-binary.zip | |
| if: matrix.config.python | |
| - name: Archive windows binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-msvc2019-binary-no-python | |
| path: windows-msvc2019-binary-no-python.zip | |
| if: ${{ ! matrix.config.python }} | |
| window-msvc2019-aiserver-build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: bluetiger9/SmtpClient-for-Qt | |
| path: "src/smtpclient/" | |
| ref: 3fa4a0fe5797070339422cf18b5e9ed8dcb91f9c | |
| - uses: actions/checkout@v2 | |
| - name: Checkout submodule repo | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: google/googletest | |
| path: "tst/googletest/" | |
| ref: "release-1.12.1" | |
| - uses: actions/checkout@v2 | |
| - name: Checkout qHttpServer | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: qt-labs/qthttpserver | |
| path: "src/qthttpserver" | |
| - name: Install CMake | |
| uses: lukka/get-cmake@latest | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.2' | |
| host: 'windows' | |
| modules: 'qtnetworkauth qtcharts' | |
| target: "desktop" | |
| arch: win64_msvc2019_64 | |
| dir: "${{github.workspace}}/qt/" | |
| install-deps: "true" | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-windows' | |
| - name: Install MSVC compiler | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| # 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo | |
| toolset: 14.2 | |
| arch: x64 | |
| - name: download 3rd party files for qthttpserver | |
| run: | | |
| cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| - name: Build qthttpserver | |
| run: | | |
| cd src\qthttpserver | |
| qmake | |
| nmake | |
| nmake install | |
| cd ../.. | |
| - name: Secrets | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| cd .. | |
| - name: Clone vcpkg | |
| run: git clone https://github.com/microsoft/vcpkg.git | |
| working-directory: ${{ runner.workspace }} | |
| - name: Bootstrap vcpkg | |
| run: .\vcpkg\bootstrap-vcpkg.bat | |
| working-directory: ${{ runner.workspace }} | |
| - name: Create vcpkg.json | |
| working-directory: ${{ runner.workspace }} | |
| run: | | |
| echo '{ | |
| "name": "qdomyos-zwift", | |
| "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", | |
| "dependencies": [ | |
| "protobuf", | |
| "protobuf-c", | |
| "abseil" | |
| ], | |
| "builtin-baseline": "8c2fcacefba009d63672f9d137f192765e632c9f" | |
| }' > vcpkg.json | |
| - name: Install dependencies | |
| run: | | |
| .\vcpkg\vcpkg install --triplet x64-windows --x-install-root=${{ runner.workspace }}\vcpkg\installed | |
| working-directory: ${{ runner.workspace }} | |
| - name: Build | |
| run: | | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination . -Verbose | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination src/ -Verbose | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\include\* -Destination src/ -Recurse -Verbose | |
| cd src | |
| echo "#define AISERVER" >> aiserver.h | |
| cd .. | |
| qmake | |
| nmake | |
| cd src/debug | |
| mkdir output | |
| mkdir appx | |
| cp qdomyos-zwift.* output/ | |
| cd output | |
| windeployqt --qmldir ../../ qdomyos-zwift.exe | |
| cp ../../../icons/iOS/iTunesArtwork@2x.png . | |
| cp ../../AppxManifest.xml . | |
| cp ../../windows/zwift-incline-ai-server.py zwift-incline.py | |
| cp ../../windows/zwift-incline-climb-portal-ai-server.py zwift-incline-climb-portal.py | |
| cp ../../windows/zwift-workout-ai-server.py zwift-workout.py | |
| cp ../../windows/*.bat . | |
| cp ../../../windows_openssl/*.* . | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\bin\*.* -Destination . -Verbose | |
| mkdir adb | |
| cp ../../adb/* adb/ | |
| cd .. | |
| cd appx | |
| #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/windows/5.15.2/binary/msvc2019/*.* ${{ github.workspace }}/src/debug/output/ | |
| - name: Zip artifact for deployment | |
| run: Compress-Archive src/debug/output windows-msvc2019-ai-server-binary.zip | |
| - name: Archive windows binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-msvc2019-ai-server-binary | |
| path: windows-msvc2019-ai-server-binary.zip | |
| raspberry-pi-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Secrets | |
| run: | | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| echo "#define LICENSE" >> secret.h | |
| cd .. | |
| - name: Build for Raspberry Pi | |
| uses: docker://arm32v7/debian:bullseye-20241016 | |
| with: | |
| args: > | |
| bash -c " | |
| set -ex && | |
| for i in 1 2 3; do apt-get update && break || sleep 5; done && | |
| for i in 1 2 3; do apt-get install -y --fix-missing build-essential git cmake qtbase5-dev qtbase5-private-dev qtchooser qt5-qmake qtbase5-dev-tools qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev libqt5charts5-dev qtpositioning5-dev qtconnectivity5-dev libqt5websockets5-dev libqt5texttospeech5-dev libqt5bluetooth5 libqt5networkauth5-dev qml-module-qtlocation qml-module-qtpositioning qtlocation5-dev libqt5quickcontrols2-5 qtquickcontrols2-5-dev qml-module-qtquick-controls2 qtbase5-dev libqt5sql5-sqlite libqt5sql5 libqt5sql5-mysql libqt5sql5-psql && break || sleep 5; done && | |
| export QT_SELECT=qt5 && | |
| export PATH=/usr/lib/qt5/bin:$PATH && | |
| cd /github/workspace && | |
| sed -i '/QtHttpServer/d' qdomyos-zwift.pro && | |
| find src -type f \( -name '*.cpp' -o -name '*.h' \) -exec sed -i 's/#include <QtHttpServer/\/\/#include <QtHttpServer/' {} + && | |
| find src -type f \( -name '*.cpp' -o -name '*.h' \) -exec sed -i 's/QHttpServer/\/\/QHttpServer/' {} + && | |
| cat qdomyos-zwift.pro && | |
| qmake && | |
| make -j$(nproc) | |
| " | |
| - name: Rename binary | |
| run: mv src/qdomyos-zwift src/qdomyos-zwift-32bit | |
| - name: Archive Raspberry Pi binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: raspberry-pi-binary | |
| path: src/qdomyos-zwift-32bit | |
| raspberry-pi-build-and-image-64bit: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Setup QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| image: tonistiigi/binfmt:master | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| with: | |
| version: v0.19.3 | |
| - name: Secrets | |
| run: | | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| echo "#define LICENSE" >> secret.h | |
| cd .. | |
| - name: Build for Raspberry Pi 64-bit | |
| uses: docker://arm64v8/debian:bullseye-20241016 | |
| with: | |
| args: > | |
| bash -c " | |
| set -ex && | |
| for i in 1 2 3; do apt-get update && break || sleep 5; done && | |
| for i in 1 2 3; do apt-get install -y --fix-missing build-essential git cmake qtbase5-dev qtbase5-private-dev qtchooser qt5-qmake qtbase5-dev-tools qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev libqt5charts5-dev qtpositioning5-dev qtconnectivity5-dev libqt5websockets5-dev libqt5texttospeech5-dev libqt5bluetooth5 libqt5networkauth5-dev qml-module-qtlocation qml-module-qtpositioning qtlocation5-dev libqt5quickcontrols2-5 qtquickcontrols2-5-dev qml-module-qtquick-controls2 qtbase5-dev libqt5sql5-sqlite libqt5sql5 libqt5sql5-mysql libqt5sql5-psql && break || sleep 5; done && | |
| export QT_SELECT=qt5 && | |
| export PATH=/usr/lib/qt5/bin:$PATH && | |
| cd /github/workspace && | |
| sed -i '/QtHttpServer/d' qdomyos-zwift.pro && | |
| find src -type f \( -name '*.cpp' -o -name '*.h' \) -exec sed -i 's/#include <QtHttpServer/\/\/#include <QtHttpServer/' {} + && | |
| find src -type f \( -name '*.cpp' -o -name '*.h' \) -exec sed -i 's/QHttpServer/\/\/QHttpServer/' {} + && | |
| cat qdomyos-zwift.pro && | |
| qmake && | |
| make -j$(nproc) | |
| " | |
| - name: Rename binary | |
| run: mv src/qdomyos-zwift src/qdomyos-zwift-64bit | |
| - name: Archive Raspberry Pi 64bit binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: raspberry-pi-binary-64bit | |
| path: src/qdomyos-zwift-64bit | |
| window-msvc2022-build: | |
| runs-on: windows-latest | |
| if: github.event_name == 'schedule' | |
| strategy: | |
| matrix: | |
| config: | |
| - {python: true} | |
| - {python: false} | |
| steps: | |
| - name: Checkout PR code | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: refs/pull/1508/head | |
| submodules: recursive | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.7 | |
| - name: download python and paddleocr | |
| run: | | |
| python -VV | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade setuptools | |
| python -m pip install "protobuf<=3.20.2,>=3.1.0" | |
| python -m pip install paddlepaddle==2.5.1 | |
| python -m pip install paddleocr | |
| python -m pip install imutils | |
| python -m pip install "Pillow<10.0.0" | |
| python -m pip install opencv-python | |
| python -m pip install numpy | |
| python -m pip install pywin32 | |
| if: matrix.config.python | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '6.8.2' | |
| host: 'windows' | |
| modules: 'qtnetworkauth qtcharts qtconnectivity qtspeech qtpositioning qtwebsockets qtlocation qtmultimedia qtwebengine qtwebview qthttpserver qtwebchannel' | |
| target: "desktop" | |
| arch: win64_msvc2022_64 | |
| dir: "${{github.workspace}}/qt/" | |
| install-deps: "true" | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-windows' | |
| - name: Install MSVC compiler | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| # 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo | |
| #toolset: 14.2 | |
| arch: x64 | |
| # - name: download 3rd party files for qthttpserver | |
| # run: | | |
| # cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| # - name: Build qthttpserver | |
| # run: | | |
| # cd src\qthttpserver | |
| # qmake | |
| # nmake | |
| # nmake install | |
| # cd ../.. | |
| - name: Secrets | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| cd .. | |
| - name: Clone vcpkg | |
| run: git clone https://github.com/microsoft/vcpkg.git | |
| working-directory: ${{ runner.workspace }} | |
| - name: Bootstrap vcpkg | |
| run: .\vcpkg\bootstrap-vcpkg.bat | |
| working-directory: ${{ runner.workspace }} | |
| - name: Create vcpkg.json | |
| working-directory: ${{ runner.workspace }} | |
| run: | | |
| echo '{ | |
| "name": "qdomyos-zwift", | |
| "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", | |
| "dependencies": [ | |
| "protobuf", | |
| "protobuf-c", | |
| "abseil" | |
| ], | |
| "builtin-baseline": "8c2fcacefba009d63672f9d137f192765e632c9f" | |
| }' > vcpkg.json | |
| - name: Install dependencies | |
| run: | | |
| .\vcpkg\vcpkg install --triplet x64-windows --x-install-root=${{ runner.workspace }}\vcpkg\installed | |
| working-directory: ${{ runner.workspace }} | |
| - name: Build | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination . -Verbose | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination src/ -Verbose | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\include\* -Destination src/ -Recurse -Verbose | |
| run: | | |
| qmake | |
| nmake | |
| cd src/debug | |
| mkdir output | |
| mkdir appx | |
| cp qdomyos-zwift.* output/ | |
| cd output | |
| windeployqt --qmldir ../../ qdomyos-zwift.exe | |
| cp ../../../icons/iOS/iTunesArtwork@2x.png . | |
| cp ../../AppxManifest.xml . | |
| cp ../../windows/*.py . | |
| cp ../../windows/*.bat . | |
| cp ../../../windows_openssl/*.* . | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\bin\*.* -Destination . -Verbose | |
| mkdir adb | |
| mkdir python | |
| Copy-Item -Path C:\hostedtoolcache\windows\Python\3.7.9\x64 -Destination python -Recurse | |
| cp ../../adb/* adb/ | |
| cd .. | |
| cd appx | |
| #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz | |
| if: matrix.config.python | |
| - name: Build without python | |
| # Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination . -Verbose | |
| # Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination src/ -Verbose | |
| # Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\include\* -Destination src/ -Recurse -Verbose | |
| run: | | |
| qmake | |
| nmake | |
| cd src/debug | |
| mkdir output | |
| mkdir appx | |
| cp qdomyos-zwift.* output/ | |
| cd output | |
| windeployqt --qmldir ../../ qdomyos-zwift.exe | |
| cp "C:/mingw64/bin/libwinpthread-1.dll" . | |
| cp "C:/mingw64/bin/libgcc_s_seh-1.dll" . | |
| cp "C:/mingw64/bin/libstdc++-6.dll" . | |
| cp ../../../icons/iOS/iTunesArtwork@2x.png . | |
| cp ../../AppxManifest.xml . | |
| cp ../../../windows_openssl/*.* . | |
| Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\bin\*.* -Destination . -Verbose | |
| mkdir adb | |
| cp ../../adb/* adb/ | |
| cd .. | |
| cd appx | |
| #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz | |
| if: matrix.config.python == false | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/windows/5.15.2/binary/msvc2019/*.* ${{ github.workspace }}/src/debug/output/ | |
| - name: Zip artifact for deployment | |
| run: Compress-Archive src/debug/output windows-msvc2022-binary.zip | |
| if: matrix.config.python | |
| - name: Zip artifact for deployment | |
| run: Compress-Archive src/debug/output windows-msvc2022-binary-no-python.zip | |
| if: ${{ ! matrix.config.python }} | |
| - name: Archive windows binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-msvc2022-binary | |
| path: windows-msvc2022-binary.zip | |
| if: matrix.config.python | |
| - name: Archive windows binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-msvc2022-binary-no-python | |
| path: windows-msvc2022-binary-no-python.zip | |
| if: ${{ ! matrix.config.python }} | |
| nordictrack-build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-22.04 | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| strategy: | |
| matrix: | |
| variant: | |
| - name: treadmill | |
| setting_key: nordictrack_2950_ip | |
| setting_value: localhost | |
| - name: bike | |
| setting_key: tdf_10_ip | |
| setting_value: localhost | |
| - name: rower | |
| setting_key: proform_rower_ip | |
| setting_value: localhost | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - name: Xvfb install and run | |
| run: | | |
| sudo apt-get install -y xvfb | |
| Xvfb -ac ${{ env.DISPLAY }} -screen 0 1280x780x24 & | |
| - name: Checkout PR code | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: refs/pull/3478/head | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| submodules: 'false' # Prima disattiva il checkout automatico dei submodule | |
| - name: Checkout submodules with specific branches | |
| run: | | |
| git submodule init | |
| git submodule update --init --recursive | |
| - name: Install packages required to run QZ inside workflow | |
| run: sudo apt update -y && sudo apt-get install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtquickcontrols2-5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 libqt5networkauth5-dev libqt5websockets5* libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev | |
| - name: Install Qt Android | |
| uses: jdpurcell/install-qt-action@v5 | |
| with: | |
| version: '5.15.0' | |
| host: 'linux' | |
| target: 'android' | |
| arch: 'android' | |
| modules: 'qtcharts qtnetworkauth' | |
| dir: '${{ github.workspace }}/output/android/' | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-android' | |
| - name: Install Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' # See 'Supported distributions' for available options | |
| java-version: '11.0.23+9' | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/android/5.15.0/jar/*.* ${{ github.workspace }}/output/android/Qt/5.15.0/android/jar/ | |
| - name: download 3rd party files for qthttpserver | |
| run: cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| - name: Set Android NDK 21 && build | |
| run: | | |
| # Install NDK 21 after GitHub update | |
| # https://github.com/actions/virtual-environments/issues/5595 | |
| ANDROID_ROOT="/usr/local/lib/android" | |
| ANDROID_SDK_ROOT="${ANDROID_ROOT}/sdk" | |
| SDKMANAGER="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" | |
| echo "y" | $SDKMANAGER "ndk;21.4.7075529" | |
| export ANDROID_NDK="${ANDROID_SDK_ROOT}/ndk-bundle" | |
| export ANDROID_NDK_ROOT="${ANDROID_NDK}" | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| echo "#define LICENSE" >> secret.h | |
| # Set variant-specific IP setting | |
| sed -i 's/property string ${{ matrix.variant.setting_key }}: ""/property string ${{ matrix.variant.setting_key }}: "${{ matrix.variant.setting_value }}"/' settings.qml | |
| cd .. | |
| ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK | |
| rm -rf /usr/local/lib/android/sdk/ndk/25.1.8937393 | |
| # QTHTTPSERVER must use the same NDK | |
| cd src/qthttpserver | |
| qmake | |
| make -j8 | |
| make install | |
| cd ../.. | |
| qmake -spec android-clang 'ANDROID_ABIS=armeabi-v7a arm64-v8a x86 x86_64' 'ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/21.4.7075529' && make -j4 && make INSTALL_ROOT=${{ github.workspace }}/output/android/ install | |
| cp src/android-qdomyos-zwift-deployment-settings.json src/android-qdomyos-zwift-nordictrack-${{ matrix.variant.name }}-deployment-settings.json | |
| sed -i '1s|{|{\n "android-extra-libs": "${{ github.workspace }}/android_openssl/no-asm/latest/arm/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libssl_1_1.so",|' src/android-qdomyos-zwift-nordictrack-${{ matrix.variant.name }}-deployment-settings.json | |
| sed -i 's/"android-debug"/"android-nordictrack-${{ matrix.variant.name }}"/g' src/android-qdomyos-zwift-nordictrack-${{ matrix.variant.name }}-deployment-settings.json | |
| sed -i 's/android-debug\.apk/android-debug-nordictrack-${{ matrix.variant.name }}.apk/g' src/android-qdomyos-zwift-nordictrack-${{ matrix.variant.name }}-deployment-settings.json | |
| cat src/android-qdomyos-zwift-nordictrack-${{ matrix.variant.name }}-deployment-settings.json | |
| - name: Build APK (not usable for production due to unpatched QT library) | |
| run: cd src; androiddeployqt --input android-qdomyos-zwift-nordictrack-${{ matrix.variant.name }}-deployment-settings.json --output ${{ github.workspace }}/output/android/ --android-platform android-31 --gradle --aab; mv ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug.apk ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug-nordictrack-${{ matrix.variant.name }}.apk | |
| - name: Archive nordictrack binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nordictrack-${{ matrix.variant.name }}-android-trial | |
| path: ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug-nordictrack-${{ matrix.variant.name }}.apk | |
| peloton-bike-plus-build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-22.04 | |
| if: github.event_name == 'schedule' | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - name: Xvfb install and run | |
| run: | | |
| sudo apt-get install -y xvfb | |
| Xvfb -ac ${{ env.DISPLAY }} -screen 0 1280x780x24 & | |
| - name: Checkout PR code | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: refs/pull/3632/head | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| submodules: 'false' # Prima disattiva il checkout automatico dei submodule | |
| - name: Checkout submodules with specific branches | |
| run: | | |
| git submodule init | |
| git submodule update --init --recursive | |
| - name: Install packages required to run QZ inside workflow | |
| run: sudo apt update -y && sudo apt-get install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtquickcontrols2-5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 libqt5networkauth5-dev libqt5websockets5* libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev | |
| - name: Install Qt Android | |
| uses: jdpurcell/install-qt-action@v5 | |
| with: | |
| version: '5.15.0' | |
| host: 'linux' | |
| target: 'android' | |
| arch: 'android' | |
| modules: 'qtcharts qtnetworkauth' | |
| dir: '${{ github.workspace }}/output/android/' | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-android' | |
| - name: Install Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' # See 'Supported distributions' for available options | |
| java-version: '11.0.23+9' | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/android/5.15.0/jar/*.* ${{ github.workspace }}/output/android/Qt/5.15.0/android/jar/ | |
| - name: download 3rd party files for qthttpserver | |
| run: cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| - name: Set Android NDK 21 && build | |
| run: | | |
| # Install NDK 21 after GitHub update | |
| # https://github.com/actions/virtual-environments/issues/5595 | |
| ANDROID_ROOT="/usr/local/lib/android" | |
| ANDROID_SDK_ROOT="${ANDROID_ROOT}/sdk" | |
| SDKMANAGER="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" | |
| echo "y" | $SDKMANAGER "ndk;21.4.7075529" | |
| export ANDROID_NDK="${ANDROID_SDK_ROOT}/ndk-bundle" | |
| export ANDROID_NDK_ROOT="${ANDROID_NDK}" | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| echo "#define LICENSE" >> secret.h | |
| cd .. | |
| ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK | |
| rm -rf /usr/local/lib/android/sdk/ndk/25.1.8937393 | |
| # QTHTTPSERVER must use the same NDK | |
| cd src/qthttpserver | |
| qmake | |
| make -j8 | |
| make install | |
| cd ../.. | |
| qmake -spec android-clang 'ANDROID_ABIS=armeabi-v7a arm64-v8a x86 x86_64' 'ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/21.4.7075529' && make -j4 && make INSTALL_ROOT=${{ github.workspace }}/output/android/ install | |
| cp src/android-qdomyos-zwift-deployment-settings.json src/android-qdomyos-zwift-peloton-bike-plus-deployment-settings.json | |
| sed -i '1s|{|{\n "android-extra-libs": "${{ github.workspace }}/android_openssl/no-asm/latest/arm/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libssl_1_1.so",|' src/android-qdomyos-zwift-peloton-bike-plus-deployment-settings.json | |
| sed -i 's/"android-debug"/"android-peloton-bike-plus"/g' src/android-qdomyos-zwift-peloton-bike-plus-deployment-settings.json | |
| sed -i 's/android-debug\.apk/android-debug-peloton-bike-plus.apk/g' src/android-qdomyos-zwift-peloton-bike-plus-deployment-settings.json | |
| cat src/android-qdomyos-zwift-peloton-bike-plus-deployment-settings.json | |
| - name: Build APK (not usable for production due to unpatched QT library) | |
| run: cd src; androiddeployqt --input android-qdomyos-zwift-peloton-bike-plus-deployment-settings.json --output ${{ github.workspace }}/output/android/ --android-platform android-31 --gradle --aab; mv ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug.apk ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug-peloton-bike-plus.apk | |
| - name: Archive peloton-bike-plus binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: peloton-bike-plus-android-trial | |
| path: ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug-peloton-bike-plus.apk | |
| peloton-bike-build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-22.04 | |
| if: github.event_name == 'schedule' | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| - name: Xvfb install and run | |
| run: | | |
| sudo apt-get install -y xvfb | |
| Xvfb -ac ${{ env.DISPLAY }} -screen 0 1280x780x24 & | |
| - name: Checkout PR code | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: refs/pull/3639/head | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| submodules: 'false' # Prima disattiva il checkout automatico dei submodule | |
| - name: Checkout submodules with specific branches | |
| run: | | |
| git submodule init | |
| git submodule update --init --recursive | |
| - name: Install packages required to run QZ inside workflow | |
| run: sudo apt update -y && sudo apt-get install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtquickcontrols2-5-dev libqt5bluetooth5 libqt5widgets5 libqt5positioning5 libqt5xml5 qtconnectivity5-dev qtpositioning5-dev libqt5charts5-dev libqt5charts5 libqt5networkauth5-dev libqt5websockets5* libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev | |
| - name: Install Qt Android | |
| uses: jdpurcell/install-qt-action@v5 | |
| with: | |
| version: '5.15.0' | |
| host: 'linux' | |
| target: 'android' | |
| arch: 'android' | |
| modules: 'qtcharts qtnetworkauth' | |
| dir: '${{ github.workspace }}/output/android/' | |
| cache: 'true' | |
| cache-key-prefix: 'install-qt-action-android' | |
| - name: Install Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' # See 'Supported distributions' for available options | |
| java-version: '11.0.23+9' | |
| - name: patching qt for bluetooth | |
| run: cp qt-patches/android/5.15.0/jar/*.* ${{ github.workspace }}/output/android/Qt/5.15.0/android/jar/ | |
| - name: download 3rd party files for qthttpserver | |
| run: cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/ | |
| - name: Set Android NDK 21 && build | |
| run: | | |
| # Install NDK 21 after GitHub update | |
| # https://github.com/actions/virtual-environments/issues/5595 | |
| ANDROID_ROOT="/usr/local/lib/android" | |
| ANDROID_SDK_ROOT="${ANDROID_ROOT}/sdk" | |
| SDKMANAGER="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" | |
| echo "y" | $SDKMANAGER "ndk;21.4.7075529" | |
| export ANDROID_NDK="${ANDROID_SDK_ROOT}/ndk-bundle" | |
| export ANDROID_NDK_ROOT="${ANDROID_NDK}" | |
| cd src | |
| echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h | |
| echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h | |
| echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h | |
| echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h | |
| echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h | |
| echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h | |
| echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js | |
| echo "#define LICENSE" >> secret.h | |
| cd .. | |
| ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK | |
| rm -rf /usr/local/lib/android/sdk/ndk/25.1.8937393 | |
| # QTHTTPSERVER must use the same NDK | |
| cd src/qthttpserver | |
| qmake | |
| make -j8 | |
| make install | |
| cd ../.. | |
| qmake -spec android-clang 'ANDROID_ABIS=armeabi-v7a arm64-v8a x86 x86_64' 'ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/21.4.7075529' && make -j4 && make INSTALL_ROOT=${{ github.workspace }}/output/android/ install | |
| cp src/android-qdomyos-zwift-deployment-settings.json src/android-qdomyos-zwift-peloton-bike-deployment-settings.json | |
| sed -i '1s|{|{\n "android-extra-libs": "${{ github.workspace }}/android_openssl/no-asm/latest/arm/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/arm64/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86/libssl_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libcrypto_1_1.so,${{ github.workspace }}/android_openssl/no-asm/latest/x86_64/libssl_1_1.so",|' src/android-qdomyos-zwift-peloton-bike-deployment-settings.json | |
| sed -i 's/"android-debug"/"android-peloton-bike"/g' src/android-qdomyos-zwift-peloton-bike-deployment-settings.json | |
| sed -i 's/android-debug\.apk/android-debug-peloton-bike.apk/g' src/android-qdomyos-zwift-peloton-bike-deployment-settings.json | |
| cat src/android-qdomyos-zwift-peloton-bike-deployment-settings.json | |
| - name: Build APK (not usable for production due to unpatched QT library) | |
| run: cd src; androiddeployqt --input android-qdomyos-zwift-peloton-bike-deployment-settings.json --output ${{ github.workspace }}/output/android/ --android-platform android-31 --gradle --aab; mv ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug.apk ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug-peloton-bike.apk | |
| - name: Archive peloton-bike binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: peloton-bike-android-trial | |
| path: ${{ github.workspace }}/output/android/build/outputs/apk/debug/android-debug-peloton-bike.apk | |
| upload_to_release: | |
| permissions: write-all | |
| runs-on: ubuntu-22.04 | |
| if: github.event_name == 'schedule' | |
| needs: [window-msvc2019-build, window-msvc2022-build, window-build, android-build, raspberry-pi-build, nordictrack-build, peloton-bike-plus-build, peloton-bike-build, raspberry-pi-build-and-image-64bit] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: Update nightly release | |
| uses: andelf/nightly-release@main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: nightly-${{ steps.date.outputs.date }} | |
| prerelease: false | |
| name: 'QZ nightly build - ${{ steps.date.outputs.date }}' | |
| body: | | |
| This is a nightly build of QZ. | |
| You can use this if you want to try new features without waiting for releases. | |
| From time to time, in development builds, old difficult-to-reproduce bugs are | |
| fixed, but it is also true that in the development process with the introduction | |
| of new complex code, the stability of the program may suffer compared to | |
| official releases, so **use it with caution**! | |
| ## Windows Builds: | |
| - **windows-msvc2019**: Recommended for Windows 10 | |
| - **windows-msvc2022**: Recommended for Windows 11 (experimental, QT6) | |
| - **windows**: MinGW build (alternative version) | |
| ## Other Platforms: | |
| - **fdroid-android-trial**: Android build | |
| - **nordictrack-treadmill-android-trial**: Nordictrack Treadmill build for iFIT2 Tablets | |
| - **nordictrack-bike-android-trial**: Nordictrack Bike build for iFIT2 Tablets | |
| - **nordictrack-rower-android-trial**: Nordictrack Rower build for iFIT2 Tablets | |
| - **peloton-bike-plus-android-trial**: Peloton Bike Plus build with Grupetto backend | |
| - **peloton-bike-android-trial**: Peloton Bike build with Grupetto backend | |
| - **raspberry-pi-binary**: Raspberry Pi build | |
| __Please help us improve QZ by reporting any issues you encounter!__ :wink: | |
| files: | | |
| windows-msvc2019-binary-no-python/* | |
| windows-msvc2019-binary/* | |
| windows-msvc2022-binary-no-python/* | |
| windows-msvc2022-binary/* | |
| windows-msvc2019-ai-server-binary/* | |
| windows-binary-no-python/* | |
| windows-binary/* | |
| fdroid-android-trial/android-debug.apk | |
| nordictrack-treadmill-android-trial/android-debug-nordictrack-treadmill.apk | |
| nordictrack-bike-android-trial/android-debug-nordictrack-bike.apk | |
| nordictrack-rower-android-trial/android-debug-nordictrack-rower.apk | |
| peloton-bike-plus-android-trial/android-debug-peloton-bike-plus.apk | |
| peloton-bike-android-trial/android-debug-peloton-bike.apk | |
| raspberry-pi-binary/qdomyos-zwift-32bit | |
| raspberry-pi-binary/qdomyos-zwift-64bit |