Commit 4dc3d60 1 parent f1a8f20 commit 4dc3d60 Copy full SHA for 4dc3d60
File tree 1 file changed +8
-49
lines changed
1 file changed +8
-49
lines changed Original file line number Diff line number Diff line change 1
- name : CMake on multiple platforms
1
+ name : CMake Tests
2
2
3
3
on :
4
4
push :
8
8
9
9
jobs :
10
10
build-and-test :
11
- runs-on : ${{ matrix.os }}
12
-
13
- strategy :
14
- fail-fast : false
15
- matrix :
16
- os : [ubuntu-latest, windows-latest]
17
- build_type : [Release]
18
- c_compiler : [gcc, clang, cl]
19
- include :
20
- - os : windows-latest
21
- c_compiler : cl
22
- cpp_compiler : cl
23
- - os : ubuntu-latest
24
- c_compiler : gcc
25
- cpp_compiler : g++
26
- - os : ubuntu-latest
27
- c_compiler : clang
28
- cpp_compiler : clang++
29
- exclude :
30
- - os : windows-latest
31
- c_compiler : gcc
32
- - os : windows-latest
33
- c_compiler : clang
34
- - os : ubuntu-latest
35
- c_compiler : cl
11
+ runs-on : ubuntu-latest # Focando no Linux, pois você mencionou testes locais no Ubuntu
36
12
37
13
steps :
38
14
- name : Checkout code
39
15
uses : actions/checkout@v4
40
16
41
- - name : Set reusable strings
42
- id : strings
43
- shell : bash
44
- run : |
45
- echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
46
-
47
- - name : Configure CMake
48
- run : >
49
- cmake -B ${{ steps.strings.outputs.build-output-dir }}
50
- -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
51
- -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
52
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
53
- -S ${{ github.workspace }}
54
-
55
- - name : Build
56
- run : cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
57
-
58
- - name : List full build directory
59
- run : ls -R ${{ steps.strings.outputs.build-output-dir }}
60
-
61
- - name : Run Google Tests
62
- # Use o caminho absoluto para o executável diretamente.
17
+ - name : Build and Run Tests
63
18
run : |
64
- ${{ steps.strings.outputs.build-output-dir }}/test/unit-tests/LibUnitTests
19
+ mkdir build
20
+ cd build
21
+ cmake ..
22
+ make
23
+ ./tests/unit-tests/LibUnitTests
You can’t perform that action at this time.
0 commit comments