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