From a8d1982f0414c5994d31dd46e2fd60e10d28d90f Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nicolas.pope@utu.fi> Date: Wed, 11 May 2022 10:40:11 +0100 Subject: [PATCH] Try powershell env vars --- .gitignore | 4 +++- .gitlab-ci.yml | 7 +++--- include/ftl/protocol/config.h | 45 ----------------------------------- 3 files changed, 6 insertions(+), 50 deletions(-) delete mode 100644 include/ftl/protocol/config.h diff --git a/.gitignore b/.gitignore index c795b05..3721ede 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -build \ No newline at end of file +build +**/config.cpp +**/config.h \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d315eea..72fd2c0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,6 @@ code_quality: only: - main - merge_requests - - tags tags: - docker script: @@ -121,7 +120,7 @@ linux:pack: tags: - docker - needs: ["linux:build"] + dependencies: ["linux:build"] script: - DEBIAN_FRONTEND=noninteractive apt update && apt install -y libmsgpackc2 liburiparser1 cmake file - cd build @@ -160,7 +159,7 @@ windows:build: - if (Test-Path build) { Remove-Item build/ -Recurse } - mkdir build - cd build - - cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DFTL_VERSION=%CI_COMMIT_TAG% -DWITH_GNUTLS=TRUE -DGNUTLS_INCLUDE_DIR="C:/Build/bin/gnutls/lib/includes/" -DGNUTLS_LIBRARY="C:/Build/bin/gnutls/lib/libgnutls.dll.a" .. + - cmake -DCMAKE_GENERATOR_PLATFORM=x64 -DFTL_VERSION=$Env:CI_COMMIT_TAG -DWITH_GNUTLS=TRUE -DGNUTLS_INCLUDE_DIR="C:/Build/bin/gnutls/lib/includes/" -DGNUTLS_LIBRARY="C:/Build/bin/gnutls/lib/libgnutls.dll.a" .. - '& MSBuild.exe beyond-protocol.sln -property:Configuration=Release -nr:false -maxCpuCount' windows:test: @@ -193,7 +192,7 @@ windows:pack: tags: - windows - needs: ["windows:build"] + dependencies: ["windows:build"] cache: # use artifacts instead if multiple runners available key: $CI_COMMIT_SHORT_SHA diff --git a/include/ftl/protocol/config.h b/include/ftl/protocol/config.h deleted file mode 100644 index 5669bae..0000000 --- a/include/ftl/protocol/config.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @file config.h - * @copyright Copyright (c) 2020 University of Turku, MIT License - * @author Nicolas Pope - * - * To be CMake processed - */ - -#pragma once - -#ifdef WIN32 -#ifdef BUILD_SHARED -#define FTLEXPORT __declspec(dllexport) -#else -#define FTLEXPORT __declspec(dllimport) -#endif -#else // WIN32 -#define FTLEXPORT -#endif - -/* #undef HAVE_URIPARSESINGLE */ -/* #undef HAVE_LIBARCHIVE */ -#define HAVE_GNUTLS -/* #undef HAVE_PYTHON */ - -/* #undef ENABLE_PROFILER */ - -extern const char *FTL_BRANCH; -extern const char *FTL_VERSION_LONG; -extern const char *FTL_VERSION; -extern const int FTL_VERSION_MAJOR; -extern const int FTL_VERSION_MINOR; -extern const int FTL_VERSION_PATCH; -extern const int FTL_VERSION_COMMITS; -extern const char *FTL_VERSION_SHA1; - -#define FTL_SOURCE_DIRECTORY "/home/nick/repos/beyond-protocol" - -#define FTL_LOCAL_CONFIG_ROOT "/home/nick/.config/ftl" -#define FTL_LOCAL_CACHE_ROOT "/home/nick/.cache/ftl" -#define FTL_LOCAL_DATA_ROOT "/home/nick/.local/share/ftl" - -#define FTL_GLOBAL_CONFIG_ROOT "install/share/ftl" -#define FTL_GLOBAL_CACHE_ROOT "install/share/ftl" -#define FTL_GLOBAL_DATA_ROOT "install/share/ftl" -- GitLab