-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Github actions to automatically test compile and check code formatting for every pull requests and pushes. Signed-off-by: Cheng Ho Ming <eric310@connect.hku.hk>
- Loading branch information
1 parent
a0a5164
commit e19de34
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |