Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 26 additions & 15 deletions .github/workflows/cmake-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NAME>"
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
9 changes: 9 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "libqrencode",
"version": "1.0.0",
"dependencies": [
"getopt",
"libiconv",
"libpng"
]
}