Skip to content

Commit 3aa225b

Browse files
authored
fix(Singleton): remove potential issue on windows
1 parent 6fcc3c3 commit 3aa225b

File tree

10 files changed

+58
-229
lines changed

10 files changed

+58
-229
lines changed

.github/workflows/CI.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
format:
9+
runs-on: ubuntu-18.04
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: Geode-solutions/actions/clang-format@master
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
16+
17+
build:
18+
runs-on: ${{ matrix.os }}
19+
needs: format
20+
21+
strategy:
22+
matrix:
23+
node-version: [10.x, 12.x]
24+
os: [ubuntu-18.04, windows-2016, macOS-10.14]
25+
26+
steps:
27+
- uses: actions/checkout@v1
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v1
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
- name: npm install and build
33+
run: |
34+
npm install
35+
npm run examples
36+
37+
semantic-release:
38+
runs-on: ubuntu-18.04
39+
needs: build
40+
steps:
41+
- uses: actions/checkout@v1
42+
- run: npx semantic-release
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.TOKEN }}
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+

.releaserc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
'@semantic-release/commit-analyzer',
44
'@semantic-release/release-notes-generator',
55
'@semantic-release/github',
6-
'@semantic-release/npm',
7-
'semantic-release-ado'
6+
'@semantic-release/npm'
87
]
98
}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<h3 align="center">Automatic generation of N-API wrapper from a C++ library</h3>
33

44
<p align="center">
5-
<img src="https://dev.azure.com/GeodeSolutions/Geode/_apis/build/status/Geode-solutions.genepi?branchName=master" alt="Build Status">
5+
<img src="https://github.com/Geode-solutions/genepi/workflows/CI/badge.svg" alt="Build Status">
66
<img src="https://img.shields.io/github/release/Geode-solutions/genepi.svg" alt="Version">
77
</p>
88

99
<p align="center">
10-
<img src="https://dev.azure.com/GeodeSolutions/Geode/_apis/build/status/Geode-solutions.genepi?branchName=master&jobName=Test&configuration=Test%20Windows&label=Windows" alt="Windows Build Status">
11-
<img src="https://dev.azure.com/GeodeSolutions/Geode/_apis/build/status/Geode-solutions.genepi?branchName=master&jobName=Test&configuration=Test%20Ubuntu&label=Linux" alt="Linux Build Status">
12-
<img src="https://dev.azure.com/GeodeSolutions/Geode/_apis/build/status/Geode-solutions.genepi?branchName=master&jobName=Test&configuration=Test%20Mac&label=macOS" alt="Apple Build Status">
10+
<img src="https://img.shields.io/static/v1?label=Windows&logo=windows&logoColor=white&message=support&color=success" alt="Windows support">
11+
<img src="https://img.shields.io/static/v1?label=Linux&logo=linux&logoColor=white&message=support&color=success" alt="Linux support">
12+
<img src="https://img.shields.io/static/v1?label=macOS&logo=apple&logoColor=white&message=support&color=success" alt="macOS support">
1313
</p>
1414

1515
<p align="center">

azure-pipelines.yml

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

examples/functions/functions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ namespace foo
4040
{
4141
std::cout << "Hello, " << name << std::endl;
4242
}
43-
}
43+
} // namespace foo
4444

4545
#include <genepi/genepi.h>
4646

4747
namespace
4848
{
4949
GENEPI_FUNCTION( sayHello );
5050
NAMED_GENEPI_FUNCTION( sayBye, sayGoodbye );
51-
}
51+
} // namespace
5252

5353
namespace foo
5454
{

examples/overloaded-functions/overloaded-functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ namespace
4646
GENEPI_MULTIFUNCTION( test, void, test_string, const std::string& );
4747
GENEPI_MULTIFUNCTION( test, void, test_int, int );
4848
GENEPI_MULTIFUNCTION( test, void, test_int2, int, int );
49-
}
49+
} // namespace
5050

5151
GENEPI_MODULE( overloaded_functions );

include/genepi/type_list.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ namespace genepi
7676
};
7777

7878
template < template < typename... > class Output,
79-
template < size_t, typename > class Mapper,
79+
template < size_t, typename >
80+
class Mapper,
8081
typename... Args >
8182
struct MapWithIndex
8283
{

src/genepi/singleton.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <genepi/singleton.h>
2525

2626
#include <map>
27+
#include <string>
2728

2829
namespace genepi
2930
{
@@ -46,7 +47,7 @@ namespace genepi
4647
}
4748

4849
private:
49-
std::map< const char *, std::unique_ptr< Singleton > > singletons_;
50+
std::map< std::string, std::unique_ptr< Singleton > > singletons_;
5051
};
5152

5253
Singleton::Singleton() : impl_( new Impl ) {}

test/test.cpp

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

test/test.js

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

0 commit comments

Comments
 (0)