From 7b4423f152cd665f56e9893b92ec27cbe0b4aab5 Mon Sep 17 00:00:00 2001 From: Jose Herrera <111912430+jfherrera02@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:36:23 -0800 Subject: [PATCH 1/3] Create main.yml yml file for q01 GameDie. --- .github/workflows/main.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..9586fbe --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,23 @@ +name: Build C++ + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + install: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y -f build-essential g++ cmake + build: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build project + run: make From 0e3aacee2812e0c827e97c8df9e5d32d0dc74ea0 Mon Sep 17 00:00:00 2001 From: Jose Herrera <111912430+jfherrera02@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:40:01 -0800 Subject: [PATCH 2/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a8fe2c..e89fc51 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build C++](https://github.com/jfherrera02/GameDiejh/actions/workflows/main.yml/badge.svg)](https://github.com/jfherrera02/GameDiejh/actions/workflows/main.yml) # GameDie This repository provides a class that represents a game die, such as the @@ -23,4 +24,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` From c36a422ed5f9cefa91f43a71b8c0020bdfc1044a Mon Sep 17 00:00:00 2001 From: Jose Herrera <111912430+jfherrera02@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:45:13 -0800 Subject: [PATCH 3/3] Update GameDie.cpp Added main() --- GameDie.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GameDie.cpp b/GameDie.cpp index d512405..f6743c5 100644 --- a/GameDie.cpp +++ b/GameDie.cpp @@ -44,3 +44,7 @@ int GameDie::roll() vector GameDie::get_distribution(){ return counter; } +int main(){ + + return 0; +}