Skip to content

Commit

Permalink
fix(Singleton): remove potential issue on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
BotellaA committed Oct 7, 2019
1 parent 6fcc3c3 commit 3aa225b
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 229 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
pull_request:

jobs:
format:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1
- uses: Geode-solutions/actions/clang-format@master
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}

build:
runs-on: ${{ matrix.os }}
needs: format

strategy:
matrix:
node-version: [10.x, 12.x]
os: [ubuntu-18.04, windows-2016, macOS-10.14]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install and build
run: |
npm install
npm run examples
semantic-release:
runs-on: ubuntu-18.04
needs: build
steps:
- uses: actions/checkout@v1
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

3 changes: 1 addition & 2 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/github',
'@semantic-release/npm',
'semantic-release-ado'
'@semantic-release/npm'
]
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<h3 align="center">Automatic generation of N-API wrapper from a C++ library</h3>

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

<p align="center">
<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">
<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">
<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">
<img src="https://img.shields.io/static/v1?label=Windows&logo=windows&logoColor=white&message=support&color=success" alt="Windows support">
<img src="https://img.shields.io/static/v1?label=Linux&logo=linux&logoColor=white&message=support&color=success" alt="Linux support">
<img src="https://img.shields.io/static/v1?label=macOS&logo=apple&logoColor=white&message=support&color=success" alt="macOS support">
</p>

<p align="center">
Expand Down
37 changes: 0 additions & 37 deletions azure-pipelines.yml

This file was deleted.

4 changes: 2 additions & 2 deletions examples/functions/functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ namespace foo
{
std::cout << "Hello, " << name << std::endl;
}
}
} // namespace foo

#include <genepi/genepi.h>

namespace
{
GENEPI_FUNCTION( sayHello );
NAMED_GENEPI_FUNCTION( sayBye, sayGoodbye );
}
} // namespace

namespace foo
{
Expand Down
2 changes: 1 addition & 1 deletion examples/overloaded-functions/overloaded-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ namespace
GENEPI_MULTIFUNCTION( test, void, test_string, const std::string& );
GENEPI_MULTIFUNCTION( test, void, test_int, int );
GENEPI_MULTIFUNCTION( test, void, test_int2, int, int );
}
} // namespace

GENEPI_MODULE( overloaded_functions );
3 changes: 2 additions & 1 deletion include/genepi/type_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ namespace genepi
};

template < template < typename... > class Output,
template < size_t, typename > class Mapper,
template < size_t, typename >
class Mapper,
typename... Args >
struct MapWithIndex
{
Expand Down
3 changes: 2 additions & 1 deletion src/genepi/singleton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <genepi/singleton.h>

#include <map>
#include <string>

namespace genepi
{
Expand All @@ -46,7 +47,7 @@ namespace genepi
}

private:
std::map< const char *, std::unique_ptr< Singleton > > singletons_;
std::map< std::string, std::unique_ptr< Singleton > > singletons_;
};

Singleton::Singleton() : impl_( new Impl ) {}
Expand Down
137 changes: 0 additions & 137 deletions test/test.cpp

This file was deleted.

44 changes: 0 additions & 44 deletions test/test.js

This file was deleted.

0 comments on commit 3aa225b

Please sign in to comment.