@@ -1641,26 +1641,39 @@ jobs:
16411641 "
16421642
16431643 window-msvc2022-build :
1644- runs-on : windows-2022
1645- if : github.event_name == 'schedule'
1644+ runs-on : windows-latest
16461645 strategy :
16471646 matrix :
16481647 config :
16491648 - {python: true}
1650- - {python: false}
1649+ - {python: false}
16511650
16521651 steps :
1653- - name : Checkout PR code
1652+ - uses : actions/checkout@v2
1653+ - name : Checkout submodule repo
16541654 uses : actions/checkout@v2
16551655 with :
1656- ref : refs/pull/1508/head
1657- submodules : recursive
1658-
1659- - uses : actions/setup-python@v5
1656+ repository : bluetiger9/SmtpClient-for-Qt
1657+ path : " src/smtpclient/"
1658+
1659+ - uses : actions/checkout@v2
1660+ - name : Checkout submodule repo
1661+ uses : actions/checkout@v2
16601662 with :
1661- python-version : ' 3.7'
1662- cache : ' pip'
1663- cache-dependency-path : .github/workflows/main.yml
1663+ repository : google/googletest
1664+ path : " tst/googletest/"
1665+ ref : " release-1.12.1"
1666+
1667+ - uses : actions/checkout@v2
1668+ - name : Checkout qHttpServer
1669+ uses : actions/checkout@v2
1670+ with :
1671+ repository : qt-labs/qthttpserver
1672+ path : " src/qthttpserver"
1673+
1674+ - uses : actions/setup-python@v4
1675+ with :
1676+ python-version : 3.7
16641677 - name : download python and paddleocr
16651678 run : |
16661679 python -VV
@@ -1681,17 +1694,17 @@ jobs:
16811694 with :
16821695 version : ' 6.8.2'
16831696 host : ' windows'
1684- modules : ' qtnetworkauth qtcharts qtconnectivity qtspeech qtpositioning qtwebsockets qtlocation qtmultimedia qtwebengine qtwebview qthttpserver qtwebchannel'
1697+ modules : ' qtnetworkauth qtcharts qtconnectivity qtspeech qtpositioning qtwebsockets qtlocation qtmultimedia qtwebengine qtwebview qtwebchannel qthttpserver '
16851698 target : " desktop"
16861699 arch : win64_msvc2022_64
16871700 dir : " ${{github.workspace}}/qt/"
16881701 install-deps : " true"
16891702 cache : ' true'
1690- cache-key-prefix : ' install-qt-action-windows'
1703+ cache-key-prefix : ' install-qt-action-windows'
16911704
16921705 - name : Install MSVC compiler
16931706 uses : ilammy/msvc-dev-cmd@v1
1694- with :
1707+ with :
16951708 # 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo
16961709 # toolset: 14.2
16971710 arch : x64
@@ -1702,45 +1715,32 @@ jobs:
17021715
17031716 # - name: Build qthttpserver
17041717 # run: |
1705- # cd src\qthttpserver
1718+ # cd src\qthttpserver
17061719 # qmake
17071720 # nmake
17081721 # nmake install
1709- # cd ../..
1722+ # cd ../..
17101723
17111724 - name : Secrets
1712- if : github.ref == 'refs/heads/master'
1725+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/qt6'
17131726 run : |
17141727 cd src
17151728 echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h
17161729 echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h
17171730 echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h
17181731 echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h
17191732 echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h
1720- echo "#define INTERVALSICU_CLIENT_ID ${{ secrets.intervalsicu_client_id }}" >> secret.h
1721- echo "#define INTERVALSICU_CLIENT_SECRET ${{ secrets.intervalsicu_client_secret }}" >> secret.h
17221733 echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js
17231734 cd ..
1724-
1725- - name : Cache vcpkg
1726- id : cache-vcpkg-msvc2022
1727- uses : actions/cache@v4
1728- with :
1729- path : ${{ runner.workspace }}\vcpkg\installed
1730- key : vcpkg-msvc2022-x64-windows-protobuf-abseil-v1
1731-
17321735 - name : Clone vcpkg
1733- if : steps.cache-vcpkg-msvc2022.outputs.cache-hit != 'true'
17341736 run : git clone https://github.com/microsoft/vcpkg.git
17351737 working-directory : ${{ runner.workspace }}
17361738
17371739 - name : Bootstrap vcpkg
1738- if : steps.cache-vcpkg-msvc2022.outputs.cache-hit != 'true'
17391740 run : .\vcpkg\bootstrap-vcpkg.bat
17401741 working-directory : ${{ runner.workspace }}
17411742
17421743 - name : Create vcpkg.json
1743- if : steps.cache-vcpkg-msvc2022.outputs.cache-hit != 'true'
17441744 working-directory : ${{ runner.workspace }}
17451745 run : |
17461746 echo '{
@@ -1755,17 +1755,15 @@ jobs:
17551755 }' > vcpkg.json
17561756
17571757 - name : Install dependencies
1758- if : steps.cache-vcpkg-msvc2022.outputs.cache-hit != 'true'
17591758 run : |
1760- .\vcpkg\vcpkg install --triplet x64-windows --x-install-root=${{ runner.workspace }}\vcpkg\installed
1759+ .\vcpkg\vcpkg install --triplet x64-windows --x-install-root=${{ runner.workspace }}\vcpkg\installed
17611760 working-directory : ${{ runner.workspace }}
17621761
17631762 - name : Build
17641763 Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination . -Verbose
17651764 Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination src/ -Verbose
17661765 Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\include\* -Destination src/ -Recurse -Verbose
17671766 run : |
1768- lrelease src/qdomyos-zwift.pri
17691767 qmake
17701768 nmake
17711769 cd src/debug
@@ -1786,16 +1784,15 @@ jobs:
17861784 cp ../../adb/* adb/
17871785 cd ..
17881786 cd appx
1789- #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz
1787+ #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz
17901788 if : matrix.config.python
17911789
1792-
1790+
17931791 - name : Build without python
17941792# Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination . -Verbose
17951793# Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination src/ -Verbose
17961794# Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\include\* -Destination src/ -Recurse -Verbose
17971795 run : |
1798- lrelease src/qdomyos-zwift.pri
17991796 qmake
18001797 nmake
18011798 cd src/debug
@@ -1806,7 +1803,7 @@ jobs:
18061803 windeployqt --qmldir ../../ qdomyos-zwift.exe
18071804 cp "C:/mingw64/bin/libwinpthread-1.dll" .
18081805 cp "C:/mingw64/bin/libgcc_s_seh-1.dll" .
1809- cp "C:/mingw64/bin/libstdc++-6.dll" .
1806+ cp "C:/mingw64/bin/libstdc++-6.dll" .
18101807 cp ../../../icons/iOS/iTunesArtwork@2x.png .
18111808 cp ../../AppxManifest.xml .
18121809 cp ../../../windows_openssl/*.* .
@@ -1815,8 +1812,8 @@ jobs:
18151812 cp ../../adb/* adb/
18161813 cd ..
18171814 cd appx
1818- #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz
1819- if : matrix.config.python == false
1815+ #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz
1816+ if : matrix.config.python == false
18201817
18211818 - name : patching qt for bluetooth
18221819 run : cp qt-patches/windows/5.15.2/binary/msvc2019/*.* ${{ github.workspace }}/src/debug/output/
@@ -1843,6 +1840,143 @@ jobs:
18431840 path : windows-msvc2022-binary-no-python.zip
18441841 if : ${{ ! matrix.config.python }}
18451842
1843+ window-msvc2022-aiserver-build :
1844+ runs-on : windows-latest
1845+ steps :
1846+ - uses : actions/checkout@v2
1847+ - name : Checkout submodule repo
1848+ uses : actions/checkout@v2
1849+ with :
1850+ repository : bluetiger9/SmtpClient-for-Qt
1851+ path : " src/smtpclient/"
1852+ ref : 3fa4a0fe5797070339422cf18b5e9ed8dcb91f9c
1853+
1854+ - uses : actions/checkout@v2
1855+ - name : Checkout submodule repo
1856+ uses : actions/checkout@v2
1857+ with :
1858+ repository : google/googletest
1859+ path : " tst/googletest/"
1860+ ref : " release-1.12.1"
1861+
1862+ - uses : actions/checkout@v2
1863+ - name : Checkout qHttpServer
1864+ uses : actions/checkout@v2
1865+ with :
1866+ repository : qt-labs/qthttpserver
1867+ path : " src/qthttpserver"
1868+
1869+ - name : Install CMake
1870+ uses : lukka/get-cmake@latest
1871+
1872+ - name : Install Qt
1873+ uses : jurplel/install-qt-action@v3
1874+ with :
1875+ version : ' 5.15.2'
1876+ host : ' windows'
1877+ modules : ' qtnetworkauth qtcharts'
1878+ target : " desktop"
1879+ arch : win64_msvc2019_64
1880+ dir : " ${{github.workspace}}/qt/"
1881+ install-deps : " true"
1882+ cache : ' true'
1883+ cache-key-prefix : ' install-qt-action-windows'
1884+
1885+ - name : Install MSVC compiler
1886+ uses : ilammy/msvc-dev-cmd@v1
1887+ with :
1888+ # 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo
1889+ toolset : 14.2
1890+ arch : x64
1891+
1892+ - name : download 3rd party files for qthttpserver
1893+ run : |
1894+ cp qHttpServerBin/5.15.2/headers/* src/qthttpserver/src/3rdparty/http-parser/
1895+ - name : Build qthttpserver
1896+ run : |
1897+ cd src\qthttpserver
1898+ qmake
1899+ nmake
1900+ nmake install
1901+ cd ../..
1902+ - name : Secrets
1903+ if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/qt6'
1904+ run : |
1905+ cd src
1906+ echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h
1907+ echo "#define PELOTON_SECRET_KEY ${{ secrets.peloton_secret_key }}" >> secret.h
1908+ echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h
1909+ echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h
1910+ echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h
1911+ echo "${{ secrets.cesiumkey }}" >> inner_templates/googlemaps/cesium-key.js
1912+ cd ..
1913+ - name : Clone vcpkg
1914+ run : git clone https://github.com/microsoft/vcpkg.git
1915+ working-directory : ${{ runner.workspace }}
1916+
1917+ - name : Bootstrap vcpkg
1918+ run : .\vcpkg\bootstrap-vcpkg.bat
1919+ working-directory : ${{ runner.workspace }}
1920+
1921+ - name : Create vcpkg.json
1922+ working-directory : ${{ runner.workspace }}
1923+ run : |
1924+ echo '{
1925+ "name": "qdomyos-zwift",
1926+ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
1927+ "dependencies": [
1928+ "protobuf",
1929+ "protobuf-c",
1930+ "abseil"
1931+ ],
1932+ "builtin-baseline": "8c2fcacefba009d63672f9d137f192765e632c9f"
1933+ }' > vcpkg.json
1934+
1935+ - name : Install dependencies
1936+ run : |
1937+ .\vcpkg\vcpkg install --triplet x64-windows --x-install-root=${{ runner.workspace }}\vcpkg\installed
1938+ working-directory : ${{ runner.workspace }}
1939+
1940+ - name : Build
1941+ run : |
1942+ Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination . -Verbose
1943+ Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\lib\*.* -Destination src/ -Verbose
1944+ Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\include\* -Destination src/ -Recurse -Verbose
1945+ cd src
1946+ echo "#define AISERVER" >> aiserver.h
1947+ cd ..
1948+ qmake
1949+ nmake
1950+ cd src/debug
1951+ mkdir output
1952+ mkdir appx
1953+ cp qdomyos-zwift.* output/
1954+ cd output
1955+ windeployqt --qmldir ../../ qdomyos-zwift.exe
1956+ cp ../../../icons/iOS/iTunesArtwork@2x.png .
1957+ cp ../../AppxManifest.xml .
1958+ cp ../../windows/zwift-incline-ai-server.py zwift-incline.py
1959+ cp ../../windows/zwift-incline-climb-portal-ai-server.py zwift-incline-climb-portal.py
1960+ cp ../../windows/zwift-workout-ai-server.py zwift-workout.py
1961+ cp ../../windows/*.bat .
1962+ cp ../../../windows_openssl/*.* .
1963+ Copy-Item -Path ${{ runner.workspace }}\vcpkg\installed\x64-windows\bin\*.* -Destination . -Verbose
1964+ mkdir adb
1965+ cp ../../adb/* adb/
1966+ cd ..
1967+ cd appx
1968+ #../../MSIX-Toolkit/WindowsSDK/10/10.0.20348.0/x64/makeappx.exe pack /d ../output/ /p qz
1969+ - name : patching qt for bluetooth
1970+ run : cp qt-patches/windows/5.15.2/binary/msvc2019/*.* ${{ github.workspace }}/src/debug/output/
1971+
1972+ - name : Zip artifact for deployment
1973+ run : Compress-Archive src/debug/output windows-msvc2022-ai-server-binary.zip
1974+
1975+ - name : Archive windows binary
1976+ uses : actions/upload-artifact@v4
1977+ with :
1978+ name : windows-msvc2022-ai-server-binary
1979+ path : windows-msvc2022-ai-server-binary.zip
18461980
18471981 window-msvc2022-pr-build :
18481982 runs-on : windows-2022
0 commit comments