-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a new CI job that tests whether covfie can be used as a dependency in a downstream project.
- Loading branch information
1 parent
7f4bbb6
commit 042c708
Showing
3 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |