diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2021-03-11 17:40:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-11 17:40:09 -0500 |
commit | d44ccb1932ae7b42c6100f58d054c089577d274f (patch) | |
tree | d3b3e616cd77b92c58972203892269917042485b /.github | |
parent | a6d1ded1a41d0f461bf340a33e21fa896ce9da66 (diff) | |
download | tanetane-d44ccb1932ae7b42c6100f58d054c089577d274f.tar.gz tanetane-d44ccb1932ae7b42c6100f58d054c089577d274f.tar.bz2 tanetane-d44ccb1932ae7b42c6100f58d054c089577d274f.zip |
Add auto-building on push
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/cmake.yml | 47 |
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 @@ | |||
1 | name: CMake | ||
2 | |||
3 | on: [push] | ||
4 | |||
5 | env: | ||
6 | # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
7 | BUILD_TYPE: Release | ||
8 | |||
9 | jobs: | ||
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* | ||