-
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.
[Feat] : add Scripts and github workflows
- Loading branch information
1 parent
19fed98
commit 3922adb
Showing
16 changed files
with
638 additions
and
3 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,30 @@ | ||
name: Report a bug | ||
description: Report a bug | ||
title: '[Bug]: ' | ||
labels: | ||
- bug | ||
body: | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What happened? | ||
description: Tell us what happened | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: what-should-happened | ||
attributes: | ||
label: 'What should have happened?' | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: log | ||
attributes: | ||
label: LOG | ||
description: If you have log, please send it to us! | ||
- type: checkboxes | ||
attributes: | ||
label: I read the Code Of Conduct | ||
options: | ||
- label: I read the Code Of Conduct and I comply to it | ||
required: true |
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,29 @@ | ||
name: Feature request | ||
description: Suggest an idea for this project | ||
title: '[Feature]: ' | ||
assignees: | ||
- {{ github.actor }} | ||
labels: | ||
- enhancement | ||
projects: | ||
- '1044' | ||
body: | ||
- type: input | ||
id: featureName | ||
attributes: | ||
label: Feature name | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: featureContent | ||
attributes: | ||
label: Explain the feature | ||
description: Tell us what we should add | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
attributes: | ||
label: I read the Code Of Conduct | ||
options: | ||
- label: I read the Code Of Conduct and I comply to it | ||
required: true |
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,24 @@ | ||
name: I have a question | ||
description: Ask you question, we will answer in documentation () and below your question | ||
title: '[Question]: ' | ||
labels: | ||
- enhancement | ||
body: | ||
- type: input | ||
id: questionAbout | ||
attributes: | ||
label: What is your question is about ? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: questionContent | ||
attributes: | ||
label: Ask your question here | ||
validations: | ||
required: true | ||
- type: checkboxes | ||
attributes: | ||
label: I read the Code Of Conduct | ||
options: | ||
- label: I read the Code Of Conduct and I comply to it | ||
required: true |
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,28 @@ | ||
name: Build Laplace Libs CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
if: always() | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: make lib | ||
run: | | ||
make lib | ||
exit $(($? != 0)) | ||
- name: SonarCloud Scan for C and C++ | ||
uses: SonarSource/[email protected] | ||
|
||
- name: Check if build succeeded | ||
run: exit $(($? != 0)) |
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
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,25 @@ | ||
name: C++ Norm Checker | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up C++ environment | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Check C++ norm by Laplace Linter | ||
run: | | ||
./Scripts/norm_checker.py |
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,70 @@ | ||
name: Create Release | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- closed | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_BOT_ACC_EMAIL: [email protected] | ||
GH_BOT_ACC_NAME: github-actions[bot] | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check if PR is merged to main | ||
id: pr-check | ||
run: echo "::set-output name=merged::$(jq -r '.pull_request.merged' $GITHUB_EVENT_PATH)" | ||
|
||
- name: Install GitHub CLI | ||
run: | | ||
sudo apt update | ||
sudo apt install gh | ||
- name: Set up Git | ||
run: | | ||
git config --local user.email $GH_BOT_ACC_EMAIL | ||
git config --local user.name $GH_BOT_ACC_NAME | ||
- name: Authenticate GitHub CLI | ||
run: gh auth login --with-token <<<"${GITHUB_TOKEN}" | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Increment Version | ||
if: steps.pr-check.outputs.merged == 'true' | ||
run: | | ||
# Read the current version from the VERSION file | ||
current_version=$(cat VERSION) | ||
# Increment the version (you can use any logic you prefer) | ||
new_version=$(python3 increment_version.py $current_version) | ||
# Update the VERSION file with the new version | ||
echo "$new_version" > VERSION | ||
# Commit and push the updated VERSION file | ||
git add VERSION | ||
git commit -m "chore(VERSION): bump version to $new_version" | ||
git push origin main | ||
- name: Create Tag and Release | ||
if: success() && steps.pr-check.outputs.merged == 'true' | ||
run: | | ||
# Create a new tag with the version | ||
git tag -a v$new_version -m "Engine-3D v$new_version" | ||
git push origin v$new_version | ||
# Create a new release | ||
gh release create v$new_version |
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,30 @@ | ||
name: Engine testing | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
testing: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install CMake | ||
run: sudo apt-get install -y cmake build-essential | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install CSFML | ||
run: ./Scripts/install_csfml.sh | ||
|
||
- name: Install Criterion | ||
run: sudo apt-get install libcriterion-dev | ||
|
||
- name: Build engine | ||
run: make build_tests | ||
|
||
- name: Testing engine | ||
run: make run_tests |
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,48 @@ | ||
on: | ||
workflow_run: | ||
workflows: ["Publish Release"] | ||
types: | ||
- completed | ||
|
||
env: | ||
GH_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
GH_BOT_ACC_EMAIL: [email protected] | ||
GH_BOT_ACC_NAME: github-actions[bot] | ||
|
||
jobs: | ||
readme-update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --local user.email $GH_BOT_ACC_EMAIL | ||
git config --local user.name $GH_BOT_ACC_NAME | ||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install requirements | ||
run: pip install -r requirements.txt | ||
|
||
- name: Get Latest Release Date | ||
id: latest_release_date | ||
run: | | ||
python3 Scripts/get_latest_release_date.py > latest_release_date.txt | ||
echo "::set-output name=release_date::$(cat latest_release_date.txt)" | ||
- name: Update README.md | ||
run: | | ||
release_date=$(cat latest_release_date.txt) | ||
sed -i "s/- Release Date: \*\*([JFMASOND][a-z]+ \d+, \d+)\*\*/- Release Date: $release_date/" README.md | ||
- name: Commit and Push Changes | ||
run: | | ||
git add README.md | ||
git commit -m "chore(README): update README.md with latest release date (bot)" | ||
git push |
Oops, something went wrong.