File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- build /
1+ build * /
22__pycache__ /
33.env
44/public
55* .cpython *
66.github /* .md
7+ .gitlab-ci-local
Original file line number Diff line number Diff line change @@ -26,6 +26,25 @@ Compile on Linux:
2626 - build/
2727 when : always
2828
29+ Compile on Linux (local ANAGATE archive) :
30+ stage : unstagged
31+ image : $ALMA_LATEST_IMAGE
32+ script :
33+ - ' curl --fail --location --header "PRIVATE-TOKEN: ${ICS_REPO_DEPS_TOKEN}" -o /tmp/anagate.zip "https://ics-deps-repo.web.cern.ch/canmodule/anagate/20241023/AnaGateAPI-CAN-2.5-BETA-3.zip"'
34+ - cmake -B build-anagate-local -DANAGATE_LIBRARY=/tmp/anagate.zip
35+ - cmake --build build-anagate-local --config Release
36+
37+ Compile on Windows (local ANAGATE archive) :
38+ stage : unstagged
39+ image : $WINDOWS_LATEST_IMAGE
40+ tags :
41+ - win2025-container
42+ script :
43+ - $anagateZip = Join-Path $env:TEMP 'anagate.zip'
44+ - Invoke-WebRequest -Headers @{ 'PRIVATE-TOKEN' = $env:ICS_REPO_DEPS_TOKEN } -OutFile $anagateZip -Uri 'https://ics-deps-repo.web.cern.ch/canmodule/anagate/20241023/AnaGateAPI-CAN-2.5-BETA-3.zip'
45+ - cmake -B build-anagate-local "-DANAGATE_LIBRARY=$anagateZip"
46+ - cmake --build build-anagate-local --config Release
47+
2948Google Tests on Windows :
3049 stage : unstagged
3150 image : $WINDOWS_LATEST_IMAGE
Original file line number Diff line number Diff line change 11include (FetchContent )
22
3- set (ANAGATE_LIBRARY "https://ics-deps-repo.web.cern.ch/canmodule/anagate/20241023/AnaGateAPI-CAN-2.5-BETA-3.zip" )
4-
5- if (NOT DEFINED ENV{ICS_REPO_DEPS_TOKEN})
6- message (FATAL_ERROR "Environment variable ICS_REPO_DEPS_TOKEN is not set. Please set this variable to proceed." )
3+ if (NOT DEFINED ANAGATE_LIBRARY)
4+ set (ANAGATE_LIBRARY "https://ics-deps-repo.web.cern.ch/canmodule/anagate/20241023/AnaGateAPI-CAN-2.5-BETA-3.zip" )
75endif ()
86
9- message (STATUS "Download URL: ${ANAGATE_LIBRARY} " )
7+ set (ANAGATE_FETCHCONTENT_ARGS
8+ URL "${ANAGATE_LIBRARY} "
9+ DOWNLOAD_EXTRACT_TIMESTAMP True
10+ )
11+
12+ if (EXISTS "${ANAGATE_LIBRARY} " )
13+ message (STATUS "Using local Anagate archive: ${ANAGATE_LIBRARY} " )
14+ elseif (ANAGATE_LIBRARY MATCHES "^https?://" )
15+ if (DEFINED ENV{ICS_REPO_DEPS_TOKEN} AND NOT "$ENV{ICS_REPO_DEPS_TOKEN} " STREQUAL "" )
16+ message (STATUS "Downloading Anagate archive with authentication: ${ANAGATE_LIBRARY} " )
17+ list (APPEND ANAGATE_FETCHCONTENT_ARGS
18+ HTTP_HEADER "PRIVATE-TOKEN: $ENV{ICS_REPO_DEPS_TOKEN} "
19+ )
20+ else ()
21+ message (STATUS "Downloading Anagate archive without authentication: ${ANAGATE_LIBRARY} " )
22+ endif ()
23+ else ()
24+ message (FATAL_ERROR "ANAGATE_LIBRARY must be an existing local archive or an http(s) URL. Got: ${ANAGATE_LIBRARY} " )
25+ endif ()
1026
1127FetchContent_Declare (
1228 Anagate
13- URL ${ANAGATE_LIBRARY}
14- HTTP_HEADER "PRIVATE-TOKEN: $ENV{ICS_REPO_DEPS_TOKEN} "
15- DOWNLOAD_EXTRACT_TIMESTAMP True
29+ ${ANAGATE_FETCHCONTENT_ARGS}
1630)
1731
1832FetchContent_MakeAvailable (Anagate)
You can’t perform that action at this time.
0 commit comments