Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests to conda-forge job #3264

Closed
wants to merge 9 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 28 additions & 16 deletions .github/workflows/conda-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'

env:
CONDA_FORGE_TESTS_TO_RUN: INTEGRATION_transport_msg_count


jobs:
build:
name: '[${{ matrix.os }}@${{ matrix.build_type }}@conda]'
Expand Down Expand Up @@ -67,40 +71,48 @@ jobs:
run: |
mkdir -p build
cd build
cmake -GNinja -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
cmake -GNinja -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX ..

- name: Build [Linux&macOS]
- name: Build and Install [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd build
# Workaround for https://github.com/osrf/gazebo/issues/3265
cmake --build . --config ${{ matrix.build_type }} --target gazebo_msgs
cmake --build . --config ${{ matrix.build_type }}
cmake --install . --config ${{ matrix.build_type }}

# - name: Test [Linux&macOS]
# if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
# shell: bash -l {0}
# run: |
# cd build
# ctest --output-on-failure -C ${{ matrix.build_type }}
- name: Test [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd build
ctest --output-on-failure -C ${{ matrix.build_type }} -R "$CONDA_FORGE_TESTS_TO_RUN"

- name: Configure [Windows]
if: contains(matrix.os, 'windows')
shell: cmd /C call {0}
run: |
mkdir -p build
cd build
cmake -GNinja -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
cmake -GNinja -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON ..

- name: Build [Windows]
- name: Build and Install [Windows]
if: contains(matrix.os, 'windows')
shell: cmd /C call {0}
run: |
cd build
# Workaround for https://github.com/osrf/gazebo/issues/3265
cmake --build . --config ${{ matrix.build_type }} --target gazebo_msgs
cmake --build . --config ${{ matrix.build_type }} --parallel 2
cmake --install . --config ${{ matrix.build_type }}

# - name: Test [Windows]
# if: contains(matrix.os, 'windows')
# shell: cmd /C call {0}
# run: |
# cd build
# ctest --output-on-failure -C ${{ matrix.build_type }}
- name: Test [Windows]
if: contains(matrix.os, 'windows')
shell: cmd /C call {0}
run: |
cd build
# Make sure that gtest shared library is found correctly
set PATH=%PATH%;%CD%\test
ctest --output-on-failure -C ${{ matrix.build_type }} -R "%CONDA_FORGE_TESTS_TO_RUN%"