Skip to content

Commit 4dc3d60

Browse files
authored
Update cmake-multi-platform.yml
1 parent f1a8f20 commit 4dc3d60

File tree

1 file changed

+8
-49
lines changed

1 file changed

+8
-49
lines changed
+8-49
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CMake on multiple platforms
1+
name: CMake Tests
22

33
on:
44
push:
@@ -8,57 +8,16 @@ on:
88

99
jobs:
1010
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
3612

3713
steps:
3814
- name: Checkout code
3915
uses: actions/checkout@v4
4016

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
6318
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

0 commit comments

Comments
 (0)