From 85d8a618aded8ef781ad8c6f31aaf71f8b6f0aa3 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 4 Oct 2024 12:54:51 +0800 Subject: [PATCH 1/2] CI: Add CI job for VS2019 ARM64 builds We need to write a Meson cross-compilation file on the fly here, hence the additions in test-msvc.bat to set up the paths. Like the 32-bit VS2019 CI job this is only run manually or weekly. --- .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++ .gitlab-ci/test-msvc.bat | 25 +++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61b7606cd..e055f83e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -690,6 +690,42 @@ vs2019-x86: - _build/gthread/libgthread-2.0-0.dll - _build/gobject/libgobject-2.0-0.dll +vs2019-arm64: + extends: .only-schedules-or-manual + stage: build + tags: + - win32-ps + needs: [] + variables: + GIT_SUBMODULE_STRATEGY: recursive + GIT_SUBMODULE_DEPTH: 1 + PYTHONUTF8: "1" + script: + # FIXME: These should use --wrap-mode=nodownload but the Windows CI machines + # aren’t currently set up for that. + # FIXME: Use --meson-fatal-warnings once we've enabled c_std=gnu99,c99 + # for the runner's Meson version. + - .gitlab-ci/test-msvc.bat --buildtype debug + --wrap-mode=default + --python.platlibdir=C:\Python37\site-packages + --python.purelibdir=C:\Python37\site-packages + --plat=x64_arm64 + artifacts: + reports: + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml + name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}" + when: always + expire_in: 1 week + paths: + - _build/meson-logs + - _build/glib/libglib-2.0-0.dll + - _build/gio/libgio-2.0-0.dll + - _build/gmodule/libgmodule-2.0-0.dll + - _build/gthread/libgthread-2.0-0.dll + - _build/gobject/libgobject-2.0-0.dll + freebsd-13-x86_64: extends: .only-schedules-or-manual stage: build diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index 9114f508f..f7f07a6d7 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -16,6 +16,30 @@ if "!plat!" == "" set plat=x64 :: specified build architecture call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" !plat! +:: Setup and write a cross-compilation file for ARM64 builds +if not "!plat!" == "x64_arm64" goto :continue_build +set cross_file=vs2019-arm64.txt +echo [host_machine]>!cross_file! +echo system = 'windows'>>!cross_file! +echo cpu_family = 'aarch64'>>!cross_file! +echo cpu = 'arm64'>>!cross_file! +echo endian = 'little'>>!cross_file! +echo.>>!cross_file! +echo [binaries]>>!cross_file! +echo c = 'cl'>>!cross_file! +echo cpp = 'cl'>>!cross_file! +echo c_ld = 'link'>>!cross_file! +echo cpp_ld = 'link'>>!cross_file! +echo ar = 'lib'>>!cross_file! +echo windres = 'rc'>>!cross_file! + +echo.>>!cross_file! +echo [properties]>>!cross_file! +echo skip_sanity_check = true>>!cross_file! + +set args=%args% --cross-file=!cross_file! + +:continue_build pip3 install --upgrade --user meson==1.4.2 || goto :error meson setup %args% _build || goto :error meson compile -C _build || goto :error @@ -30,6 +54,7 @@ if not "!plat!" == "x64_x86" meson test -v -C _build --timeout-multiplier %MESON meson test -v -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --setup=unstable_tests --suite=failing --suite=flaky :: FIXME: can we get code coverage support? +if not "!cross_file!" == "" if exist !cross_file! del /f/q !cross_file! goto :EOF :error From b1f09a0b0df9e546408b80798c65d6da8b4f4c61 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Thu, 17 Oct 2024 10:43:47 +0800 Subject: [PATCH 2/2] .gitignore: Add vs2019-arm64.txt This file is generated during a CI run and is deleted once the CI run is completed, so don't try to track that file. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2a8cd73c2..eda54ed08 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ tags # Meson /meson-build/ /subprojects/*/ + +# Generated Meson cross-compilation files for CI +vs2019-arm64.txt