Skip to content
Snippets Groups Projects
Verified Commit 728a16d4 authored by Lars Bilke's avatar Lars Bilke
Browse files

[ci] Fixed correct artifact archival.

parent 1c17b1e5
No related branches found
No related tags found
No related merge requests found
Subproject commit dddaa761c9c20ec3bd79995a722e20ad15c40edb
Subproject commit 711460bb9573fb89527f98679af904b67d62e9b6
......@@ -6,15 +6,18 @@
before_script:
- "echo \"For debugging run: docker run --rm -it -v $CI_BUILDS_DIR:/builds -w=$CI_PROJECT_DIR $CI_JOB_IMAGE\""
- build_dir=${BUILD_DIR:-../build/$CMAKE_PRESET}
- rm -rf $build_dir
- mkdir -p $build_dir
- ln -s ../build .
- build_dir=${BUILD_DIR:-$CMAKE_PRESET}
- build_dir_full=../build/${build_dir}
- rm -rf $build_dir_full
- mkdir -p $build_dir_full
- mkdir build
- if [[ "$OSTYPE" == "darwin"* ]] ; then readlink_cmd=greadlink; else readlink_cmd=readlink; fi
- ln -s `$readlink_cmd -f $build_dir_full` build/${build_dir}
- ([ "${CONAN_USER_HOME}" == "${CI_PROJECT_DIR}/.conan" ]) && conan remove --system-reqs '*'
- ([[ $BUILD_CTEST_LARGE_ON_MASTER && "${CI_COMMIT_BRANCH}" == "master" && "${CMAKE_ARGS}" == *"USE_PYTHON=ON"* ]]) && export BUILD_CTEST_LARGE=true
script:
- cmake -S . --preset=$CMAKE_PRESET $CMAKE_ARGS -DOGS_BUILD_PROCESSES=$BUILD_PROCESSES
- cd $build_dir
- cmake -S . -B $build_dir_full --preset=$CMAKE_PRESET $CMAKE_ARGS -DOGS_BUILD_PROCESSES=$BUILD_PROCESSES
- cd $build_dir_full
- |
if [[ -z "$TARGETS" ]]; then
$BUILD_CMD_PREFIX cmake --build . --target package > >(tee make.output)
......
......@@ -8,17 +8,19 @@
dependencies: [meta]
variables:
script:
- $build_directory = if ($env:BUILD_DIR) { $env:BUILD_DIR } else { "..\build\" + $env:CMAKE_PRESET }
- (rm -r -fo $build_directory)
- cmd /c if not exist $build_directory mkdir $build_directory
- $build_directory = if ($env:BUILD_DIR) { $env:BUILD_DIR } else { $env:CMAKE_PRESET }
- $build_directory_full = "..\build\" + $build_directory
- (rm -r -fo $build_directory_full)
- cmd /c if not exist $build_directory_full mkdir $build_directory_full
- mkdir build
# Create symlink https://stackoverflow.com/a/34905638/80480
- cmd /c mklink /D build ..\build
- $cmake_cmd = "cmake -S . --preset=$env:CMAKE_PRESET
- cmd /c mklink /D build\$build_directory $env:CI_PROJECT_DIR\$build_directory_full
- $cmake_cmd = "cmake -S . -B $build_directory_full --preset=$env:CMAKE_PRESET
$env:CMAKE_ARGS
-DOGS_BUILD_PROCESSES=$env:BUILD_PROCESSES"
- $cmake_cmd
- Invoke-Expression $cmake_cmd
- cd $build_directory
- cd $build_directory_full
- cmake --build . --target package | Tee-Object -FilePath make.output
- if($env:BUILD_TESTS -eq "true") { cmake --build . --target tests }
- if($env:BUILD_CTEST -eq "true") { cmake --build . --target ctest }
......
......@@ -47,7 +47,7 @@ build linux (no unity):
needs: [meta, "pre commit"]
timeout: 1h
variables:
BUILD_DIR: "../build/no-unity"
BUILD_DIR: "no-unity"
BUILD_TESTS: "false"
BUILD_CTEST: "false"
CMAKE_PRESET: release
......@@ -57,7 +57,6 @@ build linux (no unity):
-DOGS_USE_MFRONT=ON
-DOGS_USE_UNITY_BUILDS=OFF
-DOGS_USE_XDMF=ON
-B $BUILD_DIR
build linux (no deps, no procs):
image: $CONTAINER_GCC_IMAGE
......
......@@ -6,9 +6,8 @@ build mac:
- .test-artifacts
needs: [meta]
variables:
BUILD_DIR: "../build/mac-release"
BUILD_DIR: "mac-release"
CMAKE_PRESET: release
CMAKE_ARGS: >-
-DOGS_INSTALL_DEPENDENCIES=ON
-DOGS_USE_XDMF=ON
-B $BUILD_DIR
......@@ -7,14 +7,13 @@ build win:
- when: manual
allow_failure: true
variables:
BUILD_DIR: ..\build\win-release
BUILD_DIR: win-release
CMAKE_PRESET: release
CMAKE_ARGS: >-
-DOGS_CI_TESTRUNNER_REPEAT=1
-DOGS_$USE_PYTHON
-DOGS_USE_CONAN=AUTO
-DOGS_USE_XDMF=ON
-B $BUILD_DIR
parallel:
matrix:
- USE_PYTHON: ["USE_PYTHON=ON", "USE_PYTHON=OFF"]
......@@ -9,6 +9,7 @@ check header:
CMAKE_ARGS: "-DOGS_CHECK_HEADER_COMPILATION=ON -DOGS_BUILD_GUI=ON -DBUILD_SHARED_LIBS=ON"
image: $CONTAINER_GCC_GUI_IMAGE
script:
- rm -rf $BUILD_DIR
- mkdir -p $BUILD_DIR
- cd $BUILD_DIR
- >
......
......@@ -11,6 +11,7 @@ clang sanitizer:
image:
name: $CONTAINER_CLANG_IMAGE
script:
- rm -rf $BUILD_DIR
- mkdir -p $BUILD_DIR
- cd $BUILD_DIR
- >
......
......@@ -6,11 +6,10 @@ clang tidy:
variables:
BUILD_DIR: "../build/tidy"
CMAKE_ARGS: "-DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF -DCMAKE_CXX_CLANG_TIDY=clang-tidy-9"
image:
name: $CONTAINER_CLANG_IMAGE
script:
- rm -rf $BUILD_DIR
- mkdir -p $BUILD_DIR
- cd $BUILD_DIR
- >
......@@ -19,7 +18,6 @@ clang tidy:
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DOGS_BUILD_PROCESSES=$BUILD_PROCESSES
- cmake --build . > >(tee make.output)
artifacts:
# No report yet: https://gitlab.com/gitlab-org/gitlab/-/issues/3985
paths:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment