Skip to content

Refactor Workflows #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 23, 2023
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
build-project:
name: Build Project
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
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 --config Release

build-docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Install Requirements
run: pip3 install -r docs/requirements.txt

- name: Build Documentation
run: sphinx-build -b html docs build/docs -W --keep-going

- name: Upload Documentation
uses: actions/upload-pages-artifact@v3.0.0
with:
path: build/docs
99 changes: 0 additions & 99 deletions .github/workflows/build.yml

This file was deleted.

36 changes: 18 additions & 18 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: deploy
name: Deploy
on:
workflow_dispatch:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
docs:
deploy-pages:
name: Deploy Pages
runs-on: ubuntu-latest
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
url: ${{ steps.deploy-pages.outputs.page_url }}
concurrency:
group: pages
cancel-in-progress: true
steps:
- name: Setup Pages
uses: actions/configure-pages@v4.0.0

- name: Checkout
uses: actions/checkout@v4.1.1

- name: Install requirements
- name: Install Requirements
run: pip3 install -r docs/requirements.txt

- name: Setup Pages
uses: actions/configure-pages@v4.0.0

- name: Build with Sphinx
- name: Build Documentation
run: sphinx-build -b html docs docs/build -W --keep-going

- name: Upload artifact
- name: Upload Documentation
uses: actions/upload-pages-artifact@v3.0.0
with:
path: docs/build

- name: Deploy to GitHub Pages
id: deployment
- name: Deploy Pages
id: deploy-pages
uses: actions/deploy-pages@v4.0.0
54 changes: 54 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
check-project:
name: Check Project
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Configure Project
uses: threeal/cmake-action@v1.3.0
with:
options: BUILD_TESTING=ON

- name: Check Format
run: |
cmake --build build --target format
git diff --exit-code HEAD

test-project:
name: Test Project
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Configure Project
uses: threeal/cmake-action@v1.3.0
with:
options: BUILD_TESTING=ON

- name: Build Project
run: cmake --build build

- name: Test Project
run: ctest --test-dir build --output-on-failure --no-tests=error

- name: Check Coverage
if: ${{ matrix.os != 'windows' }}
uses: threeal/gcovr-action@v1.0.0
with:
excludes: |
build/*
test/*
fail-under-line: 100
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Error C++

[![build status](https://img.shields.io/github/actions/workflow/status/threeal/errors-cpp/build.yml?branch=main)](https://github.com/threeal/errors-cpp/actions/workflows/build.yml)
[![build status](https://img.shields.io/github/actions/workflow/status/threeal/errors-cpp/build.yaml?branch=main)](https://github.com/threeal/errors-cpp/actions/workflows/build.yaml)
[![test status](https://img.shields.io/github/actions/workflow/status/threeal/errors-cpp/test.yaml?branch=main&&label=test)](https://github.com/threeal/errors-cpp/actions/workflows/test.yaml)
[![deploy status](https://img.shields.io/github/actions/workflow/status/threeal/errors-cpp/deploy.yaml?branch=main&label=deploy)](https://github.com/threeal/errors-cpp/actions/workflows/deploy.yaml)

A C++ package that provides utilities for error handling.
Expand Down