From b882fdd8f111d47db0ddb31c600af87ed058a408 Mon Sep 17 00:00:00 2001 From: kbuffardi Date: Sat, 25 Feb 2023 20:20:20 -0800 Subject: [PATCH 1/2] Add build C++ project --- .github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..96d8ee8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,16 @@ +name: Build C++ + +on: + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build project + run: | + sudo apt-get update + sudo apt-get install -y -f build-essential g++ cmake + g++ GameDie.cpp -Wall -Werror From 380b910c8eccf9f441eb76b076b1b03ca4824e11 Mon Sep 17 00:00:00 2001 From: kbuffardi Date: Sat, 25 Feb 2023 20:25:54 -0800 Subject: [PATCH 2/2] Add CI Build status badge, closes #107 --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9a8fe2c..47e0e79 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # GameDie +[![Build C++](https://github.com/ChicoState/GameDie/actions/workflows/build.yml/badge.svg)](https://github.com/ChicoState/GameDie/actions/workflows/build.yml) + This repository provides a class that represents a game die, such as the -six-sided dice used in traditional dice game. While the die defaults to +six-sided dice used in traditional dice game. While the die defaults to six sides, the overloaded constructor allows the developer to customize any size die (with at least one face). It also keeps track of how many times a certain face has been rolled so that the fairness of the die @@ -23,4 +25,4 @@ Once built, run the image: ...or run it with a bind mount to the current source code: -`docker run --mount type=bind,source="$(pwd)",target=/usr/src -it cpp-container` \ No newline at end of file +`docker run --mount type=bind,source="$(pwd)",target=/usr/src -it cpp-container`