Skip to content

Commit

Permalink
gtest: Enable GTests in some CI workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Demel <[email protected]>
  • Loading branch information
jdemel committed Aug 19, 2024
1 parent 4db6289 commit 752fbab
Showing 1 changed file with 76 additions and 82 deletions.
158 changes: 76 additions & 82 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,32 @@ jobs:
runs-on: ${{ matrix.compiler.distro }}

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: sudo apt install python3-mako liborc-dev ${{ matrix.compiler.name }}
- name: Configure
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
run: mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_EXECUTABLE=ON ..
- name: Build
run: |
echo "Build with $(nproc) thread(s)"
cmake --build build -j$(nproc)
- name: Print info
run: |
./build/cpu_features/list_cpu_features
./build/apps/volk-config-info --alignment
./build/apps/volk-config-info --avail-machines
./build/apps/volk-config-info --all-machines
./build/apps/volk-config-info --malloc
./build/apps/volk-config-info --cc
- name: Test
run: |
cd build
ctest -V
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install dependencies
run: sudo apt install python3-mako liborc-dev libgtest-dev libfmt-dev ${{ matrix.compiler.name }}
- name: Configure
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
run: mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_EXECUTABLE=ON ..
- name: Build
run: |
echo "Build with $(nproc) thread(s)"
cmake --build build -j$(nproc)
- name: Print info
run: |
./build/cpu_features/list_cpu_features
./build/apps/volk-config-info --alignment
./build/apps/volk-config-info --avail-machines
./build/apps/volk-config-info --all-machines
./build/apps/volk-config-info --malloc
./build/apps/volk-config-info --cc
- name: Test
run: |
cd build
ctest -V
build-ubuntu-arm:
# The host should always be linux
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: "recursive"
- uses: uraimo/[email protected]
name: Build in non-x86 container
id: build
Expand Down Expand Up @@ -169,44 +169,41 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: dependencies
run: sudo apt install python3-mako liborc-dev
- name: configure
run: mkdir build && cd build && cmake -DENABLE_STATIC_LIBS=True -DBUILD_EXECUTABLE=ON ..
- name: build
run: cmake --build build -j$(nproc)
- name: Print info
run: |
./build/cpu_features/list_cpu_features
./build/apps/volk-config-info --alignment
./build/apps/volk-config-info --avail-machines
./build/apps/volk-config-info --all-machines
./build/apps/volk-config-info --malloc
./build/apps/volk-config-info --cc
- name: test
run: cd build && ctest -V


- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: dependencies
run: sudo apt install python3-mako liborc-dev
- name: configure
run: mkdir build && cd build && cmake -DENABLE_STATIC_LIBS=True -DBUILD_EXECUTABLE=ON ..
- name: build
run: cmake --build build -j$(nproc)
- name: Print info
run: |
./build/cpu_features/list_cpu_features
./build/apps/volk-config-info --alignment
./build/apps/volk-config-info --avail-machines
./build/apps/volk-config-info --all-machines
./build/apps/volk-config-info --malloc
./build/apps/volk-config-info --cc
- name: test
run: cd build && ctest -V

build-windows:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: dependencies
run: pip install mako
- name: configure
run: mkdir build && cd build && cmake ..
- name: build
run: cmake --build build --config Release --target INSTALL -j2
- name: test
run: cd build && ctest -V -C Release
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: dependencies
run: pip install mako
- name: configure
run: mkdir build && cd build && cmake ..
- name: build
run: cmake --build build --config Release --target INSTALL -j2
- name: test
run: cd build && ctest -V -C Release

# build-windows-msys2:
# name: Build on windows-latest using MinGW and MSYS2
Expand Down Expand Up @@ -242,32 +239,29 @@ jobs:
# ctest -V

build-macos:

strategy:
matrix:
os: [macos-latest, flyci-macos-large-latest-m2]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: dependencies
run: pip3 install --break-system-packages mako && brew install orc
- name: configure
run: mkdir build && cd build && cmake -DBUILD_EXECUTABLE=ON ..
- name: build
run: cmake --build build --config Debug -j3
- name: Print info
run: |
./build/cpu_features/list_cpu_features
# ./build/apps/volk-config-info --alignment
# ./build/apps/volk-config-info --avail-machines
# ./build/apps/volk-config-info --all-machines
# ./build/apps/volk-config-info --malloc
# ./build/apps/volk-config-info --cc
- name: test
run: cd build && ctest -V


- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: dependencies
run: pip3 install --break-system-packages mako && brew install orc
- name: configure
run: mkdir build && cd build && cmake -DBUILD_EXECUTABLE=ON ..
- name: build
run: cmake --build build --config Debug -j3
- name: Print info
run: |
./build/cpu_features/list_cpu_features
# ./build/apps/volk-config-info --alignment
# ./build/apps/volk-config-info --avail-machines
# ./build/apps/volk-config-info --all-machines
# ./build/apps/volk-config-info --malloc
# ./build/apps/volk-config-info --cc
- name: test
run: cd build && ctest -V

0 comments on commit 752fbab

Please sign in to comment.