From 0b4240205aa076556c51cff01e38d595c375f5e0 Mon Sep 17 00:00:00 2001 From: Vignesh E Date: Fri, 17 Jul 2026 11:01:48 +0530 Subject: [PATCH] PR Description This pull request adds native Windows ARM64 support to the existing CI workflow by introducing a new job that runs on the windows-11-arm runner and builds libqrencode for the ARM64 target platform. The following files have been updated: cmake-windows.yml vcpkg.json This is a minimal, additive change that does not modify any existing CI jobs or supported platforms. Its purpose is to expand CI coverage for Windows on ARM and enable native ARM64 build validation in the CI pipeline. --- .github/workflows/cmake-windows.yml | 41 ++++++++++++++++++----------- vcpkg.json | 9 +++++++ 2 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 vcpkg.json diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index ef0e0511..5c64b5ef 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -12,42 +12,53 @@ jobs: # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix - runs-on: windows-latest + strategy: + matrix: + include: + - arch: x64 + vcpkg_triplet: x64-windows + runner: windows-latest + + - arch: arm64 + vcpkg_triplet: arm64-windows + runner: windows-11-arm + + runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v2 - - name: run vcpkg - uses: lukka/run-vcpkg@v3 + - name: Run vcpkg for ${{ matrix.arch }} + uses: lukka/run-vcpkg@v11 with: - vcpkgArguments: getopt:x64-windows libiconv:x64-windows libpng:x64-windows - vcpkgDirectory: '${{ github.workspace }}/vcpkg' - vcpkgGitCommitId: 'fca18ba3572f8aebe3b8158c359db62a7e26134e' + vcpkgGitCommitId: cd61e1e26a038e82d6550a3ebbe0fbbfe7da78e3 + vcpkgJsonGlob: '**/vcpkg.json' - name: Create Build Environment # Some projects don't allow in-source building, so create a separate build directory # We'll use this as our working directory for all subsequent commands - run: cmake -E make_directory ${{runner.workspace}}/build + run: cmake -E make_directory ${{ runner.workspace }}/build-${{ matrix.arch }} - - name: Configure CMake + - name: Configure CMake for ${{ matrix.arch }} # Use a bash shell so we can use the same syntax for environment variable # access regardless of the host operating system shell: bash - working-directory: ${{runner.workspace}}/build + working-directory: ${{runner.workspace}}/build-${{ matrix.arch }} # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DWITH_TESTS=yes + run: | + cmake "$GITHUB_WORKSPACE" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }} -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DWITH_TESTS=yes - - name: Build - working-directory: ${{runner.workspace}}/build + - name: Build for ${{ matrix.arch }} + working-directory: ${{runner.workspace}}/build-${{ matrix.arch }} shell: bash # Execute the build. You can specify a specific target with "--target " run: cmake --build . --config $BUILD_TYPE - - name: Test - working-directory: ${{runner.workspace}}/build + - name: Test for ${{ matrix.arch }} + working-directory: ${{ runner.workspace }}/build-${{ matrix.arch }} shell: bash # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C $BUILD_TYPE + run: ctest -C $BUILD_TYPE \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000..3088c3ce --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,9 @@ +{ + "name": "libqrencode", + "version": "1.0.0", + "dependencies": [ + "getopt", + "libiconv", + "libpng" + ] +} \ No newline at end of file