mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
Merge mostly fixing CI builds
This commit is contained in:
commit
115ff7ff74
40
.travis.yml
40
.travis.yml
@ -10,7 +10,7 @@ matrix:
|
|||||||
- scripts/docker/docker_travis.sh "ubuntu_latest.docker"
|
- scripts/docker/docker_travis.sh "ubuntu_latest.docker"
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env: NAME="Fedora Linux (Latest)" NAME_SUFFIX="fedora-llvm" TEST_COVERAGE=1
|
env: NAME="Fedora Linux (Latest)" NAME_SUFFIX="fedora-llvm"
|
||||||
services: docker
|
services: docker
|
||||||
script:
|
script:
|
||||||
- scripts/docker/docker_travis.sh "fedora_latest.docker"
|
- scripts/docker/docker_travis.sh "fedora_latest.docker"
|
||||||
@ -20,25 +20,25 @@ matrix:
|
|||||||
services: docker
|
services: docker
|
||||||
script:
|
script:
|
||||||
- scripts/docker/docker_travis.sh "arch_latest.docker"
|
- scripts/docker/docker_travis.sh "arch_latest.docker"
|
||||||
- os: linux
|
# - os: linux
|
||||||
compiler: gcc
|
# compiler: gcc
|
||||||
env: NAME="conan" NAME_SUFFIX="conan" USE_CONAN=1
|
# env: NAME="conan" NAME_SUFFIX="conan" USE_CONAN=1
|
||||||
script:
|
# script:
|
||||||
- scripts/docker/docker_travis.sh "conan_base.docker"
|
# - scripts/docker/docker_travis.sh "conan_base.docker"
|
||||||
- os: osx
|
# - os: osx
|
||||||
compiler: clang
|
# compiler: clang
|
||||||
env: NAME="Apple macOS" NAME_SUFFIX="mac"
|
# env: NAME="Apple macOS" NAME_SUFFIX="mac"
|
||||||
osx_image: xcode10.1
|
# osx_image: xcode10.1
|
||||||
install:
|
# install:
|
||||||
- brew update
|
# - brew update
|
||||||
- /usr/bin/yes | pip2 uninstall numpy # see https://github.com/travis-ci/travis-ci/issues/6688
|
# - /usr/bin/yes | pip2 uninstall numpy # see https://github.com/travis-ci/travis-ci/issues/6688
|
||||||
- brew upgrade python
|
# - brew upgrade python
|
||||||
- brew upgrade
|
# - brew upgrade
|
||||||
- brew install boost cmake bullet ffmpeg glm openal-soft qt5 sdl2 jack freetype
|
# - brew install boost cmake bullet ffmpeg glm openal-soft qt5 sdl2 jack freetype
|
||||||
- export PATH="/usr/local/opt/qt/bin:$PATH"
|
# - export PATH="/usr/local/opt/qt/bin:$PATH"
|
||||||
script:
|
# script:
|
||||||
- mkdir -p "$TRAVIS_BUILD_DIR/build"
|
# - mkdir -p "$TRAVIS_BUILD_DIR/build"
|
||||||
- ctest -VV -S "$TRAVIS_BUILD_DIR/cmake/ctest/script_ci.ctest"
|
# - ctest -VV -S "$TRAVIS_BUILD_DIR/cmake/ctest/script_ci.ctest"
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
@ -29,9 +29,6 @@ if(USE_CONAN)
|
|||||||
else()
|
else()
|
||||||
find_package(Boost REQUIRED)
|
find_package(Boost REQUIRED)
|
||||||
find_package(Boost COMPONENTS program_options system REQUIRED)
|
find_package(Boost COMPONENTS program_options system REQUIRED)
|
||||||
if(FILESYSTEM_LIBRARY STREQUAL "BOOST")
|
|
||||||
find_package(Boost COMPONENTS filesystem system REQUIRED)
|
|
||||||
endif()
|
|
||||||
if(BUILD_TESTS)
|
if(BUILD_TESTS)
|
||||||
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
|
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
@ -12,7 +12,7 @@ this it will not be possible to play.
|
|||||||
|
|
||||||
Windows | Linux | macOS | coverage
|
Windows | Linux | macOS | coverage
|
||||||
---| --- | --- | ---
|
---| --- | --- | ---
|
||||||
[![Build status](https://ci.appveyor.com/api/projects/status/k33qf9ssrja6ckx8/branch/master?svg=true)](https://ci.appveyor.com/project/rwengine/openrw/branch/master) | [![Build Status](https://travis-ci.com/rwengine/openrw.svg?branch=master)](https://travis-ci.com/rwengine/openrw) | [![Build Status](https://travis-ci.com/rwengine/openrw.svg?branch=master)](https://travis-ci.com/rwengine/openrw) | [![codecov](https://codecov.io/gh/rwengine/openrw/branch/master/graph/badge.svg)](https://codecov.io/gh/rwengine/openrw)
|
[![Build status](https://ci.appveyor.com/api/projects/status/k33qf9ssrja6ckx8/branch/master?svg=true)](https://ci.appveyor.com/project/rwengine/openrw/branch/master) | [![Build Status](https://app.travis-ci.com/rwengine/openrw.svg?branch=master)](https://app.travis-ci.com/rwengine/openrw) | [disabled](https://github.com/rwengine/openrw/commit/f8483d190588a159f65c1c3ffb153e20888347b8) | [![codecov](https://codecov.io/gh/rwengine/openrw/branch/master/graph/badge.svg)](https://codecov.io/gh/rwengine/openrw)
|
||||||
|
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
@ -126,11 +126,6 @@ elseif(FILESYSTEM_LIBRARY STREQUAL "CXXTS")
|
|||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
target_link_libraries(rw_interface INTERFACE "stdc++fs")
|
target_link_libraries(rw_interface INTERFACE "stdc++fs")
|
||||||
endif()
|
endif()
|
||||||
elseif(FILESYSTEM_LIBRARY STREQUAL "BOOST")
|
|
||||||
target_compile_definitions(rw_interface INTERFACE "RW_FS_LIBRARY=2")
|
|
||||||
target_link_libraries(rw_interface INTERFACE
|
|
||||||
Boost::filesystem
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Illegal FILESYSTEM_LIBRARY option. (was '${FILESYSTEM_LIBRARY}')")
|
message(FATAL_ERROR "Illegal FILESYSTEM_LIBRARY option. (was '${FILESYSTEM_LIBRARY}')")
|
||||||
endif()
|
endif()
|
||||||
|
@ -12,8 +12,8 @@ option(TEST_DATA "Enable tests that require game data")
|
|||||||
set(FAILED_CHECK_ACTION "IGNORE" CACHE STRING "What action to perform on a failed RW_CHECK (in debug mode)")
|
set(FAILED_CHECK_ACTION "IGNORE" CACHE STRING "What action to perform on a failed RW_CHECK (in debug mode)")
|
||||||
set_property(CACHE FAILED_CHECK_ACTION PROPERTY STRINGS "IGNORE" "ABORT" "BREAKPOINT")
|
set_property(CACHE FAILED_CHECK_ACTION PROPERTY STRINGS "IGNORE" "ABORT" "BREAKPOINT")
|
||||||
|
|
||||||
set(FILESYSTEM_LIBRARY "BOOST" CACHE STRING "Which filesystem library to use")
|
set(FILESYSTEM_LIBRARY "CXX17" CACHE STRING "Which filesystem library to use")
|
||||||
set_property(CACHE FILESYSTEM_LIBRARY PROPERTY STRINGS "CXX17" "CXXTS" "BOOST")
|
set_property(CACHE FILESYSTEM_LIBRARY PROPERTY STRINGS "CXX17" "CXXTS")
|
||||||
|
|
||||||
set(CMAKE_CONFIGURATION_TYPES "Release;Debug;RelWithDebInfo;MinSizeRel" CACHE INTERNAL "Build types supported by this project.")
|
set(CMAKE_CONFIGURATION_TYPES "Release;Debug;RelWithDebInfo;MinSizeRel" CACHE INTERNAL "Build types supported by this project.")
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#define RW_FS_CXX17 0
|
#define RW_FS_CXX17 0
|
||||||
#define RW_FS_CXXTS 1
|
#define RW_FS_CXXTS 1
|
||||||
#define RW_FS_BOOST 2
|
|
||||||
|
|
||||||
#if RW_FS_LIBRARY == RW_FS_CXX17
|
#if RW_FS_LIBRARY == RW_FS_CXX17
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
@ -19,33 +18,6 @@ namespace rwfs {
|
|||||||
using namespace std::experimental::filesystem;
|
using namespace std::experimental::filesystem;
|
||||||
using error_code = std::error_code;
|
using error_code = std::error_code;
|
||||||
}
|
}
|
||||||
#elif RW_FS_LIBRARY == RW_FS_BOOST
|
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <boost/functional/hash.hpp>
|
|
||||||
#include <boost/system/error_code.hpp>
|
|
||||||
namespace rwfs {
|
|
||||||
using namespace boost::filesystem;
|
|
||||||
using error_code = boost::system::error_code;
|
|
||||||
}
|
|
||||||
#include <boost/version.hpp>
|
|
||||||
#if BOOST_VERSION < 105600
|
|
||||||
namespace boost {
|
|
||||||
namespace filesystem {
|
|
||||||
inline const directory_iterator& begin(const directory_iterator& iter) {
|
|
||||||
return iter;
|
|
||||||
}
|
|
||||||
inline directory_iterator end(const directory_iterator&) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
inline const recursive_directory_iterator& begin(const recursive_directory_iterator& iter) {
|
|
||||||
return iter;
|
|
||||||
}
|
|
||||||
inline recursive_directory_iterator end(const recursive_directory_iterator&) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#error Invalid RW_FS_LIBRARY value
|
#error Invalid RW_FS_LIBRARY value
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
FROM archlinux/base
|
FROM archlinux:base
|
||||||
|
|
||||||
|
# Work-around the issue with glibc 2.33 on old Docker engines
|
||||||
|
# Extract files directly as pacman is also affected by the issue
|
||||||
|
# https://github.com/lxqt/lxqt-panel/pull/1562 and
|
||||||
|
# https://github.com/actions/virtual-environments/issues/2658
|
||||||
|
RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && \
|
||||||
|
curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc" && \
|
||||||
|
bsdtar -C / -xf $patched_glibc
|
||||||
|
|
||||||
RUN pacman -Syy --noconfirm \
|
RUN pacman -Syy --noconfirm \
|
||||||
core/gcc \
|
core/gcc \
|
||||||
|
@ -22,7 +22,7 @@ RUN dnf update -y \
|
|||||||
glm-devel \
|
glm-devel \
|
||||||
openal-soft-devel \
|
openal-soft-devel \
|
||||||
SDL2-devel \
|
SDL2-devel \
|
||||||
qt5-devel \
|
qt5-qtbase-devel \
|
||||||
freetype-devel \
|
freetype-devel \
|
||||||
libasan \
|
libasan \
|
||||||
&& ln -s /usr/bin/python3 /usr/bin/python
|
&& ln -s /usr/bin/python3 /usr/bin/python
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
FROM ubuntu:rolling
|
FROM ubuntu:latest
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install --no-install-recommends --no-upgrade -y \
|
&& apt-get install --no-install-recommends --no-upgrade -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
gcc-7 \
|
gcc \
|
||||||
g++-7 \
|
g++ \
|
||||||
clang-6.0 \
|
clang \
|
||||||
llvm \
|
llvm \
|
||||||
lcov \
|
lcov \
|
||||||
curl \
|
curl \
|
||||||
@ -23,10 +25,6 @@ RUN apt-get update \
|
|||||||
libqt5opengl5-dev \
|
libqt5opengl5-dev \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
iwyu \
|
iwyu \
|
||||||
qt5-default \
|
qt5-default
|
||||||
&& apt-get clean \
|
|
||||||
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 60 \
|
|
||||||
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
|
|
||||||
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-7 60
|
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
CMD ["/bin/bash"]
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
#include <rw/debug.hpp>
|
#include <rw/debug.hpp>
|
||||||
#include <rw/filesystem.hpp>
|
#include <rw/filesystem.hpp>
|
||||||
@ -92,7 +93,8 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static rwfs::path getRandomFilePath(const rwfs::path &dirname) {
|
static rwfs::path getRandomFilePath(const rwfs::path &dirname) {
|
||||||
return rwfs::unique_path(dirname / "openrw_test_%%%%%%%%%%%%%%%%");
|
const long current_time = std::chrono::high_resolution_clock::now().time_since_epoch().count();
|
||||||
|
return dirname / ("openrw_test_" + std::to_string(current_time));
|
||||||
}
|
}
|
||||||
static rwfs::path getRandomFilePath() {
|
static rwfs::path getRandomFilePath() {
|
||||||
return getRandomFilePath(rwfs::temp_directory_path());
|
return getRandomFilePath(rwfs::temp_directory_path());
|
||||||
@ -113,15 +115,15 @@ public:
|
|||||||
}
|
}
|
||||||
virtual void change_perms_normal() const override {
|
virtual void change_perms_normal() const override {
|
||||||
rwfs::permissions(this->path(),
|
rwfs::permissions(this->path(),
|
||||||
rwfs::perms::owner_read | rwfs::perms::owner_write | rwfs::perms::owner_exe |
|
rwfs::perms::owner_read | rwfs::perms::owner_write | rwfs::perms::owner_exec |
|
||||||
rwfs::perms::group_read | rwfs::perms::group_exe |
|
rwfs::perms::group_read | rwfs::perms::group_exec |
|
||||||
rwfs::perms::others_read | rwfs::perms::others_exe);
|
rwfs::perms::others_read | rwfs::perms::others_exec);
|
||||||
}
|
}
|
||||||
virtual void change_perms_readonly() const override {
|
virtual void change_perms_readonly() const override {
|
||||||
rwfs::permissions(this->path(),
|
rwfs::permissions(this->path(),
|
||||||
rwfs::perms::owner_read | rwfs::perms::owner_exe |
|
rwfs::perms::owner_read | rwfs::perms::owner_exec |
|
||||||
rwfs::perms::group_read | rwfs::perms::group_exe |
|
rwfs::perms::group_read | rwfs::perms::group_exec |
|
||||||
rwfs::perms::others_read | rwfs::perms::others_exe);
|
rwfs::perms::others_read | rwfs::perms::others_exec);
|
||||||
}
|
}
|
||||||
virtual void remove() const override {
|
virtual void remove() const override {
|
||||||
// Remove may fail if this directory contains a read-only entry. Ignore.
|
// Remove may fail if this directory contains a read-only entry. Ignore.
|
||||||
|
Loading…
Reference in New Issue
Block a user