diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml new file mode 100644 index 00000000..9e90b0b9 --- /dev/null +++ b/.github/workflows/clang-format.yml @@ -0,0 +1,13 @@ +name: clang-format + +on: [push, pull_request] + +jobs: + cpp-formatting-check: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + - uses: actions/checkout@v3 + - name: Run clang-format + run: | + clang-format --dry-run -style=google $(find . -name '*.cpp' -or -name '*.h') diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml new file mode 100644 index 00000000..a95a4475 --- /dev/null +++ b/.github/workflows/make.yml @@ -0,0 +1,23 @@ +name: Make + +on: [push, pull_request] + +jobs: + Make: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Make + run: | + make clean + make + - name: Upload executable + uses: actions/upload-artifact@v4 + with: + # suppose we compiled our game and named it 'stocksim' + name: stocksim + path: stocksim + compression-level: 9 + retention-days: 90 + if-no-files-found: error