|
| 1 | +name: clang-cl VS native, ARM64 |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + concurrency: |
| 10 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | + runs-on: windows-11-arm |
| 14 | + |
| 15 | + steps: |
| 16 | + - name: Configure git |
| 17 | + # mtr will spit random errors, if we don't do that |
| 18 | + run: | |
| 19 | + git config --global core.autocrlf input |
| 20 | +
|
| 21 | + - uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - name: Show environment |
| 24 | + run: | |
| 25 | + echo Processor Architecture: $Env:PROCESSOR_ARCHITECTURE |
| 26 | + systeminfo |
| 27 | + where.exe perl.exe |
| 28 | + - name: Install bison |
| 29 | + run: | |
| 30 | + choco install winflexbison3 ninja |
| 31 | +
|
| 32 | + - name: Install ARM64 clang-cl via Visual Studio Installer |
| 33 | + run: | |
| 34 | + $vsInstaller = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" |
| 35 | + $vsPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" |
| 36 | +
|
| 37 | + if (!(Test-Path $vsInstaller)) { |
| 38 | + Write-Error "vs_installer.exe not found at expected location: $vsInstaller" |
| 39 | + exit 1 |
| 40 | + } |
| 41 | +
|
| 42 | + & "$vsInstaller" modify ` |
| 43 | + --installPath "$vsPath" ` |
| 44 | + --add Microsoft.VisualStudio.Component.VC.Llvm.Clang ` |
| 45 | + --quiet --wait |
| 46 | +
|
| 47 | + - name: Build project |
| 48 | + run: | |
| 49 | + git config submodule.storage/columnstore/columnstore.update none |
| 50 | + git config submodule.storage/maria/libmarias3.update none |
| 51 | + git config submodule.storage/rocksdb/rocksdb.update none |
| 52 | + git config submodule.wsrep-lib.update none |
| 53 | + mkdir bld |
| 54 | + cd bld |
| 55 | + rem set PATH=C:\LLVM\bin;%PATH% |
| 56 | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" arm64 |
| 57 | + dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\ARM64\bin\clang-cl.exe" |
| 58 | + set CLANG_CL=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\ARM64\bin\clang-cl.exe |
| 59 | + cmake .. -GNinja -DWITH_SSL=bundled "-DCMAKE_C_COMPILER=%CLANG_CL%" "-DCMAKE_CXX_COMPILER=%CLANG_CL%" -DCMAKE_C_COMPILER_TARGET=arm64-windows-msvc -DCMAKE_CXX_COMPILER_TARGET=arm64-windows-msvc -DCMAKE_LINKER=lld-link -DCMAKE_SYSTEM_PROCESSOR=ARM64 |
| 60 | + cmake --build . --parallel --verbose |
| 61 | + cmake --build . --target win_package_zip |
| 62 | + shell: cmd |
| 63 | + |
| 64 | + |
| 65 | + - name: Test |
| 66 | + run: | |
| 67 | + $env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64" |
| 68 | + #Calculate parallel as 4 * number of processors |
| 69 | + $parallel = 4 * [int]$env:NUMBER_OF_PROCESSORS |
| 70 | + # Run mtr, skip main.mariadb-upgrade-service (currently crashes) |
| 71 | + perl bld\mysql-test\mysql-test-run.pl --force --max-test-fail=10 --retry=2 --parallel=$parallel ` |
| 72 | + --testcase-timeout=6 --suite=main --skip-test=main.mariadb-upgrade-service ` |
| 73 | + --mysqld=--loose-innodb-flush-log-at-trx-commit=2 |
| 74 | +
|
| 75 | + - name: Test 2 |
| 76 | + run: | |
| 77 | + perl bld\mysql-test\mysql-test-run.pl --suite=main main.charset_client_win_utf8mb4 |
0 commit comments