From 8421eaa4a7f779be06ea339694c0189480ba6664 Mon Sep 17 00:00:00 2001 From: cmkoschnick <95322513+cmkoschnick@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:41:23 -0800 Subject: [PATCH 1/4] Create actions.yml --- github/workflows/actions.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 github/workflows/actions.yml diff --git a/github/workflows/actions.yml b/github/workflows/actions.yml new file mode 100644 index 0000000..6f4a732 --- /dev/null +++ b/github/workflows/actions.yml @@ -0,0 +1,26 @@ +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: | + g++ GameDice.h -std=c++17 -Wall -Wextra -Werror -o GameDice + g++ GameDice.cpp -std=c++17 -Wall -Wextra -Werror -o GameDice + From 84fdd326b4314d031d88ad5661cc874be9e7d859 Mon Sep 17 00:00:00 2001 From: cmkoschnick <95322513+cmkoschnick@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:45:02 -0800 Subject: [PATCH 2/4] Rename github/workflows/actions.yml to .github/workflows/actions.yml --- {github => .github}/workflows/actions.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {github => .github}/workflows/actions.yml (100%) diff --git a/github/workflows/actions.yml b/.github/workflows/actions.yml similarity index 100% rename from github/workflows/actions.yml rename to .github/workflows/actions.yml From fed43d6d82e20fc2ed46a607f6f948306f85b1e5 Mon Sep 17 00:00:00 2001 From: cmkoschnick <95322513+cmkoschnick@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:46:17 -0800 Subject: [PATCH 3/4] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a8fe2c..3906666 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Build C++](https://github.com/cmkoschnick/GameDie/actions/workflows/actions.yml/badge.svg)](https://github.com/cmkoschnick/GameDie/actions/workflows/actions.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 7524e623f8e1afa04d3aae9a9836b172aeea33a1 Mon Sep 17 00:00:00 2001 From: cmkoschnick <95322513+cmkoschnick@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:47:41 -0800 Subject: [PATCH 4/4] Update actions.yml --- .github/workflows/actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 6f4a732..60a80d8 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -21,6 +21,6 @@ jobs: - uses: actions/checkout@v3 - name: Build project run: | - g++ GameDice.h -std=c++17 -Wall -Wextra -Werror -o GameDice - g++ GameDice.cpp -std=c++17 -Wall -Wextra -Werror -o GameDice + g++ GameDie.h -std=c++17 -Wall -Wextra -Werror -o GameDie + g++ GameDie.cpp -std=c++17 -Wall -Wextra -Werror -o GameDie