Skip to content
Open
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
8 changes: 8 additions & 0 deletions .github/micromamba_ci_environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: ci_environment
channels:
- conda-forge
dependencies:
- c-compiler
- ninja
- cmake
- zlib
37 changes: 36 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- master

jobs:
build:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -28,3 +28,38 @@ jobs:
run: |
cd build
make test

build_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install environment from environment.yml
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: .github/micromamba_ci_environment.yml

- name: Build
shell: cmd /C CALL {0}
run: |
call micromamba activate ci_environment

mkdir build
cd build
cmake -GNinja .. ^
-D CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
-D ENABLE_CONDA=ON ^
-D MULTI_SEMANTICS=ON ^
-D WITHOUT_COOKIEOPEN=ON

ninja

ninja install

- name: Test
shell: cmd /C call {0}
run: |
call micromamba activate ci_environment

set CTEST_OUTPUT_ON_FAILURE=1
cd build
ninja test
3 changes: 3 additions & 0 deletions ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ IF (WIN32)
ENDIF ()

SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext")
if (MSVC AND DISABLE_SHARED AND ENABLE_STATIC)
SET_TARGET_PROPERTIES(libsolvext PROPERTIES OUTPUT_NAME "solvext_static")
endif()
SET_TARGET_PROPERTIES(libsolvext PROPERTIES SOVERSION ${LIBSOLVEXT_SOVERSION})

INSTALL (FILES ${libsolvext_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv")
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ IF (WIN32)
ENDIF (WIN32)

SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv")
if (MSVC AND DISABLE_SHARED AND ENABLE_STATIC)
SET_TARGET_PROPERTIES(libsolv PROPERTIES OUTPUT_NAME "solv_static")
endif()

SET_TARGET_PROPERTIES(libsolv PROPERTIES SOVERSION ${LIBSOLV_SOVERSION})

INSTALL (FILES ${libsolv_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv")
Expand Down
2 changes: 1 addition & 1 deletion src/repo_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ write_compressed_blob(Repodata *data, void *blob, int len)
write_u8(data, clen);
write_blob(data, cpage, clen);
}
blob += chunk;
blob = (char*) blob + chunk;
len -= chunk;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/solvversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include "solvversion.h"

const char solv_version[] = LIBSOLV_VERSION_STRING;
int solv_version_major = LIBSOLV_VERSION_MAJOR;
int solv_version_minor = LIBSOLV_VERSION_MINOR;
int solv_version_patch = LIBSOLV_VERSION_PATCH;
const char solv_toolversion[] = LIBSOLV_TOOLVERSION;
SOLV_API const char solv_version[] = LIBSOLV_VERSION_STRING;
SOLV_API int solv_version_major = LIBSOLV_VERSION_MAJOR;
SOLV_API int solv_version_minor = LIBSOLV_VERSION_MINOR;
SOLV_API int solv_version_patch = LIBSOLV_VERSION_PATCH;
SOLV_API const char solv_toolversion[] = LIBSOLV_TOOLVERSION;
17 changes: 12 additions & 5 deletions src/solvversion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@
#define LIBSOLV_VERSION_PATCH @LIBSOLV_PATCH@
#define LIBSOLV_VERSION (LIBSOLV_VERSION_MAJOR * 10000 + LIBSOLV_VERSION_MINOR * 100 + LIBSOLV_VERSION_PATCH)

extern const char solv_version[];
extern int solv_version_major;
extern int solv_version_minor;
extern int solv_version_patch;
extern const char solv_toolversion[];
#ifdef _WIN32
// include win32/config.h for SOLV_API
#include "config.h"
#else
#define SOLV_API
#endif

SOLV_API extern const char solv_version[];
SOLV_API extern int solv_version_major;
SOLV_API extern int solv_version_minor;
SOLV_API extern int solv_version_patch;
SOLV_API extern const char solv_toolversion[];

#cmakedefine LIBSOLV_FEATURE_LINKED_PKGS
#cmakedefine LIBSOLV_FEATURE_COMPLEX_DEPS
Expand Down
5 changes: 4 additions & 1 deletion win32/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/win32)

SET (WIN32_COMPAT_SOURCES
${PROJECT_SOURCE_DIR}/win32/fnmatch.c
${PROJECT_SOURCE_DIR}/win32/getopt.c
${PROJECT_SOURCE_DIR}/win32/regcomp.c
${PROJECT_SOURCE_DIR}/win32/regexec.c
${PROJECT_SOURCE_DIR}/win32/strfncs.c
${PROJECT_SOURCE_DIR}/win32/tre-mem.c
)
)

INSTALL (FILES ${PROJECT_SOURCE_DIR}/win32/config.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/solv")