diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8831052 --- /dev/null +++ b/.github/workflows/main.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++ GameDie.cpp -std=c++17 -o firstIO diff --git a/GameDie.o b/GameDie.o new file mode 100644 index 0000000..e4ff5b8 Binary files /dev/null and b/GameDie.o differ diff --git a/Makefile b/Makefile index fc44534..fbf2a0f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ CC=g++ all: - $(CC) -Wall *.cpp \ No newline at end of file + $(CC) -Wall -c GameDie.cpp + diff --git a/README.md b/README.md index 9a8fe2c..3bc0ddb 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,8 @@ Once built, run the image: ...or run it with a bind mount to the current source code: -`docker run --mount type=bind,source="$(pwd)",target=/usr/src -it cpp-container` \ No newline at end of file +`docker run --mount type=bind,source="$(pwd)",target=/usr/src -it cpp-container` + + + +[![Build C++](https://github.com/JAlvarado28/GameDie/actions/workflows/main.yml/badge.svg)](https://github.com/JAlvarado28/GameDie/actions/workflows/main.yml)