Skip to content

Commit b438a93

Browse files
committed
Test more stuff
- MacOS was never testing P2P! - Run "test_connection suite-quick" on all platforms - On all platforms, configure and build the Release and Debug configurations (but don't test them, at least not right now)
1 parent 537bdcc commit b438a93

2 files changed

Lines changed: 118 additions & 29 deletions

File tree

.github/workflows/build.yml

Lines changed: 87 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,39 +28,39 @@ jobs:
2828
use_webrtc: false
2929
crypto: default
3030
crypto25519: default
31-
targets: "test_p2p trivial_signaling_server publish_test_script test_crypto"
31+
targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto"
3232
run_tests: true
33-
tests: "test_crypto test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug"
33+
tests: "test_crypto test_connection:suite-quick test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug"
3434
- row: clang-libsodium
3535
compiler: clang
3636
build_dir: build-ci-quick-sodium
3737
sanitizer: none
3838
use_webrtc: false
3939
crypto: libsodium
4040
crypto25519: libsodium
41-
targets: "test_p2p trivial_signaling_server publish_test_script test_crypto"
41+
targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto"
4242
run_tests: true
43-
tests: "test_crypto test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug"
43+
tests: "test_crypto test_connection:suite-quick test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug"
4444
- row: clang-reference-25519
4545
compiler: clang
4646
build_dir: build-ci-quick-ref25519
4747
sanitizer: none
4848
use_webrtc: false
4949
crypto: default
5050
crypto25519: Reference
51-
targets: "test_p2p trivial_signaling_server publish_test_script test_crypto"
51+
targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto"
5252
run_tests: true
53-
tests: "test_crypto test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug"
53+
tests: "test_crypto test_connection:suite-quick test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug"
5454
- row: clang-openssl-webrtc
5555
compiler: clang
5656
build_dir: build-ci-quick-webrtc
5757
sanitizer: none
5858
use_webrtc: true
5959
crypto: default
6060
crypto25519: default
61-
targets: "test_p2p trivial_signaling_server publish_test_script test_crypto"
61+
targets: "test_connection test_p2p trivial_signaling_server publish_test_script test_crypto"
6262
run_tests: true
63-
tests: "test_crypto test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug"
63+
tests: "test_crypto test_connection:suite-quick test_p2p.py:--spewlevel=debug:--loglevel-p2prendezvous=debug"
6464
env:
6565
CI_BUILD: 1
6666
IMAGE: ubuntu
@@ -74,7 +74,7 @@ jobs:
7474
run: |
7575
sudo -E bash .github/install.sh
7676
sudo -E bash .github/install-post.sh
77-
- name: Build and run selected single config
77+
- name: Build and test (RelWithDebInfo)
7878
run: |
7979
set -euo pipefail
8080
@@ -111,6 +111,56 @@ jobs:
111111
112112
python3 .github/run-single-config.py "${args[@]}"
113113
114+
- name: Build (Release)
115+
run: |
116+
set -euo pipefail
117+
118+
args=(
119+
--compiler "${{ matrix.compiler }}"
120+
--build-dir "build-release"
121+
--build-type Release
122+
--sanitizer none
123+
)
124+
125+
if [[ "${{ matrix.use_webrtc }}" == "true" ]]; then
126+
args+=(--use-webrtc)
127+
fi
128+
129+
if [[ "${{ matrix.crypto }}" != "default" ]]; then
130+
args+=(--crypto "${{ matrix.crypto }}")
131+
fi
132+
133+
if [[ "${{ matrix.crypto25519 }}" != "default" ]]; then
134+
args+=(--crypto25519 "${{ matrix.crypto25519 }}")
135+
fi
136+
137+
python3 .github/run-single-config.py "${args[@]}"
138+
139+
- name: Build (Debug)
140+
run: |
141+
set -euo pipefail
142+
143+
args=(
144+
--compiler "${{ matrix.compiler }}"
145+
--build-dir "build-debug"
146+
--build-type Debug
147+
--sanitizer none
148+
)
149+
150+
if [[ "${{ matrix.use_webrtc }}" == "true" ]]; then
151+
args+=(--use-webrtc)
152+
fi
153+
154+
if [[ "${{ matrix.crypto }}" != "default" ]]; then
155+
args+=(--crypto "${{ matrix.crypto }}")
156+
fi
157+
158+
if [[ "${{ matrix.crypto25519 }}" != "default" ]]; then
159+
args+=(--crypto25519 "${{ matrix.crypto25519 }}")
160+
fi
161+
162+
python3 .github/run-single-config.py "${args[@]}"
163+
114164
# Don't do it this way. This causes the main badge to
115165
# go red if one of the flavors fails.
116166
## Trigger testing of more linux flavors
@@ -185,14 +235,14 @@ jobs:
185235
run: '"${{env.VCPKG_ROOT}}\vcpkg" install --vcpkg-root "${{env.VCPKG_ROOT}}" --triplet=x64-windows'
186236
shell: cmd
187237

188-
- name: cmake generate project files
238+
- name: Configure CMake (RelWithDebInfo)
189239
run: |
190240
mkdir build
191241
cd build
192-
cmake -S .. -G Ninja -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON "-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DUSE_CRYPTO=${{matrix.crypto}}
242+
cmake -S .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON "-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DUSE_CRYPTO=${{matrix.crypto}}
193243
shell: cmd
194244

195-
- name: Build projects
245+
- name: Build (RelWithDebInfo)
196246
working-directory: '${{ github.workspace }}/build'
197247
run: ninja
198248
shell: cmd
@@ -204,12 +254,34 @@ jobs:
204254

205255
- name: Test connection
206256
working-directory: '${{ github.workspace }}/build/bin'
207-
run: |
208-
rem test_connection.exe suite-quick -- Loopback throughput test not performing on github hosted runners for some reason
209-
test_connection.exe identity quick lane_quick_queueanddrain lane_quick_priority_and_background
257+
run: test_connection.exe suite-quick
210258
shell: cmd
211259

212260
- name: Test p2p
213261
working-directory: '${{ github.workspace }}/build/bin'
214262
run: py -3 test_p2p.py --spewlevel=debug --loglevel-p2prendezvous=debug
215263
shell: cmd
264+
265+
- name: Configure CMake (Release)
266+
run: |
267+
mkdir build-release
268+
cd build-release
269+
cmake -S .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON "-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DUSE_CRYPTO=${{matrix.crypto}}
270+
shell: cmd
271+
272+
- name: Build (Release)
273+
working-directory: '${{ github.workspace }}/build-release'
274+
run: ninja
275+
shell: cmd
276+
277+
- name: Configure CMake (Debug)
278+
run: |
279+
mkdir build-debug
280+
cd build-debug
281+
cmake -S .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON "-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DUSE_CRYPTO=${{matrix.crypto}}
282+
shell: cmd
283+
284+
- name: Build (Debug)
285+
working-directory: '${{ github.workspace }}/build-debug'
286+
run: ninja
287+
shell: cmd

.github/workflows/macos.yml

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,15 @@ jobs:
4141
run: |
4242
"${VCPKG_ROOT}/vcpkg" install
4343
44-
- name: Configure CMake
45-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
46-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
44+
- name: Configure CMake (RelWithDebInfo)
4745
run: cmake -B ${{github.workspace}}/build
48-
-DCMAKE_BUILD_TYPE=Release
46+
-DCMAKE_BUILD_TYPE=RelWithDebInfo
4947
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
5048
-DBUILD_TESTS=ON
49+
-DBUILD_EXAMPLES=ON
5150

52-
- name: Build
53-
# Build the program with the given configuration
54-
run: cmake --build ${{github.workspace}}/build --config Release
55-
56-
#- name: Test
57-
# working-directory: ${{github.workspace}}/build
58-
# # Execute tests defined by the CMake configuration.
59-
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
60-
# run: ctest -C Release
51+
- name: Build (RelWithDebInfo)
52+
run: cmake --build ${{github.workspace}}/build --config RelWithDebInfo
6153

6254
- name: Test crypto
6355
working-directory: ${{github.workspace}}/build/bin
@@ -66,5 +58,30 @@ jobs:
6658

6759
- name: Test connection
6860
working-directory: ${{github.workspace}}/build/bin
69-
run: ./test_connection identity quick lane_quick_queueanddrain lane_quick_priority_and_background
61+
run: ./test_connection suite-quick
7062
shell: bash
63+
64+
- name: Test p2p
65+
working-directory: ${{github.workspace}}/build/bin
66+
run: python3 test_p2p.py --spewlevel=debug --loglevel-p2prendezvous=debug
67+
shell: bash
68+
69+
- name: Configure CMake (Release)
70+
run: cmake -B ${{github.workspace}}/build-release
71+
-DCMAKE_BUILD_TYPE=Release
72+
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
73+
-DBUILD_TESTS=ON
74+
-DBUILD_EXAMPLES=ON
75+
76+
- name: Build (Release)
77+
run: cmake --build ${{github.workspace}}/build-release --config Release
78+
79+
- name: Configure CMake (Debug)
80+
run: cmake -B ${{github.workspace}}/build-debug
81+
-DCMAKE_BUILD_TYPE=Debug
82+
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake
83+
-DBUILD_TESTS=ON
84+
-DBUILD_EXAMPLES=ON
85+
86+
- name: Build (Debug)
87+
run: cmake --build ${{github.workspace}}/build-debug --config Debug

0 commit comments

Comments
 (0)