Skip to content

Commit

Permalink
ci: separate workflows for build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
threeal committed Dec 17, 2023
1 parent 264f6f7 commit e2c6537
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 25 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
build-Project:
name: Build Project
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Configure project
uses: threeal/cmake-action@v1.3.0

- name: Build project
run: cmake --build build

- name: Install project
run: cmake --install build --prefix install

- name: Upload project as artifact
uses: actions/upload-artifact@v3.1.3
with:
path: install
27 changes: 3 additions & 24 deletions .github/workflows/ci.yaml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,12 @@
name: CI
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
build-release:
name: Build Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Configure project
uses: threeal/cmake-action@v1.3.0

- name: Build project
run: cmake --build build

- name: Install project
run: cmake --install build --prefix install

- name: Upload project as artifact
uses: actions/upload-artifact@v3.1.3
with:
path: install

build-testing:
name: Build Testing
test-project:
name: Test Project
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# C++ Starter

[![build status](https://img.shields.io/github/actions/workflow/status/threeal/cpp-starter/ci.yaml?branch=main&style=flat-square)](https://github.com/threeal/cpp-starter/actions/workflows/ci.yaml)
[![build status](https://img.shields.io/github/actions/workflow/status/threeal/cpp-starter/build.yaml?branch=main&style=flat-square)](https://github.com/threeal/cpp-starter/actions/workflows/build.yaml)
[![test status](https://img.shields.io/github/actions/workflow/status/threeal/cpp-starter/test.yaml?branch=main&label=test&style=flat-square)](https://github.com/threeal/cpp-starter/actions/workflows/test.yaml)

The C++ Starter is a [GitHub repository template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) that provides a minimalistic boilerplate to kickstart your [C++](https://isocpp.org) project. This template offers a streamlined foundation, complete with predefined file structures, essential tools, and recommended settings, ensuring a swift and efficient start to your C++ development journey.

0 comments on commit e2c6537

Please sign in to comment.