Skip to content
Permalink
Browse files

Merge pull request #121 from polserver/nopchtest

No precompiled header fix (windows)
  • Loading branch information
turleypol committed Jan 14, 2020
2 parents 2108bf4 + a0027af commit 4693744221c4d1377db7913695f8cafc278cbd03
@@ -75,7 +75,7 @@ jobs:
chmod +x "$cmake_archive/bin/cmake"
echo "::add-path::$Env:GITHUB_WORKSPACE/bin-build"
echo "::add-path::$Env:GITHUB_WORKSPACE/$cmake_archive/bin"
- name: Set CXX and CC
shell: pwsh
run: |
@@ -0,0 +1,106 @@
name: Build Windows no PCH

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- os: "windows-latest"
cxx-compiler: cl
c-compiler: cl
compiler-version: default
build-type: Release
nopch: 1
- os: "windows-latest"
cxx-compiler: clang-cl
c-compiler: clang-cl
compiler-version: default
build-type: Release
nopch: 1

runs-on: ${{ matrix.config.os }}

steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- uses: seanmiddleditch/gha-setup-vsdevenv@master
- name: Cache curl
uses: actions/cache@v1
with:
path: lib/curl-7.57.0
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-curl-7.57.0

- name: Install llvm
if: matrix.config.cxx-compiler == 'clang-cl'
shell: powershell
run: |
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop install llvm --global
echo "::set-env name=PATH::$env:PATH"
- name: Set CXX and CC
shell: pwsh
run: |
$cxx_compiler = '${{ matrix.config.cxx-compiler }}'
$c_compiler = '${{ matrix.config.c-compiler }}'
$version = '${{ matrix.config.compiler-version }}'
if ($version -ne 'default') {
$cxx_compiler = "$cxx_compiler-$version"
$c_compiler = "$c_compiler-$version"
}
echo "::set-env name=CXX::$cxx_compiler"
echo "::set-env name=CC::$c_compiler"
- name: Config
run: |
cd bin-build
cmake .. -G Ninja -DNO_PCH=${{ matrix.config.nopch }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }}
- name: Build
run: |
cd bin-build
cmake --build . --config ${{ matrix.config.build-type }} -- -j 2
notify_on_failure:
needs: build
runs-on: "ubuntu-latest"
if: failure()
steps:
- name: Discord notification failure
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: failure
job: Building (Windows no PCH)
nofail: false
notify_on_success:
needs: build
runs-on: "ubuntu-latest"
if: success()
steps:
- name: Discord notification success
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: success
job: Building (Windows no PCH)
nofail: false
notify_on_cancel:
needs: build
runs-on: "ubuntu-latest"
if: cancelled()
steps:
- name: Discord notification cancelled
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: turleypol/actions-status-discord@master
with:
status: cancelled
job: Building (Windows no PCH)
nofail: false
@@ -664,7 +664,7 @@ typedef struct IMAGEHLP_MODULE64_V2 {
return FALSE;
}

hMods = (HMODULE*) malloc(sizeof(HMODULE) * (TTBUFLEN / sizeof HMODULE));
hMods = (HMODULE*) malloc(sizeof(HMODULE) * (TTBUFLEN / sizeof (HMODULE)));
tt = (char*) malloc(sizeof(char) * TTBUFLEN);
tt2 = (char*) malloc(sizeof(char) * TTBUFLEN);
if ( (hMods == NULL) || (tt == NULL) || (tt2 == NULL) )
@@ -9,6 +9,8 @@
#include "cfgelem.h"
#include "cfgfile.h"

#include <stdexcept>

namespace Pol
{
namespace Clib
@@ -19,7 +21,7 @@ ConfigSection::ConfigSection( ConfigFile& cf, const std::string& sectname, unsig
_cf.allowed_types_.insert( sectname.c_str() );
}

ConfigSection::~ConfigSection() noexcept(false)
ConfigSection::~ConfigSection() noexcept( false )
{
if ( !_found && ( _flags & CST_MANDATORY ) )
{
@@ -45,5 +47,5 @@ bool ConfigSection::matches( const ConfigElem& elem )
return false;
}
}
}
}
} // namespace Clib
} // namespace Pol
@@ -6,6 +6,7 @@

#include "wnsckt.h"

#include <array>
#include <algorithm>
#include <cstdio>
#include <cstring>

0 comments on commit 4693744

Please sign in to comment.
You can’t perform that action at this time.