From 849a16f80d61ed42a40e7a31d4e3891665cebc46 Mon Sep 17 00:00:00 2001 From: G1411 <83816568+G1411@users.noreply.github.com> Date: Tue, 21 Feb 2023 09:57:26 -0800 Subject: [PATCH 1/8] Create actions.yml --- .github/workflows/actions.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 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..b4750c1 --- /dev/null +++ b/.github/workflows/actions.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: g++ main.cpp -o test.o From 815f4c28544af22ff283c73960c18d4ba60d0bbb Mon Sep 17 00:00:00 2001 From: G1411 <83816568+G1411@users.noreply.github.com> Date: Tue, 21 Feb 2023 10:08:07 -0800 Subject: [PATCH 2/8] Update GameDie.cpp --- GameDie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameDie.cpp b/GameDie.cpp index d8ecb3a..8dd274c 100644 --- a/GameDie.cpp +++ b/GameDie.cpp @@ -29,7 +29,7 @@ GameDie::GameDie(unsigned int num) { // generate a random number between 1-n where n is the counter size // (inclusive) and return it int GameDie::roll() { - int roll = rand_r() % roll_counter.size(); + int roll = rand() % roll_counter.size(); roll_counter[roll]++; return roll + 1; } From 7383831cdda2357b006a7fde1c7281668993c3a7 Mon Sep 17 00:00:00 2001 From: G1411 <83816568+G1411@users.noreply.github.com> Date: Tue, 21 Feb 2023 10:33:27 -0800 Subject: [PATCH 3/8] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d46f7c6..ee25e57 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build C++](https://github.com/G1411/Roller/actions/workflows/actions.yml/badge.svg)](https://github.com/G1411/Roller/actions/workflows/actions.yml) + # Roller This repository provides a program that rolls a game die, such as the From f89c4b0b11c8af1064a9de9d0b9f851db4c369be Mon Sep 17 00:00:00 2001 From: G1411 <83816568+G1411@users.noreply.github.com> Date: Tue, 21 Feb 2023 11:38:37 -0800 Subject: [PATCH 4/8] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ee25e57..d46f7c6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Build C++](https://github.com/G1411/Roller/actions/workflows/actions.yml/badge.svg)](https://github.com/G1411/Roller/actions/workflows/actions.yml) - # Roller This repository provides a program that rolls a game die, such as the From 11955bf4733e52c0a15313624e49aa7257032bd6 Mon Sep 17 00:00:00 2001 From: G1411 <83816568+G1411@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:41:33 -0800 Subject: [PATCH 5/8] Update actions.yml --- .github/workflows/actions.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index b4750c1..25bfe54 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -1,8 +1,6 @@ name: Build C++ on: - push: - branches: [ main ] pull_request: branches: [ main ] From d5de7cebd6dbd3e82c3dfcdcd77f8189dc219875 Mon Sep 17 00:00:00 2001 From: G1411 <83816568+G1411@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:42:19 -0800 Subject: [PATCH 6/8] Create super-linter.yml --- .github/workflows/super-linter.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/super-linter.yml diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml new file mode 100644 index 0000000..fec1b19 --- /dev/null +++ b/.github/workflows/super-linter.yml @@ -0,0 +1,21 @@ +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] +jobs: + run-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper list of changed files within `super-linter` + fetch-depth: 0 + + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: "main" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bec9b1738069ab6e1888ee46e504098b63e64ba8 Mon Sep 17 00:00:00 2001 From: G1411 <83816568+G1411@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:42:59 -0800 Subject: [PATCH 7/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d46f7c6..92457d3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![.github/workflows/super-linter.yml](https://github.com/G1411/Roller/actions/workflows/super-linter.yml/badge.svg)](https://github.com/G1411/Roller/actions/workflows/super-linter.yml) # Roller This repository provides a program that rolls a game die, such as the From 68e2d07e2bd832223f0458bcc9e2c3ea9e1a26ce Mon Sep 17 00:00:00 2001 From: G1411 <83816568+G1411@users.noreply.github.com> Date: Tue, 21 Feb 2023 23:48:21 -0800 Subject: [PATCH 8/8] Update super-linter.yml --- .github/workflows/super-linter.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index fec1b19..a23ec88 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -3,19 +3,19 @@ on: branches: [ "main" ] pull_request: branches: [ "main" ] + jobs: - run-lint: + install: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - # Full git history is needed to get a proper list of changed files within `super-linter` - fetch-depth: 0 - - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: "main" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - 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++ main.cpp -o test.o