Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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: make clean && make
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CC=g++
all:
$(CC) -std=c++17 main.cpp

.PHONY: clean

clean:
rm -f *.o*
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Build C++](https://github.com/itsmecharliev/autovalidate/actions/workflows/build.yml/badge.svg)](https://github.com/itsmecharliev/autovalidate/actions/workflows/build.yml)
# autovalidate

I like that app too!

This repo is compatible with the [cpp-container docker container](https://github.com/ChicoState/cpp-container).
This repo is compatible with the [cpp-container docker container](https://github.com/ChicoState/cpp-container).
9 changes: 4 additions & 5 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ int main(){
pick = rand() % 4;
cout << "What are you listening to?\n";
getline(cin,input);
cout << VALIDATION[pick] << "! Let's listen to more\n";

do{
while ( input != "nothing" ){
cout << VALIDATION[pick] << "! Let's listen to more\n";
cout << "What's next?\n";
getline(cin,input);
pick = rand() % 4;
cout << VALIDATION[pick] << "!\n";
}while( input != "nothing" );
}

return 0;
}
}