diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..b5bf693 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,23 @@ +name: Build C++ + +on: + push: + branches: "**" + 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 diff --git a/main.cpp b/main.cpp index d9884f9..b46346c 100644 --- a/main.cpp +++ b/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include using std::cout; using std::cin; @@ -22,6 +23,10 @@ int main(){ 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 +38,4 @@ int main(){ }while( input != "nothing" ); return 0; -} \ No newline at end of file +}