Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/workflows/macos.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
push:
tags:
- '*'
branches:
- master
- main
pull_request:
branches:
- master
- main

env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: ${{ matrix.os }}-${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}

- name: configure
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release

- name: build
run: cmake --build build -j4 --config Release

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: zip
uses: thedoctor0/zip-release@main
with:
type: zip
filename: ${{ matrix.os }}.zip
directory: build/out/

- uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: build/out/${{ matrix.os }}.zip
tag: nightly-${{ steps.date.outputs.date }}
15 changes: 12 additions & 3 deletions .github/workflows/standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,30 @@ env:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
key: ${{ matrix.os }}-${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}

- name: configure
run: cmake -Sstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug

- name: build
run: cmake --build build -j4

- name: run
- name: run on unix-like
if: startsWith(matrix.os, 'macOS') || startsWith(matrix.os,'ubuntu')
run: ./build/Greeter

- name: run on windows
if: startsWith(matrix.os, 'windows')
run: ./build/Debug/Greeter.exe
13 changes: 9 additions & 4 deletions .github/workflows/ubuntu.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ubuntu
name: Test

on:
push:
Expand All @@ -17,15 +17,19 @@ env:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
key: ${{ matrix.os }}-${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}

- name: configure
run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug
Expand All @@ -38,5 +42,6 @@ jobs:
cd build
ctest --build-config Debug

- name: collect code coverage
- name: collect code coverage on ubuntu
if: startsWith(matrix.os,'ubuntu')
run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
38 changes: 0 additions & 38 deletions .github/workflows/windows.yml

This file was deleted.

12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
/build*
/.vscode
/cpm_modules
.DS_Store

# apple
.DS_Store

# clion
.idea/
cmake-*/

# visual studio
out/
.vs/
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
)
endif()

# ---- Set output directories ----
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/out)

# ---- Add dependencies via CPM ----
# see https://github.com/TheLartians/CPM.cmake for more info

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,4 @@ Perhaps the [MiniCppStarter](https://github.com/TheLartians/MiniCppStarter) is s

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=TheLartians/ModernCppStarter,cpp-best-practices/gui_starter_template,filipdutescu/modern-cpp-template&type=Date)](https://star-history.com/#TheLartians/ModernCppStarter&cpp-best-practices/gui_starter_template&filipdutescu/modern-cpp-template&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=TheLartians/ModernCppStarter,cpp-best-practices/gui_starter_template,filipdutescu/modern-cpp-template&type=Date)](https://star-history.com/#TheLartians/ModernCppStarter&cpp-best-practices/gui_starter_template&filipdutescu/modern-cpp-template&Date)