From 742270ff2cc9d871d00f9d349216fbda012771ef Mon Sep 17 00:00:00 2001 From: iRainy22 Date: Wed, 18 Feb 2026 11:21:51 -0800 Subject: [PATCH 1/3] Added compile workflow. Resolves #95 --- .github/workflows/compile.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/compile.yaml diff --git a/.github/workflows/compile.yaml b/.github/workflows/compile.yaml new file mode 100644 index 0000000..1e12785 --- /dev/null +++ b/.github/workflows/compile.yaml @@ -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 528020ecc73a0c5b554cb7fa003a8cbf1171246c Mon Sep 17 00:00:00 2001 From: iRainy22 Date: Wed, 18 Feb 2026 11:33:59 -0800 Subject: [PATCH 2/3] Program now exits after first 'nothing' resolves #96 --- main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d9884f9..de3e6dd 100644 --- a/main.cpp +++ b/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include using std::cout; using std::cin; @@ -21,7 +22,9 @@ int main(){ pick = rand() % VALIDATION.size(); cout << "What are you listening to?\n"; getline(cin,input); + transform(input.begin(), input.end(), input.begin(), [](unsigned char c){ return std::tolower(c); }); + if( input == "nothing" ) {return 0;} cout << VALIDATION[pick] << "! Let's listen to more\n"; do{ @@ -33,4 +36,4 @@ int main(){ }while( input != "nothing" ); return 0; -} \ No newline at end of file +} From 1f4f8eb4a008e64250517194f68dfc644aa845dd Mon Sep 17 00:00:00 2001 From: iRainy22 Date: Wed, 18 Feb 2026 11:53:11 -0800 Subject: [PATCH 3/3] fixed merge conflicts --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 690cf17..df08644 100644 --- a/main.cpp +++ b/main.cpp @@ -24,6 +24,7 @@ int main(){ pick = rand() % VALIDATION.size(); cout << "What are you listening to?\n"; input = get_input_in_lowercase(); + if( input == "nothing" ) {return 0;} cout << VALIDATION[pick] << "! Let's listen to more\n"; do{ @@ -41,4 +42,4 @@ string get_input_in_lowercase(){ getline(cin,in); transform(in.begin(), in.end(), in.begin(), [](unsigned char c){ return std::tolower(c); }); return in; -} \ No newline at end of file +}