From ffc032cac8864d1683c47052bf2250f32ce32659 Mon Sep 17 00:00:00 2001 From: Ryan Anderson Date: Wed, 24 Sep 2025 11:17:46 -0700 Subject: [PATCH 1/6] Fixed termination errors when handling nothing keyword, closes #1 --- main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 982d05f..76fd6e4 100644 --- a/main.cpp +++ b/main.cpp @@ -19,14 +19,18 @@ int main(){ pick = rand() % 4; cout << "What are you listening to?\n"; getline(cin,input); + if(input == "nothing") + return 0; cout << VALIDATION[pick] << "! Let's listen to more\n"; do{ cout << "What's next?\n"; getline(cin,input); pick = rand() % 4; + if(input == "nothing") + return 0; cout << VALIDATION[pick] << "!\n"; }while( input != "nothing" ); return 0; -} \ No newline at end of file +} From 8f7ad149329abe8f5974071d180440d06f8e4185 Mon Sep 17 00:00:00 2001 From: Ryan Anderson Date: Wed, 24 Sep 2025 11:34:54 -0700 Subject: [PATCH 2/6] added ci workflow to verify compile of main.cpp function, closes #2 --- .github/workflows/compile.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/compile.yml diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..394be37 --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,23 @@ +name: Compile C++ + +on: + push: + branches: "devops" + 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@v4 + - name: Build project + run: g++ -std=c++17 main.cpp From b517dbba4e3ae737f2657f72bd41c348d408065c Mon Sep 17 00:00:00 2001 From: Ryan Anderson Date: Wed, 24 Sep 2025 11:47:41 -0700 Subject: [PATCH 3/6] renamed Compile C++ to Build C++ --- .github/workflows/compile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 394be37..710e1f4 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -1,4 +1,4 @@ -name: Compile C++ +name: Build C++ on: push: From 41c3f839c6d02483751b40c6d7085a7b719004bc Mon Sep 17 00:00:00 2001 From: Ryan Anderson Date: Wed, 24 Sep 2025 11:50:06 -0700 Subject: [PATCH 4/6] changed file name to build.yml, changed name to Compile --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 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..9eabcd2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Compile + +on: + push: + branches: "devops" + 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@v4 + - name: Build project + run: g++ -std=c++17 main.cpp From fe1d4b7e5719972da3676f43a38acca1a5643a85 Mon Sep 17 00:00:00 2001 From: Ryan Anderson Date: Wed, 24 Sep 2025 13:03:51 -0700 Subject: [PATCH 5/6] changed branch name to main --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9eabcd2..79ed441 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Compile on: push: - branches: "devops" + branches: "main" pull_request: branches: [ main ] From a899aff7e61bb925214dd515f1c304ab3a9db70c Mon Sep 17 00:00:00 2001 From: Ryan Anderson Date: Wed, 24 Sep 2025 13:14:56 -0700 Subject: [PATCH 6/6] changed branch push to ci/cd, test workflow --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79ed441..9f044da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Compile on: push: - branches: "main" + branches: "ci/cd" pull_request: branches: [ main ]