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 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`