Skip to content

Commit dd12ffd

Browse files
committed
Run unit tests in CI only
1 parent 6daf7a5 commit dd12ffd

1 file changed

Lines changed: 0 additions & 241 deletions

File tree

.github/workflows/ci-pr-validation.yaml

Lines changed: 0 additions & 241 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,6 @@ concurrency:
2828
cancel-in-progress: true
2929

3030
jobs:
31-
32-
wireshark-dissector-build:
33-
name: Build the Wireshark dissector
34-
runs-on: ${{ matrix.os }}
35-
timeout-minutes: 60
36-
strategy:
37-
matrix:
38-
os: [ubuntu-20.04, macos-12]
39-
40-
steps:
41-
- name: checkout
42-
uses: actions/checkout@v3
43-
44-
- name: Install deps (Ubuntu)
45-
if: ${{ startsWith(matrix.os, 'ubuntu') }}
46-
run: |
47-
sudo apt-get update -y
48-
sudo apt-get install -y protobuf-compiler libprotobuf-dev wireshark-dev
49-
50-
- name: Install deps (macOS)
51-
if: ${{ startsWith(matrix.os, 'macos') }}
52-
run: |
53-
brew update
54-
brew install pkg-config wireshark protobuf
55-
- name: Build wireshark plugin
56-
run: |
57-
cmake -S wireshark -B build-wireshark
58-
cmake --build build-wireshark
59-
6031
unit-tests:
6132
name: Run unit tests
6233
runs-on: ubuntu-22.04
@@ -98,215 +69,3 @@ jobs:
9869
9970
- name: Run unit tests
10071
run: RETRY_FAILED=3 ./run-unit-tests.sh
101-
102-
cpp20-build:
103-
name: Build with the C++20 standard
104-
runs-on: ubuntu-22.04
105-
timeout-minutes: 60
106-
107-
steps:
108-
- name: checkout
109-
uses: actions/checkout@v3
110-
- name: Install deps
111-
run: |
112-
sudo apt-get update -y
113-
sudo apt-get install -y libcurl4-openssl-dev libssl-dev \
114-
protobuf-compiler libprotobuf-dev libboost-dev \
115-
libboost-dev libboost-program-options-dev \
116-
libzstd-dev libsnappy-dev libgmock-dev libgtest-dev
117-
- name: CMake
118-
run: cmake -B build -DBUILD_PERF_TOOLS=ON -DCMAKE_CXX_STANDARD=20
119-
- name: Build
120-
run: |
121-
cmake --build build -j8 --target pulsarShared pulsarStatic
122-
cmake --build build -j8
123-
124-
cpp-build-windows:
125-
timeout-minutes: 120
126-
name: Build CPP Client on ${{ matrix.name }}
127-
needs: unit-tests
128-
runs-on: ${{ matrix.os }}
129-
env:
130-
VCPKG_ROOT: '${{ github.workspace }}/vcpkg'
131-
INSTALL_DIR: 'C:\\pulsar-cpp'
132-
strategy:
133-
fail-fast: false
134-
matrix:
135-
include:
136-
- name: 'Windows x64'
137-
os: windows-2019
138-
triplet: x64-windows-static
139-
suffix: 'windows-win64'
140-
generator: 'Visual Studio 16 2019'
141-
arch: '-A x64'
142-
- name: 'Windows x86'
143-
os: windows-2019
144-
triplet: x86-windows-static
145-
suffix: 'windows-win32'
146-
generator: 'Visual Studio 16 2019'
147-
arch: '-A Win32'
148-
149-
steps:
150-
- name: checkout
151-
uses: actions/checkout@v3
152-
153-
- name: Restore vcpkg and its artifacts.
154-
uses: actions/cache@v3
155-
id: vcpkg-cache
156-
with:
157-
path: |
158-
${{ env.VCPKG_ROOT }}
159-
vcpkg_installed
160-
!${{ env.VCPKG_ROOT }}/.git
161-
!${{ env.VCPKG_ROOT }}/buildtrees
162-
!${{ env.VCPKG_ROOT }}/packages
163-
!${{ env.VCPKG_ROOT }}/downloads
164-
key: |
165-
${{ runner.os }}-${{ matrix.triplet}}-${{ hashFiles( 'vcpkg.json' ) }}
166-
167-
- name: Get vcpkg(windows)
168-
if: ${{ runner.os == 'Windows' && steps.vcpkg-cache.outputs.cache-hit != 'true' }}
169-
run: |
170-
cd ${{ github.workspace }}
171-
mkdir build -force
172-
git clone https://github.com/Microsoft/vcpkg.git
173-
cd vcpkg
174-
.\bootstrap-vcpkg.bat
175-
176-
- name: remove system vcpkg(windows)
177-
if: runner.os == 'Windows'
178-
run: rm -rf "$VCPKG_INSTALLATION_ROOT"
179-
shell: bash
180-
181-
- name: Install vcpkg packages
182-
run: |
183-
${{ env.VCPKG_ROOT }}\vcpkg.exe install --triplet ${{ matrix.triplet }}
184-
185-
- name: Configure
186-
shell: bash
187-
run: |
188-
if [ "$RUNNER_OS" == "Windows" ]; then
189-
cmake \
190-
-B ./build-1 \
191-
-G "${{ matrix.generator }}" ${{ matrix.arch }} \
192-
-DBUILD_TESTS=OFF \
193-
-DVCPKG_TRIPLET="${{ matrix.triplet }}" \
194-
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" \
195-
-S .
196-
fi
197-
198-
- name: Install
199-
shell: bash
200-
run: |
201-
if [ "$RUNNER_OS" == "Windows" ]; then
202-
cmake --build ./build-1 --parallel --config Release
203-
cmake --install ./build-1
204-
fi
205-
206-
- name: Test examples
207-
shell: bash
208-
run: |
209-
if [ "$RUNNER_OS" == "Windows" ]; then
210-
cd win-examples
211-
cmake \
212-
-G "${{ matrix.generator }}" ${{ matrix.arch }} \
213-
-DLINK_STATIC=OFF \
214-
-DCMAKE_PREFIX_PATH=${{ env.INSTALL_DIR }} \
215-
-B build-dynamic
216-
cmake --build build-dynamic --config Release
217-
cmake \
218-
-G "${{ matrix.generator }}" ${{ matrix.arch }} \
219-
-DLINK_STATIC=ON \
220-
-DCMAKE_PREFIX_PATH=${{ env.INSTALL_DIR }} \
221-
-B build-static
222-
cmake --build build-static --config Release
223-
./build-static/Release/win-example.exe
224-
fi
225-
226-
- name: Build (Debug)
227-
shell: bash
228-
run: |
229-
if [ "$RUNNER_OS" == "Windows" ]; then
230-
cmake \
231-
-B ./build-2 \
232-
-G "${{ matrix.generator }}" ${{ matrix.arch }} \
233-
-DBUILD_TESTS=OFF \
234-
-DVCPKG_TRIPLET="${{ matrix.triplet }}" \
235-
-DCMAKE_INSTALL_PREFIX="${{ env.INSTALL_DIR }}" \
236-
-DCMAKE_BUILD_TYPE=Debug \
237-
-S .
238-
cmake --build ./build-2 --parallel --config Debug
239-
fi
240-
241-
package:
242-
name: Build ${{matrix.pkg.name}} ${{matrix.cpu.platform}}
243-
runs-on: ubuntu-22.04
244-
needs: unit-tests
245-
timeout-minutes: 500
246-
247-
strategy:
248-
fail-fast: true
249-
matrix:
250-
pkg:
251-
- { name: 'RPM', type: 'rpm', path: 'pkg/rpm/RPMS' }
252-
- { name: 'Deb', type: 'deb', path: 'pkg/deb/BUILD/DEB' }
253-
- { name: 'Alpine', type: 'apk', path: 'pkg/apk/build' }
254-
cpu:
255-
- { arch: 'x86_64', platform: 'x86_64' }
256-
257-
steps:
258-
- name: checkout
259-
uses: actions/checkout@v3
260-
261-
- name: Set up QEMU
262-
uses: docker/setup-qemu-action@v2
263-
264-
- name: Package Pulsar source
265-
run: build-support/generate-source-archive.sh
266-
267-
- uses: docker/setup-buildx-action@v2
268-
- run: build-support/copy-deps-versionfile.sh
269-
270-
- name: Build dependencies Docker image
271-
uses: docker/build-push-action@v3
272-
with:
273-
context: ./pkg/${{matrix.pkg.type}}
274-
load: true
275-
tags: build:latest
276-
platforms: linux/${{matrix.cpu.platform}}
277-
build-args: PLATFORM=${{matrix.cpu.arch}}
278-
cache-from: type=gha
279-
cache-to: type=gha,mode=max
280-
281-
- name: Build packages
282-
run: pkg/${{matrix.pkg.type}}/docker-build-${{matrix.pkg.type}}-${{matrix.cpu.platform}}.sh build:latest
283-
284-
cpp-build-macos:
285-
timeout-minutes: 120
286-
name: Build CPP Client on macOS
287-
runs-on: macos-12
288-
needs: unit-tests
289-
steps:
290-
- name: checkout
291-
uses: actions/checkout@v3
292-
293-
- name: Install dependencies
294-
run: brew install openssl protobuf boost zstd snappy googletest
295-
296-
- name: Configure (default)
297-
shell: bash
298-
run: cmake -B ./build-macos -S .
299-
300-
- name: Compile
301-
shell: bash
302-
run: |
303-
cmake --build ./build-macos --parallel --config Release
304-
305-
# Job that will be required to complete and depends on all the other jobs
306-
check-completion:
307-
name: Check Completion
308-
runs-on: ubuntu-latest
309-
needs: [wireshark-dissector-build, unit-tests, cpp20-build, cpp-build-windows, package, cpp-build-macos]
310-
311-
steps:
312-
- run: true

0 commit comments

Comments
 (0)