Skip to content

Commit 322e4fd

Browse files
committed
Windows on ARM64 - build on CI
Use Github Actions CI. As buildbot is not ready for primetime yet
1 parent fa423c9 commit 322e4fd

3 files changed

Lines changed: 206 additions & 0 deletions

File tree

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: clang-cl 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 Latest LLVM (manual installer)
33+
run: |
34+
$llvmVersion = "20.1.5" # Replace with latest stable version
35+
$url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-$llvmVersion/LLVM-$llvmVersion-woa64.exe"
36+
$installer = "$env:TEMP\llvm-installer.exe"
37+
Invoke-WebRequest $url -OutFile $installer
38+
Start-Process -Wait -FilePath $installer -ArgumentList "/S", "/D=C:\LLVM"
39+
40+
- name: Build project
41+
run: |
42+
git config submodule.storage/columnstore/columnstore.update none
43+
git config submodule.storage/maria/libmarias3.update none
44+
git config submodule.storage/rocksdb/rocksdb.update none
45+
git config submodule.wsrep-lib.update none
46+
mkdir bld
47+
cd bld
48+
set PATH=C:\LLVM\bin;%PATH%
49+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" arm64
50+
cmake .. -DWITH_SSL=bundled -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_LINKER=lld-link -DCMAKE_SYSTEM_PROCESSOR=ARM64 -GNinja
51+
cmake --build . --parallel --verbose
52+
cmake --build . --target win_package_zip
53+
shell: cmd
54+
55+
56+
- name: Test
57+
run: |
58+
$env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64"
59+
#Calculate parallel as 4 * number of processors
60+
$parallel = 4 * [int]$env:NUMBER_OF_PROCESSORS
61+
# Run mtr, skip main.mariadb-upgrade-service (currently crashes)
62+
perl bld\mysql-test\mysql-test-run.pl --force --max-test-fail=10 --retry=2 --parallel=$parallel `
63+
--testcase-timeout=6 --suite=main --mysqld=--loose-innodb-flush-log-at-trx-commit=2
64+
65+
- name: Test 2
66+
run: |
67+
perl bld\mysql-test\mysql-test-run.pl --suite=main main.charset_client_win_utf8mb4
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build on Windows ARM64
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'bb-*'
8+
- '[0-9]+.[0-9]+'
9+
pull_request:
10+
11+
jobs:
12+
build:
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
runs-on: windows-11-arm
18+
19+
steps:
20+
- name: Configure git
21+
run: |
22+
# Nope, we won't be able to successfully run test
23+
# if you do not configure that freaking autocrlf
24+
git config --global core.autocrlf input
25+
26+
- uses: actions/checkout@v4
27+
28+
- name: Install bison
29+
run: |
30+
choco install winflexbison3
31+
32+
- name: Build
33+
run: |
34+
# speedup checkout by excluding uninteresting modules
35+
git config submodule.storage/columnstore/columnstore.update none
36+
git config submodule.storage/maria/libmarias3.update none
37+
git config submodule.storage/rocksdb/rocksdb.update none
38+
git config submodule.wsrep-lib.update none
39+
mkdir bld
40+
cd bld
41+
cmake .. -DWITH_SSL=bundled
42+
cmake --build . --config RelWithDebinfo --verbose -- -m
43+
cmake --build . --config RelWithDebInfo --target win_package_zip
44+
45+
- name: Test
46+
run: |
47+
$env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64"
48+
#Calculate parallel as 4 * number of processors
49+
$parallel = 4 * [int]$env:NUMBER_OF_PROCESSORS
50+
# Run mtr, skip unit.tzinfo
51+
perl bld\mysql-test\mysql-test-run.pl --force --max-test-fail=10 --retry=2 --parallel=$parallel `
52+
--testcase-timeout=10 --suite=main,unit --skip-test=unit.my_tzinfo `
53+
--mysqld=--loose-innodb-flush-log-at-trx-commit=2
54+
55+
- name: Test sequential
56+
# tests that can't run in parallel
57+
run: |
58+
$env:PATH = "C:\Strawberry\perl\bin;$env:PATH;C:\Program Files (x86)\Windows Kits\10\Debuggers\arm64"
59+
#Calculate parallel as 4 * number of processors
60+
$parallel = 4 * [int]$env:NUMBER_OF_PROCESSORS
61+
# Run mtr, skip unit.tzinfo
62+
perl bld\mysql-test\mysql-test-run.pl --suite=main --force --max-test-fail=10 --retry=2 charset_client_win_utf8mb4 `

0 commit comments

Comments
 (0)