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 for downstream builds #43

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
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
53 changes: 53 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This file is part of covfie, a part of the ACTS project
#
# Copyright (c) 2022 CERN
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.

name: Downstream Build Tests

on: [ push, pull_request ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
linux-core:
name: "Linux"

runs-on: "ubuntu-latest"

container: ubuntu:24.04

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: apt-get update && apt-get -y install
libboost-filesystem-dev
libboost-program-options-dev
libboost-log-dev
wget
cmake
g++
- name: Configure covfie
run: cmake
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD }}
-DCOVFIE_FAIL_ON_WARNINGS=TRUE
-DCMAKE_CXX_STANDARD=20
-S $GITHUB_WORKSPACE
-B build_covfie
- name: Build covfie
run: cmake --build build_covfie -- -j $(nproc)
- name: Install covfie
run: cmake --install build_covfie --prefix "$GITHUB_WORKSPACE/.prefixes/covfie/"
- name: Configure downstream
run: cmake
-DCMAKE_CXX_STANDARD=20
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/.prefixes/covfie/"
-S $GITHUB_WORKSPACE/tests/downstream
-B build_downstream
- name: Build downstream
run: VERBOSE=1 cmake --build build_downstream -- -j $(nproc)
37 changes: 37 additions & 0 deletions tests/downstream/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file is part of covfie, a part of the ACTS project
#
# Copyright (c) 2022 CERN
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.

cmake_minimum_required(VERSION 3.18)

project("covfie_downstream" VERSION 0.0.0)

find_package(covfie REQUIRED)

add_executable(main main.cpp)

target_link_libraries(
main
covfie::core
covfie::cpu
)

if(TARGET core)
message(FATAL_ERROR "Target `core` should not exist.")
endif()

if(TARGET cpu)
message(FATAL_ERROR "Target `cpu` should not exist.")
endif()

if(TARGET benchmark_cpu)
message(FATAL_ERROR "Target `benchmark_cpu` should not exist.")
endif()

if(TARGET test_core)
message(FATAL_ERROR "Target `test_core` should not exist.")
endif()
16 changes: 16 additions & 0 deletions tests/downstream/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* This file is part of covfie, a part of the ACTS project
*
* Copyright (c) 2022 CERN
*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*/

#include <covfie/core/field.hpp>

int main(int argc, char ** argv)
{
return 0;
}
Loading