summary refs log tree commit diff stats
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cmake.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..eb89ccd --- /dev/null +++ b/.github/workflows/cmake.yml
@@ -0,0 +1,47 @@
1name: CMake
2
3on: [push]
4
5env:
6 # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7 BUILD_TYPE: Release
8
9jobs:
10 build:
11 # The CMake configure and build commands are platform agnostic and should work equally
12 # well on Windows or Mac. You can convert this to a matrix build if you need
13 # cross-platform coverage.
14 # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
15 runs-on: ${{ matrix.os }}
16 strategy:
17 matrix:
18 os: [ubuntu-latest, windows-latest, macOS-latest]
19
20 steps:
21 - uses: actions/checkout@v2
22
23 - name: Create Build Environment
24 # Some projects don't allow in-source building, so create a separate build directory
25 # We'll use this as our working directory for all subsequent commands
26 run: cmake -E make_directory ${{github.workspace}}/build
27
28 - name: Configure CMake
29 # Use a bash shell so we can use the same syntax for environment variable
30 # access regardless of the host operating system
31 shell: bash
32 working-directory: ${{github.workspace}}/build
33 # Note the current convention is to use the -S and -B options here to specify source
34 # and build directories, but this is only available with CMake 3.13 and higher.
35 # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
36 run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
37
38 - name: Build
39 working-directory: ${{github.workspace}}/build
40 shell: bash
41 # Execute the build. You can specify a specific target with "--target <NAME>"
42 run: cmake --build . --config $BUILD_TYPE
43
44 - name: Upload a Build Artifact
45 uses: actions/upload-artifact@v2.2.2
46 with:
47 path: ${{github.workspace}}/build/tanetane*