Skip to content

Commit 882d267

Browse files
committed
Merge branch 'integration-tests' of https://github.com/ccassise/wowpkg into integration-tests
2 parents 14c0b7c + 63b0151 commit 882d267

1 file changed

Lines changed: 88 additions & 84 deletions

File tree

.github/workflows/pr_validation.yml

Lines changed: 88 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: macos-latest
1414

1515
strategy:
16-
fail-fast: false
16+
fail-fast: true
1717

1818
matrix:
1919
build_type: [Release, Debug]
@@ -23,21 +23,17 @@ jobs:
2323
- uses: actions/checkout@v4
2424

2525
- name: Set reusable strings
26-
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
2726
id: strings
2827
shell: bash
2928
run: |
3029
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
3130
3231
- name: Install vcpkg
3332
run: |
34-
cd ${{ github.workspace }}
3533
git clone https://github.com/microsoft/vcpkg.git
3634
/bin/sh -c ./vcpkg/bootstrap-vcpkg.sh
3735
3836
- name: Configure CMake
39-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
40-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
4137
run: >
4238
cmake -B ${{ steps.strings.outputs.build-output-dir }}
4339
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
@@ -51,92 +47,100 @@ jobs:
5147
5248
5349
- name: Build
54-
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
5550
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
5651

5752
- name: Test
5853
working-directory: ${{ steps.strings.outputs.build-output-dir }}
59-
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
60-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
6154
run: ctest --build-config ${{ matrix.build_type }}
6255

56+
linux:
57+
runs-on: ubuntu-latest
6358

64-
# build:
65-
# runs-on: ${{ matrix.os }}
66-
67-
# strategy:
68-
# # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
69-
# fail-fast: false
70-
71-
# # Set up a matrix to run the following 3 configurations:
72-
# # 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
73-
# # 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
74-
# # 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
75-
# #
76-
# # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
77-
# matrix:
78-
# os: [ubuntu-latest, windows-latest, macos-latest]
79-
# build_type: [Release, Debug]
80-
# c_compiler: [gcc, clang, cl]
81-
# include:
82-
# - os: windows-latest
83-
# c_compiler: cl
84-
# cpp_compiler: cl
85-
# - os: ubuntu-latest
86-
# c_compiler: gcc
87-
# cpp_compiler: g++
88-
# - os: ubuntu-latest
89-
# c_compiler: clang
90-
# cpp_compiler: clang++
91-
# exclude:
92-
# - os: windows-latest
93-
# c_compiler: gcc
94-
# - os: windows-latest
95-
# c_compiler: clang
96-
# - os: ubuntu-latest
97-
# c_compiler: cl
98-
# - os: macos-latest
99-
# c_compiler: cl
100-
# - os: macos-latest
101-
# c_compiler: gcc
102-
103-
# steps:
104-
# - uses: actions/checkout@v4
105-
106-
# - name: Set reusable strings
107-
# # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
108-
# id: strings
109-
# shell: bash
110-
# run: |
111-
# echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
112-
113-
# - name: Install vcpkg
114-
# run: |
115-
# cd ${{ github.workspace }}
116-
# git clone https://github.com/microsoft/vcpkg.git
117-
# /bin/sh -c ./vcpkg/bootstrap-vcpkg.sh
118-
119-
# - name: Configure CMake
120-
# # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
121-
# # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
122-
# run: >
123-
# cmake -B ${{ steps.strings.outputs.build-output-dir }}
124-
# -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
125-
# -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
126-
# -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
127-
# -S ${{ github.workspace }}
128-
# -DWOWPKG_USE_DEVELOPMENT_PATHS:option=on
129-
# -DWOWPKG_ENABLE_SANITIZERS:option=on
130-
# -DWOWPKG_ENABLE_TESTS:option=on
131-
# -DWOWPKG_ENABLE_TESTS_INTEGRATION:option=off
59+
strategy:
60+
fail-fast: true
61+
62+
matrix:
63+
build_type: [Release, Debug]
64+
c_compiler: [gcc]
65+
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Set reusable strings
70+
id: strings
71+
shell: bash
72+
run: |
73+
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
74+
75+
- name: Install valgrind
76+
run: |
77+
sudo apt install valgrind
78+
79+
- name: Install vcpkg
80+
run: |
81+
git clone https://github.com/microsoft/vcpkg.git
82+
/bin/sh -c ./vcpkg/bootstrap-vcpkg.sh
83+
84+
- name: Configure CMake
85+
run: >
86+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
87+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
88+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
89+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
90+
-S ${{ github.workspace }}
91+
-DWOWPKG_USE_DEVELOPMENT_PATHS:option=on
92+
-DWOWPKG_ENABLE_SANITIZERS:option=off
93+
-DWOWPKG_ENABLE_TESTS:option=on
94+
-DWOWPKG_ENABLE_TESTS_INTEGRATION:option=off
13295
13396
134-
# - name: Build
135-
# # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
136-
# run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
97+
- name: Build
98+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
99+
100+
- name: Test
101+
working-directory: ${{ steps.strings.outputs.build-output-dir }}
102+
run: ctest --build-config ${{ matrix.build_type }} -T memcheck
103+
104+
windows:
105+
runs-on: windows-latest
137106

138-
# - name: Test
139-
# working-directory: ${{ steps.strings.outputs.build-output-dir }}
140-
# # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
141-
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
142-
# run: ctest --build-config ${{ matrix.build_type }}
107+
strategy:
108+
fail-fast: true
109+
110+
matrix:
111+
build_type: [Release, Debug]
112+
c_compiler: [cl]
113+
114+
steps:
115+
- uses: actions/checkout@v4
116+
117+
- name: Set reusable strings
118+
id: strings
119+
shell: bash
120+
run: |
121+
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
122+
123+
- name: Install vcpkg
124+
shell: pwsh
125+
run: |
126+
git clone https://github.com/microsoft/vcpkg.git
127+
cmd.exe \c '.\vcpkg\bootstrap-vcpkg.bat'
128+
129+
- name: Configure CMake
130+
run: >
131+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
132+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
133+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
134+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
135+
-S ${{ github.workspace }}
136+
-DWOWPKG_USE_DEVELOPMENT_PATHS:option=on
137+
-DWOWPKG_ENABLE_SANITIZERS:option=on
138+
-DWOWPKG_ENABLE_TESTS:option=on
139+
-DWOWPKG_ENABLE_TESTS_INTEGRATION:option=off
140+
141+
- name: Build
142+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
143+
144+
- name: Test
145+
working-directory: ${{ steps.strings.outputs.build-output-dir }}
146+
run: ctest --build-config ${{ matrix.build_type }}

0 commit comments

Comments
 (0)