Skip to content

Commit

Permalink
GitHub Actions: set up CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
tempname11 committed Sep 13, 2023
1 parent 8572d96 commit 80d9cf2
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CMake

on:
workflow_dispatch:
pull_request:
push:
branches: [main]

jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022, ubuntu-22.04]
build-type: [Debug, Release]
steps:
- run: git config --global core.autocrlf false

- uses: actions/[email protected]

- name: Build and Test
shell: bash
run: |
# ...
GENERATOR_FLAG=""
if [ "$RUNNER_OS" == "Windows" ]; then
GENERATOR_FLAG="-GNinja"
fi
cmake \
-S svf_tools \
-B .build \
${GENERATOR_FLAG} \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
cmake --build .build
ctest --test-dir .build

0 comments on commit 80d9cf2

Please sign in to comment.