From 5b5b9ece088baea199f2ae16e0dc89150bfae9af Mon Sep 17 00:00:00 2001 From: Jorge Castaneda <123991086+Jorge-C-2000@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:28:28 -0800 Subject: [PATCH 1/3] Create c-cpp.yml Create continuous Integration --- .github/workflows/c-cpp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..b00b272 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,23 @@ +name: C/C++ CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From 0cf5e5df122029b4e415bd1a4c6034ef8a0e272d Mon Sep 17 00:00:00 2001 From: Jorge Castaneda <123991086+Jorge-C-2000@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:32:00 -0800 Subject: [PATCH 2/3] Updated to yml file Changed to adapted given action file --- .github/workflows/c-cpp.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index b00b272..f16dda0 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,23 +1,23 @@ -name: C/C++ CI +name: Build C++ on: push: - branches: [ "main" ] + branches: [ main ] pull_request: - branches: [ "main" ] + 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: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck + - uses: actions/checkout@v1 + - name: Build project + run: g++ GameDie.cpp -std=c++17 -Wall -Wextra -Werror -o GameDie From 536beef9510c82c01a7822642efbee4bb7e54020 Mon Sep 17 00:00:00 2001 From: Jorge Castaneda <123991086+Jorge-C-2000@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:46:42 -0800 Subject: [PATCH 3/3] Updated README added status badge --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a8fe2c..d617ca1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![Build C++](https://github.com/Jorge-C-2000/GameDie/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/Jorge-C-2000/GameDie/actions/workflows/c-cpp.yml) + + # GameDie This repository provides a class that represents a game die, such as the @@ -23,4 +26,4 @@ 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`