Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 2bef80e
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 20:11:36 2021 +0200

    wip

commit e8c063d
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 20:05:04 2021 +0200

    wip

commit aafdebf
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 19:50:39 2021 +0200

    wip

commit b36f136
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 18:05:35 2021 +0200

    wip

commit eee1918
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 17:32:35 2021 +0200

    more wip

commit 0ff949a
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 17:12:18 2021 +0200

    wip

commit ca68861
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 16:31:32 2021 +0200

    wip

commit e188a3d
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 16:21:51 2021 +0200

    wip

commit b8383ac
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 16:15:42 2021 +0200

    Workflow wip...

commit 162416f
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 15:57:31 2021 +0200

    Workflow wip...

commit 891be4c
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 15:52:24 2021 +0200

    Workflow wip...

commit 5c2ee65
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 15:44:59 2021 +0200

    Workflow wip...

commit bca8df0
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 15:40:23 2021 +0200

    Workflow wip...

commit d94d8de
Author: Steffen Schuemann <[email protected]>
Date:   Sun Jul 4 15:34:16 2021 +0200

    Workflow wip...

commit 19f3019
Author: Steffen Schuemann <[email protected]>
Date:   Sat Jul 3 21:54:11 2021 +0200

    Workflow wip...

commit 4954577
Author: Steffen Schuemann <[email protected]>
Date:   Sat Jul 3 18:38:04 2021 +0200

    workflow wip

commit fde42cd
Author: Steffen Schuemann <[email protected]>
Date:   Sat Jul 3 18:34:47 2021 +0200

    Testing more generic workflow.

commit ead40cc
Author: Steffen Schuemann <[email protected]>
Date:   Sat Jul 3 16:51:25 2021 +0200

    Work on using GitHub workflows.
  • Loading branch information
gulrak committed Jul 4, 2021
1 parent 1d3d5f5 commit d87ac13
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 104 deletions.
197 changes: 197 additions & 0 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
name: CMake Build Matrix

on: [ push, pull_request ]

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: "Ubuntu 20.04 GCC 9.3"
os: ubuntu-20.04
build_type: Release
packages: ninja-build
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
cc: gcc
cxx: g++

- name: "Ubuntu 20.04 Clang 10.0"
os: ubuntu-20.04
build_type: Release
packages: ninja-build
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
cc: clang-10
cxx: clang++-10

- name: "Ubuntu 20.04 Clang 11.0"
os: ubuntu-20.04
build_type: Release
packages: ninja-build clang-11 libc++-11-dev libc++abi-11-dev
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
cc: clang-11
cxx: clang++-11

- name: "Ubuntu 20.04 GCC 9.3 coverage"
os: ubuntu-20.04
build_type: Debug
packages: ninja-build lcov
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
cc: gcc
cxx: g++

- name: "Ubuntu 18.04 GCC 8.4"
os: ubuntu-18.04
build_type: Release
packages: ninja-build gcc-8 g++-8
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17"
cc: gcc-8
cxx: g++-8

- name: "Ubuntu 18.04 GCC 7.5"
os: ubuntu-18.04
build_type: Release
packages: ninja-build
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17"
cc: gcc-7
cxx: g++-7

- name: "Ubuntu 18.04 GCC 6.5"
os: ubuntu-18.04
build_type: Release
packages: ninja-build gcc-6 g++-6
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17"
cc: gcc-6
cxx: g++-6

- name: "Ubuntu 18.04 GCC 5.5"
os: ubuntu-18.04
build_type: Release
packages: ninja-build gcc-5 g++-5
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17"
cc: gcc-5
cxx: g++-5

- name: "Ubuntu 18.04 Clang 9.0"
os: ubuntu-18.04
build_type: Release
packages: ninja-build libc++-9-dev libc++abi-9-dev
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
cc: clang
cxx: clang++

- name: "Ubuntu 16.04 Clang 6.0"
os: ubuntu-16.04
build_type: Release
packages: ninja-build clang-6.0
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17"
cc: clang-6.0
cxx: clang++-6.0

- name: "Ubuntu 16.04 Clang 5.0"
os: ubuntu-16.04
build_type: Release
packages: ninja-build clang-5.0
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17"
cc: clang-5.0
cxx: clang++-5.0

- name: "Windows MSVC 2019"
os: windows-latest
build_type: Release
packages: ninja
generator: "Visual Studio 16 2019"
compatibility: "cxx_std_11;cxx_std_17;cxx_std_20"
cc: cl
cxx: cl

- name: "macOS 10.15 AppleClang"
os: macos-10.15
build_type: Release
packages: ninja
generator: Ninja
compatibility: "cxx_std_11;cxx_std_17"
cc: clang
cxx: clang++

steps:
- uses: actions/checkout@v2

- name: print environment
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies on Ubuntu
if: startsWith(matrix.config.os, 'ubuntu')
shell: bash
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install ${{ matrix.config.packages }}
- name: Install dependencies on windows
if: startsWith(matrix.config.os, 'windows')
run: |
choco install ${{ matrix.config.packages }}
- name: Install dependencies on macOS
if: startsWith(matrix.config.os, 'macos')
run: |
brew install ${{ matrix.config.packages }}
- name: Configure project
shell: bash
run: |
export CC=${{ matrix.config.cc }}
export CXX=${{ matrix.config.cxx }}
ninja --version
cmake --version
mkdir build
mkdir install
if [[ "${{ matrix.config.build_type }}" == "Debug" ]]; then
cmake -G "${{ matrix.config.generator }}" -S . -B build -DCMAKE_BUILD_TYPE=Debug -DGHC_COVERAGE=ON -DGHC_FILESYSTEM_TEST_COMPILE_FEATURES="${{ matrix.config.compatibility }}" -DCMAKE_INSTALL_PREFIX:PATH=install
else
cmake -G "${{ matrix.config.generator }}" -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGHC_FILESYSTEM_TEST_COMPILE_FEATURES="${{ matrix.config.compatibility }}" -DCMAKE_INSTALL_PREFIX:PATH=install
fi
- name: Build project
shell: bash
run: |
cmake --build build --config ${{ matrix.config.build_type }}
- name: Run tests
run: |
cd build && ctest -C ${{ matrix.config.build_type }}
- name: Collect coverage info
if: startsWith(matrix.config.build_type, 'Debug')
run: |
cd build
lcov --compat-libtool --directory . --capture --output-file coverage_output.info
lcov --remove coverage_output.info '/usr/*' '*/c++/*' '*.h' '*/catch.hpp' -o coverage.info
# sed -i 's|SF:/.*/filesystem/|SF:../|g' coverage.info
- name: Upload coverage info
if: startsWith(matrix.config.build_type, 'Debug')
env:
COVERALLS_DEBUG: true
NODE_COVERALLS_DEBUG: 1
uses: coverallsapp/github-action@master
with:
path-to-lcov: ${{ github.workspace }}/build/coverage.info
github-token: ${{ secrets.GITHUB_TOKEN }}

100 changes: 0 additions & 100 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ endif()
if(CMAKE_CXX_STANDARD LESS 11)
message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 11, ghc::filesystem only works with C++11 and above.")
endif()
message(STATUS "CMAKE_CXX_COMPILE_FEATURES: ${CMAKE_CXX_COMPILE_FEATURES}")

add_library(ghc_filesystem INTERFACE)
target_include_directories(ghc_filesystem INTERFACE
Expand Down
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,45 @@
![Supported Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows%20%7C%20FreeBSD-blue.svg)
![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
[![Build Status](https://travis-ci.org/gulrak/filesystem.svg?branch=master)](https://travis-ci.org/gulrak/filesystem)
[![CMake Build Matrix](https://github.com/gulrak/filesystem/actions/workflows/build_cmake.yml/badge.svg?branch=master)](https://github.com/gulrak/filesystem/actions/workflows/build_cmake.yml)
[![Build Status](https://ci.appveyor.com/api/projects/status/t07wp3k2cddo0hpo/branch/master?svg=true)](https://ci.appveyor.com/project/gulrak/filesystem)
[![Build Status](https://api.cirrus-ci.com/github/gulrak/filesystem.svg?branch=master)](https://cirrus-ci.com/github/gulrak/filesystem)
[![Build Status](https://cloud.drone.io/api/badges/gulrak/filesystem/status.svg?ref=refs/heads/master)](https://cloud.drone.io/gulrak/filesystem)
[![Coverage Status](https://coveralls.io/repos/github/gulrak/filesystem/badge.svg?branch=master)](https://coveralls.io/github/gulrak/filesystem?branch=master)
[![Latest Release Tag](https://img.shields.io/github/tag/gulrak/filesystem.svg)](https://github.com/gulrak/filesystem/tree/v1.5.8)

- [Filesystem](#filesystem)
- [Motivation](#motivation)
- [Why the namespace GHC?](#why-the-namespace-ghc)
- [Platforms](#platforms)
- [Tests](#tests)
- [Usage](#usage)
- [Downloads](#downloads)
- [Using it as Single-File-Header](#using-it-as-single-file-header)
- [Using it as Forwarding-/Implementation-Header](#using-it-as-forwarding-implementation-header)
- [Git Submodule and CMake](#git-submodule-and-cmake)
- [Versioning](#versioning)
- [Documentation](#documentation)
- [`ghc::filesystem::ifstream`, `ghc::filesystem::ofstream`, `ghc::filesystem::fstream`](#ghcfilesystemifstream-ghcfilesystemofstream-ghcfilesystemfstream)
- [`ghc::filesystem::u8arguments`](#ghcfilesystemu8arguments)
- [Differences](#differences)
- [LWG Defects](#lwg-defects)
- [Not Implemented on C++ before C++17](#not-implemented-on-c-before-c17)
- [Differences in API](#differences-in-api)
- [Differences of Specific Interfaces](#differences-of-specific-interfaces)
- [Differences in Behavior](#differences-in-behavior)
- [fs.path](#fspath-refhttpsencppreferencecomwcppfilesystempath)
- [Open Issues](#open-issues)
- [Windows](#windows)
- [Symbolic Links on Windows](#symbolic-links-on-windows)
- [Permissions](#permissions)
- [Release Notes](#release-notes)

# Filesystem

This is a header-only single-file `std::filesystem` compatible helper library,
based on the C++17 and C++20 specs, but implemented for C++11, C++14, C++17 or C++20
(tightly following the C++17 standard with very few documented exceptions). It is currently tested on
macOS 10.12/10.14/10.15, Windows 10, Ubuntu 18.04, CentOS 7, CentOS 8, FreeBSD 12
macOS 10.12/10.14/10.15, Windows 10, Ubuntu 18.04, Ubuntu 20.04, CentOS 7, CentOS 8, FreeBSD 12
and Alpine ARM/ARM64 Linux but should work on other systems too, as long as you have
at least a C++11 compatible compiler. It should work with Android NDK, Emscripten and I even
had reports of it being used on iOS (within sandboxing constraints) and with v1.5.6 there
Expand Down Expand Up @@ -556,6 +583,12 @@ to the expected behavior.
## Release Notes
### v1.6.0 (wip)
* Replaced _travis-ci.org_ with GitHub Workflow for the configurations:
Ubuntu 20.04: GCC 9.3, Ubuntu 18.04: GCC 7.5, GCC 8.4, macOS 10.15: Xcode 12.4,
Windows 10: Visual Studio 2019
### [v1.5.8](https://github.com/gulrak/filesystem/releases/tag/v1.5.8)
* Fix for [#125]((https://github.com/gulrak/filesystem/issues/124), where
Expand Down
3 changes: 2 additions & 1 deletion cmake/GhcHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ macro(AddTestExecutableWithStdCpp cppStd)
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Werror -Wno-error=deprecated-declarations>
$<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Wno-psabi -Werror -Wno-error=deprecated-declarations>
$<$<CXX_COMPILER_ID:MSVC>:/WX /wd4996>
$<$<BOOL:${CYGWIN}>:-Wa,-mbig-obj>)
$<$<BOOL:${CYGWIN}>:-Wa,-mbig-obj>
$<$<BOOL:${GHC_COVERAGE}>:--coverage>)
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
target_compile_definitions(filesystem_test_cpp${cppStd} PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
Expand Down
2 changes: 1 addition & 1 deletion include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch)
#define GHC_FILESYSTEM_VERSION 10508L
#define GHC_FILESYSTEM_VERSION 10509L

#if !defined(GHC_WITH_EXCEPTIONS) && (defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND))
#define GHC_WITH_EXCEPTIONS
Expand Down
6 changes: 6 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ if(GHC_COVERAGE)
target_compile_options(filesystem_test PUBLIC --coverage)
endif()
target_link_libraries(filesystem_test PUBLIC ghc_filesystem --coverage)
if("cxx_std_17" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
AddTestExecutableWithStdCpp(17 filesystem_test.cpp catch.hpp)
endif()
if("cxx_std_20" IN_LIST GHC_FILESYSTEM_TEST_COMPILE_FEATURES)
AddTestExecutableWithStdCpp(20 filesystem_test.cpp catch.hpp)
endif()
else()
message("Generating test runner for normal test...")
add_executable(filesystem_test filesystem_test.cpp catch.hpp)
Expand Down

0 comments on commit d87ac13

Please sign in to comment.