Skip to content

Commit

Permalink
Add MinGW toolchain to GHA (#353)
Browse files Browse the repository at this point in the history
* add mingw

* change gcc usage method

* add ninja to mingw gha

* Update README.md for mingw

* Update Date.cpp

---------

Co-authored-by: Wojciech Sekta <[email protected]>
  • Loading branch information
wsekta and wsekta authored Nov 28, 2023
1 parent 657370b commit 498aaeb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/windows-mingw-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: mingw

on:
push:
branches:
- 'main'
pull_request:

defaults:
run:
shell: bash

env:
BUILD_TYPE: Debug

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- uses: seanmiddleditch/gha-setup-ninja@master

- run: cmake -E make_directory build

- working-directory: build/
run: cmake .. -GNinja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc

- working-directory: build/
run: cmake --build .

- working-directory: build/
run: ctest -C Debug --output-on-failure
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![apple clang++](https://github.com/cieslarmichal/faker-cxx/actions/workflows/macos-clang-build.yml/badge.svg?branch=main)](https://github.com/cieslarmichal/faker-cxx/actions/workflows/macos-clang-build.yml?query=branch%3Amain)
[![g++](https://github.com/cieslarmichal/faker-cxx/actions/workflows/linux-gxx-build.yml/badge.svg?branch=main)](https://github.com/cieslarmichal/faker-cxx/actions/workflows/linux-gxx-build.yml?query=branch%3Amain)
[![msvc](https://github.com/cieslarmichal/faker-cxx/actions/workflows/windows-msvc-build.yml/badge.svg?branch=main)](https://github.com/cieslarmichal/faker-cxx/actions/workflows/windows-msvc-build.yml?query=branch%3Amain)
[![mingw](https://github.com/cieslarmichal/faker-cxx/actions/workflows/windows-mingw-build.yml/badge.svg?branch=main)](https://github.com/cieslarmichal/faker-cxx/actions/workflows/windows-mingw-build.yml?query=branch%3Amain)
[![codecov](https://codecov.io/github/cieslarmichal/faker-cxx/branch/main/graph/badge.svg?token=0RTV4JFH2U)](https://codecov.io/github/cieslarmichal/faker-cxx)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![Chat on Discord](https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord)](https://discord.gg/h2ur8H6mK6)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/date/Date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ std::string serializeTimePoint(const auto& timePoint)

std::stringstream ss;

ss << std::put_time(&utcTime, "%FT%TZ");
ss << std::put_time(&utcTime, "%Y-%m-%dT%H:%M:%SZ");

return ss.str();
}
Expand Down

0 comments on commit 498aaeb

Please sign in to comment.