Skip to content

Commit 024f49f

Browse files
authoredOct 11, 2022
Update cmake4ubuntu.yml
1 parent 76d54b1 commit 024f49f

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed
 

‎.github/workflows/cmake4ubuntu.yml

+19-12
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,29 @@ name: CMake4Ubuntu
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [ main ]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: [ main ]
8+
9+
env:
10+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
11+
BUILD_TYPE: Release
812

913
jobs:
1014
build:
11-
15+
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
16+
# You can convert this to a matrix build if you need cross-platform coverage.
17+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
1218
runs-on: ubuntu-latest
1319

1420
steps:
15-
- uses: actions/checkout@v3
16-
- name: configure
17-
run: ./configure
18-
- name: make
19-
run: make
20-
- name: make check
21-
run: make check
22-
- name: make distcheck
23-
run: make distcheck
21+
- uses: actions/checkout@v2
22+
23+
- name: Configure CMake
24+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
25+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
26+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
27+
28+
- name: Build
29+
# Build your program with the given configuration
30+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

0 commit comments

Comments
 (0)
Please sign in to comment.