Skip to content

Commit

Permalink
Update build configurations for multi-platform support
Browse files Browse the repository at this point in the history
  • Loading branch information
ak5k committed Jan 3, 2024
1 parent ed85b87 commit 8ac7a35
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,20 @@ jobs:
include:
- os: ubuntu-latest
arch: x86_64
build_type: Release
- os: ubuntu-latest
arch: aarch64
build_type: Release
- os: ubuntu-latest
arch: i686
build_type: Release
- os: ubuntu-latest
arch: armv7l
build_type: Release
- os: windows-latest
arch: x64
build_type: RelWithDebInfo
win_build_type: RelWithDebInfo
- os: windows-latest
arch: x86
build_type: Release
win_build_type: Release
- os: macos-latest
arch: arm64;x86_64
build_type: Release

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -101,24 +96,28 @@ jobs:
if "${{matrix.arch}}" == "x86" call "%VS_PATH%\vcvars32.bat"
cmake -B ${{ github.workspace }} ^
-G "Ninja" ^
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
-DCMAKE_BUILD_TYPE=${{ matrix.win_build_type }} ^
-S ${{ github.workspace }}"
cmake --build ${{ github.workspace }} --config ${{ matrix.build_type }}
cmake --build ${{ github.workspace }} --config ${{ matrix.win_build_type }}
- name: Unix-like build
# Note the current configuration is for a basic C++ project. You'll need to update this for your specific needs.
if: runner.os != 'Windows'
run: |
cmake -B ${{ github.workspace }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_BUILD_TYPE=Release \
-S ${{ github.workspace }} \
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch }}"
cmake --build ${{ github.workspace }} --config ${{ matrix.build_type }}
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET=arch-env -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$TOOLCHAIN
-DCMAKE_OSX_DEPLOYMENT_TARGET=$DEPLOY_TARGET
cmake --build ${{ github.workspace }} --config Release
- name: CTest
if: runner.os != 'Windows'
working-directory: ${{ github.workspace }}
run: ctest --build-config ${{ matrix.build_type }}
run: ctest --build-config Release

- name: CPack
working-directory: ${{ github.workspace }}
Expand Down

0 comments on commit 8ac7a35

Please sign in to comment.