Skip to content

Commit ce142df

Browse files
committed
move to github actions
1 parent 0b0d4c8 commit ce142df

16 files changed

+136
-146
lines changed

.appveyor.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/coverage.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: macos-10.15
8+
name: "coverage"
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
submodules: recursive
13+
- name: Install lcov by Homebrew
14+
run: brew install lcov
15+
- name: Build && Test && Upload
16+
run: .ci/build_coverage.sh

.github/workflows/darwin.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: darwin
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{matrix.config.os}}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
config:
12+
# https://github.com/actions/virtual-environments/tree/main/images/macos
13+
- { os: "macos-10.15", xcode: "10.3" }
14+
- { os: "macos-10.15", xcode: "11.7" }
15+
- { os: "macos-10.15", xcode: "12.4" }
16+
name: "xcode-${{matrix.config.xcode}}"
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: recursive
21+
- name: Select Xcode
22+
run: sudo xcode-select --switch "/Applications/Xcode_${{matrix.config.xcode}}.app"
23+
- name: Build && Test
24+
run: .ci/build_darwin.sh

.github/workflows/linux.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: linux
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{matrix.config.os}}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
config:
12+
# https://github.com/actions/virtual-environments/tree/main/images/linux
13+
- { os: "ubuntu-20.04", cc: "gcc-7", cxx: "g++-7" }
14+
- { os: "ubuntu-20.04", cc: "gcc-8", cxx: "g++-8" }
15+
- { os: "ubuntu-20.04", cc: "gcc-9", cxx: "g++-9" }
16+
- { os: "ubuntu-20.04", cc: "gcc-10", cxx: "g++-10" }
17+
- { os: "ubuntu-20.04", cc: "clang-7", cxx: "clang++-7" }
18+
- { os: "ubuntu-20.04", cc: "clang-8", cxx: "clang++-8" }
19+
- { os: "ubuntu-20.04", cc: "clang-9", cxx: "clang++-9" }
20+
- { os: "ubuntu-20.04", cc: "clang-10", cxx: "clang++-10" }
21+
name: "${{matrix.config.cxx}}"
22+
steps:
23+
- name: Setup
24+
run: sudo apt-get -y install "${{matrix.config.cc}}" "${{matrix.config.cxx}}"
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
with:
28+
submodules: recursive
29+
- name: Build && Test
30+
run: .ci/build_linux.sh
31+
env: { CC: "${{matrix.config.cc}}", CXX: "${{matrix.config.cxx}}" }

.github/workflows/windows.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: windows
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{matrix.config.os}}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
config:
12+
# https://github.com/actions/virtual-environments/tree/main/images/win
13+
- { os: "windows-2016", vs: "Visual Studio 2017", arch: "x86" }
14+
- { os: "windows-2016", vs: "Visual Studio 2017", arch: "x64" }
15+
- { os: "windows-2019", vs: "Visual Studio 2019", arch: "x86" }
16+
- { os: "windows-2019", vs: "Visual Studio 2019", arch: "x64" }
17+
name: "${{matrix.config.vs}} ${{matrix.config.arch}}"
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
submodules: recursive
22+
- name: Build && Test
23+
run: .ci\build_windows_${{matrix.config.arch}}.bat

.travis.yml

Lines changed: 0 additions & 89 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
33

44
if(NOT DEFINED PROJECT_NAME)
55
set(BUILD_AS_STANDALONE ON)
6+
else()
7+
set(BUILD_AS_STANDALONE OFF)
68
endif()
79

810
project(flat.hpp)
@@ -11,6 +13,14 @@ add_library(${PROJECT_NAME} INTERFACE)
1113
target_include_directories(${PROJECT_NAME} INTERFACE headers)
1214
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_17)
1315

16+
target_compile_options(${PROJECT_NAME}
17+
INTERFACE
18+
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:
19+
-Wno-c++98-compat-pedantic
20+
-Wno-padded
21+
-Wno-shadow
22+
-Wno-unknown-warning-option>)
23+
1424
if(BUILD_AS_STANDALONE)
1525
option(BUILD_WITH_UNBENCH "Build with benchmarks" OFF)
1626
if(BUILD_WITH_UNBENCH)

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22

33
> Library of flat vector-like based associative containers
44
5-
[![travis][badge.travis]][travis]
6-
[![appveyor][badge.appveyor]][appveyor]
5+
[![linux][badge.linux]][linux]
6+
[![darwin][badge.darwin]][darwin]
7+
[![windows][badge.windows]][windows]
78
[![codecov][badge.codecov]][codecov]
89
[![language][badge.language]][language]
910
[![license][badge.license]][license]
10-
[![paypal][badge.paypal]][paypal]
1111

12-
[badge.travis]: https://img.shields.io/travis/BlackMATov/flat.hpp/main.svg?logo=travis
13-
[badge.appveyor]: https://img.shields.io/appveyor/ci/BlackMATov/flat-hpp/main.svg?logo=appveyor
14-
[badge.codecov]: https://img.shields.io/codecov/c/github/BlackMATov/flat.hpp/main.svg?logo=codecov
15-
[badge.language]: https://img.shields.io/badge/language-C%2B%2B17-yellow.svg
16-
[badge.license]: https://img.shields.io/badge/license-MIT-blue.svg
17-
[badge.paypal]: https://img.shields.io/badge/donate-PayPal-orange.svg?logo=paypal&colorA=00457C
12+
[badge.darwin]: https://img.shields.io/github/workflow/status/BlackMATov/flat.hpp/darwin/main?label=Xcode&logo=xcode
13+
[badge.linux]: https://img.shields.io/github/workflow/status/BlackMATov/flat.hpp/linux/main?label=GCC%2FClang&logo=linux
14+
[badge.windows]: https://img.shields.io/github/workflow/status/BlackMATov/flat.hpp/windows/main?label=Visual%20Studio&logo=visual-studio
15+
[badge.codecov]: https://img.shields.io/codecov/c/github/BlackMATov/flat.hpp/main?logo=codecov
16+
[badge.language]: https://img.shields.io/badge/language-C%2B%2B17-yellow
17+
[badge.license]: https://img.shields.io/badge/license-MIT-blue
1818

19-
[travis]: https://travis-ci.org/BlackMATov/flat.hpp
20-
[appveyor]: https://ci.appveyor.com/project/BlackMATov/flat-hpp
19+
[darwin]: https://github.com/BlackMATov/flat.hpp/actions?query=workflow%3Adarwin
20+
[linux]: https://github.com/BlackMATov/flat.hpp/actions?query=workflow%3Alinux
21+
[windows]: https://github.com/BlackMATov/flat.hpp/actions?query=workflow%3Awindows
2122
[codecov]: https://codecov.io/gh/BlackMATov/flat.hpp
2223
[language]: https://en.wikipedia.org/wiki/C%2B%2B17
2324
[license]: https://en.wikipedia.org/wiki/MIT_License
24-
[paypal]: https://www.paypal.me/matov
2525

2626
[flat]: https://github.com/BlackMATov/flat.hpp
2727

headers/flat.hpp/flat_multimap.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ namespace flat_hpp
392392

393393
size_type erase(const key_type& key) {
394394
const auto p = equal_range(key);
395-
size_type r = std::distance(p.first, p.second);
395+
size_type r = static_cast<size_type>(std::distance(p.first, p.second));
396396
erase(p.first, p.second);
397397
return r;
398398
}
@@ -410,7 +410,7 @@ namespace flat_hpp
410410

411411
size_type count(const key_type& key) const {
412412
const auto p = equal_range(key);
413-
return std::distance(p.first, p.second);
413+
return static_cast<size_type>(std::distance(p.first, p.second));
414414
}
415415

416416
template < typename K >
@@ -419,7 +419,7 @@ namespace flat_hpp
419419
size_type>
420420
count(const K& key) const {
421421
const auto p = equal_range(key);
422-
return std::distance(p.first, p.second);
422+
return static_cast<size_type>(std::distance(p.first, p.second));
423423
}
424424

425425
iterator find(const key_type& key) {

headers/flat.hpp/flat_multiset.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ namespace flat_hpp
320320

321321
size_type erase(const key_type& key) {
322322
const auto p = equal_range(key);
323-
size_type r = std::distance(p.first, p.second);
323+
size_type r = static_cast<size_type>(std::distance(p.first, p.second));
324324
erase(p.first, p.second);
325325
return r;
326326
}
@@ -338,7 +338,7 @@ namespace flat_hpp
338338

339339
size_type count(const key_type& key) const {
340340
const auto p = equal_range(key);
341-
return std::distance(p.first, p.second);
341+
return static_cast<size_type>(std::distance(p.first, p.second));
342342
}
343343

344344
template < typename K >
@@ -347,7 +347,7 @@ namespace flat_hpp
347347
size_type>
348348
count(const K& key) const {
349349
const auto p = equal_range(key);
350-
return std::distance(p.first, p.second);
350+
return static_cast<size_type>(std::distance(p.first, p.second));
351351
}
352352

353353
iterator find(const key_type& key) {

0 commit comments

Comments
 (0)