Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cxong/tinydir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCong <congusbongus@gmail.com>2021-11-16 15:52:56 +0300
committerGitHub <noreply@github.com>2021-11-16 15:52:56 +0300
commitbaf1c6f64b6b1852702a5c8aeecfad8fec476ed2 (patch)
treef46d4e5daaa39e565a62d490a23d3c04a603126f /.github
parent64fb1d4376d7580aa1013fdbacddbbeba67bb085 (diff)
Create cmake.yml (fixes #71)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/cmake.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
new file mode 100644
index 0000000..d4204de
--- /dev/null
+++ b/.github/workflows/cmake.yml
@@ -0,0 +1,44 @@
+name: CMake
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+env:
+ # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
+ BUILD_TYPE: Release
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ include:
+ - os: macos-latest
+ CC: clang
+ - os: ubuntu-latest
+ CC: gcc
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Build
+ env:
+ CC: ${{ matrix.CC }}
+ run: |
+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} tests
+ cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
+
+ - name: Test
+ working-directory: ${{github.workspace}}/build
+ run: ctest -C ${{env.BUILD_TYPE}}
+
+ - name: Build (samples)
+ env:
+ CC: ${{ matrix.CC }}
+ run: |
+ rm -rf ${{github.workspace}}/build
+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} samples
+ cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}