build and test MSI #10
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
| name: clang-cl VS native, ARM64 | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| runs-on: windows-11-arm | |
| steps: | |
| - name: Configure git | |
| # mtr will spit random errors, if we don't do that | |
| run: | | |
| git config --global core.autocrlf input | |
| - uses: actions/checkout@v4 | |
| - name: Show environment | |
| run: | | |
| echo Processor Architecture: $Env:PROCESSOR_ARCHITECTURE | |
| systeminfo | |
| where.exe perl.exe | |
| - name: Install bison | |
| run: | | |
| choco install winflexbison3 ninja | |
| - name: Install ARM64 clang-cl via Visual Studio Installer | |
| run: | | |
| $vsInstaller = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" | |
| $vsPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" | |
| if (!(Test-Path $vsInstaller)) { | |
| Write-Error "vs_installer.exe not found at expected location: $vsInstaller" | |
| exit 1 | |
| } | |
| & "$vsInstaller" modify ` | |
| --installPath "$vsPath" ` | |
| --add Microsoft.VisualStudio.Component.VC.Llvm.Clang ` | |
| --quiet --wait | |
| - name: Build project | |
| run: | | |
| git config submodule.storage/columnstore/columnstore.update none | |
| git config submodule.storage/maria/libmarias3.update none | |
| git config submodule.storage/rocksdb/rocksdb.update none | |
| git config submodule.wsrep-lib.update none | |
| mkdir bld | |
| cd bld | |
| rem set PATH=C:\LLVM\bin;%PATH% | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" arm64 | |
| dir "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\ARM64\bin\clang-cl.exe" | |
| set CLANG_CL=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\ARM64\bin\clang-cl.exe | |
| 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 | |
| cmake --build . --parallel --verbose | |
| cmake --build . --target win_package_zip | |
| shell: cmd | |
| - name: Test | |
| run: | | |
| $env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64" | |
| #Calculate parallel as 4 * number of processors | |
| $parallel = 4 * [int]$env:NUMBER_OF_PROCESSORS | |
| # Run mtr, skip main.mariadb-upgrade-service (currently crashes) | |
| perl bld\mysql-test\mysql-test-run.pl --force --max-test-fail=10 --retry=2 --parallel=$parallel ` | |
| --testcase-timeout=6 --suite=main --skip-test=main.mariadb-upgrade-service ` | |
| --mysqld=--loose-innodb-flush-log-at-trx-commit=2 | |
| - name: Test 2 | |
| run: | | |
| perl bld\mysql-test\mysql-test-run.pl --suite=main main.charset_client_win_utf8mb4 |