1+ # Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+ # SPDX-License-Identifier: BSD-3-Clause
3+
14name : CMake Build
25
36on : [push, pull_request]
3740 shell : pwsh
3841 run : curl --ssl-no-revoke "https://web.archive.org/web/20250820134143/https://ftdichip.com/wp-content/uploads/2023/09/CDM-v2.12.36.4-WHQL-Certified.zip" -o "third-party\CDM-v2.12.36.4-WHQL-Certified.zip"
3942
43+ fetch-ftdi-windows-arm64 :
44+ runs-on : windows-11-arm
45+ steps :
46+ - uses : actions/checkout@v6
47+
48+ - name : Cache FTDI archive for ARM64
49+ id : cache-ftdi-windows-arm64
50+ uses : actions/cache@v5
51+ with :
52+ path : third-party\CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip
53+ key : ftdi-windows-arm64-2.12.36.20
54+
55+ - name : Download FTDI archive for ARM64
56+ if : steps.cache-ftdi-windows-arm64.outputs.cache-hit != 'true'
57+ shell : pwsh
58+ run : curl --ssl-no-revoke "https://web.archive.org/web/20250821211500/https://ftdichip.com/wp-content/uploads/2025/03/CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip" -o "third-party\CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip"
59+
4060 build-linux :
4161 needs : fetch-ftdi-linux
4262 runs-on : ${{ matrix.os }}
@@ -45,15 +65,14 @@ jobs:
4565 matrix :
4666 os : [ubuntu-22.04, ubuntu-latest]
4767 qt_version : ['6.9.2', '6.10.0']
48- build_type : [Debug, Release]
4968
5069 steps :
5170 - uses : actions/checkout@v6
5271
5372 - name : Install dependencies
5473 run : |
5574 sudo apt-get update
56- sudo apt-get install -y python3-pip wget libxkbcommon-x11-0 x11-common libxcb-xinerama0-dev build-essential libgl1-mesa-dev mesa-common-dev uuid-dev libpulse-dev
75+ sudo apt-get install -y python3-pip wget libxkbcommon-x11-0 x11-common libxcb-xinerama0-dev build-essential libgl1-mesa-dev mesa-common-dev uuid-dev libpulse-dev ninja-build
5776
5877 - name : Cache Qt installation on Linux
5978 uses : actions/cache@v5
@@ -66,29 +85,17 @@ jobs:
6685
6786 - name : Install Qt ${{ matrix.qt_version }} on ${{ matrix.os }}
6887 run : |
69- aqt install-qt linux desktop ${{ matrix.qt_version }} linux_gcc_64
7088 aqt install-qt linux desktop ${{ matrix.qt_version }} linux_gcc_64 -m qtmultimedia qtserialport
71- echo "QT_ROOT_DIR=$HOME/work/qcom-test-automation-controller/qcom-test-automation-controller/${{ matrix.qt_version }}/gcc_64" >> $GITHUB_ENV
72- echo "$HOME/work/qcom-test-automation-controller/qcom-test-automation-controller/${{ matrix.qt_version }}/gcc_64/bin" >> $GITHUB_PATH
89+ echo "QTBIN=$HOME/work/qcom-test-automation-controller/qcom-test-automation-controller/${{ matrix.qt_version }}/gcc_64/bin" >> $GITHUB_ENV
7390
7491 - name : Restore FTDI archive on Linux
7592 uses : actions/cache/restore@v5
7693 with :
7794 path : third-party/libftd2xx-linux-x86_64-1.4.33.tgz
7895 key : ftdi-linux-1.4.33
7996
80- - name : Extract FTDI library on Linux
81- run : |
82- mkdir -p __Builds/Linux/Debug/lib __Builds/Linux/Release/lib
83- tar -xvf third-party/libftd2xx-linux-x86_64-1.4.33.tgz -C third-party/
84- find third-party/ -name "libftd2xx-static.a" -exec cp {} __Builds/Linux/Debug/lib/libftd2xx.a \;
85- cp __Builds/Linux/Debug/lib/libftd2xx.a __Builds/Linux/Release/lib/libftd2xx.a
86-
87- - name : Configure CMake for ${{ matrix.build_type }}
88- run : cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_PREFIX_PATH="$QT_ROOT_DIR/lib/cmake"
89-
90- - name : Build with ${{ matrix.build_type }}
91- run : cmake --build build --config ${{ matrix.build_type }}
97+ - name : Build
98+ run : ./build.sh
9299
93100 build-windows :
94101 needs : fetch-ftdi-windows
97104 fail-fast : false
98105 matrix :
99106 qt_version : ['6.9.2', '6.10.0']
100- build_type : [Debug, Release]
101107
102108 steps :
103109 - uses : actions/checkout@v6
@@ -116,45 +122,51 @@ jobs:
116122 shell : pwsh
117123 run : |
118124 aqt install-qt windows desktop ${{ matrix.qt_version }} win64_msvc2022_64 --outputdir "C:\Qt" -m qtserialport qtmultimedia
119-
120- $qtRoot = "C:\Qt\${{ matrix.qt_version }}\msvc2022_64"
121- echo "QT_ROOT_DIR=$qtRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
122- echo "$qtRoot\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
125+ echo "QTBIN=C:\Qt\${{ matrix.qt_version }}\msvc2022_64\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
123126
124127 - name : Restore FTDI archive on Windows
125128 uses : actions/cache/restore@v5
126129 with :
127130 path : third-party\CDM-v2.12.36.4-WHQL-Certified.zip
128131 key : ftdi-windows-2.12.36.4
129132
130- - name : Extract FTDI library on Windows
131- shell : pwsh
132- run : |
133- $debugLib = "__Builds\x64\Debug\lib"
134- $releaseLib = "__Builds\x64\Release\lib"
135- $debugBin = "__Builds\x64\Debug\bin"
136- $releaseBin = "__Builds\x64\Release\bin"
137- New-Item -ItemType Directory -Force -Path $debugLib, $releaseLib, $debugBin, $releaseBin | Out-Null
138-
139- $tmp = "third-party\ftdi_extract"
140- Expand-Archive -Path "third-party\CDM-v2.12.36.4-WHQL-Certified.zip" -DestinationPath $tmp -Force
141-
142- $lib = Get-ChildItem -Path $tmp -Filter "ftd2xx.lib" -Recurse | Where-Object { $_.FullName -match "amd64" } | Select-Object -First 1
143- if (-not $lib) { $lib = Get-ChildItem -Path $tmp -Filter "ftd2xx.lib" -Recurse | Select-Object -First 1 }
144- Copy-Item $lib.FullName -Destination $debugLib
145- Copy-Item $lib.FullName -Destination $releaseLib
146-
147- $dll = Get-ChildItem -Path $tmp -Filter "FTD2XX64.dll" -Recurse | Select-Object -First 1
148- if ($dll) {
149- Copy-Item $dll.FullName -Destination "$debugBin\ftd2xx.dll"
150- Copy-Item $dll.FullName -Destination "$releaseBin\ftd2xx.dll"
151- }
152- Remove-Item -Recurse -Force $tmp
153-
154- - name : Configure CMake for ${{ matrix.build_type }}
133+ - name : Build
134+ shell : cmd
135+ run : build.bat
136+
137+ build-windows-arm64 :
138+ needs : fetch-ftdi-windows-arm64
139+ runs-on : windows-11-arm
140+ strategy :
141+ fail-fast : false
142+ matrix :
143+ qt_version : ['6.9.2', '6.10.0']
144+
145+ steps :
146+ - uses : actions/checkout@v6
147+
148+ - name : Install Python dependencies
155149 shell : pwsh
156- run : cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_PREFIX_PATH="$env:QT_ROOT_DIR\lib\cmake"
150+ run : pip install aqtinstall
157151
158- - name : Build with ${{ matrix.build_type }}
152+ - name : Cache Qt installation for ARM64
153+ uses : actions/cache@v5
154+ with :
155+ path : C:\Qt\${{ matrix.qt_version }}\msvc2022_arm64
156+ key : windows-arm64-qt-${{ matrix.qt_version }}
157+
158+ - name : Install Qt ${{ matrix.qt_version }} for MSVC ARM64
159159 shell : pwsh
160- run : cmake --build build --config ${{ matrix.build_type }}
160+ run : |
161+ aqt install-qt windows_arm64 desktop ${{ matrix.qt_version }} win64_msvc2022_arm64 --outputdir "C:\Qt" --autodesktop -m qtserialport qtmultimedia
162+ echo "QTBIN=C:\Qt\${{ matrix.qt_version }}\msvc2022_arm64\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
163+
164+ - name : Restore FTDI archive for ARM64
165+ uses : actions/cache/restore@v5
166+ with :
167+ path : third-party\CDM-v2.12.36.20-for-ARM64-WHQL-Certified.zip
168+ key : ftdi-windows-arm64-2.12.36.20
169+
170+ - name : Build
171+ shell : cmd
172+ run : build.bat
0 commit comments