Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into new-feature/boards/18
Browse files Browse the repository at this point in the history
  • Loading branch information
StrahinjaJacimovic committed Oct 3, 2024
2 parents ac6e47d + 24f5b16 commit d16e680
Show file tree
Hide file tree
Showing 84 changed files with 2,424 additions and 288 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/boardCardReleaseTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
MIKROE_NECTO_AWS: ${{ secrets.MIKROE_NECTO_AWS }}
run: |
echo "Indexing to Test."
python -u scripts/index.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ steps.changelog_update.outputs.sdk_tag_name }} ${{ secrets.ES_INDEX_TEST }} "False"
python -u scripts/index.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ steps.changelog_update.outputs.sdk_tag_name }} ${{ secrets.ES_INDEX_TEST }} "False" "--board_card_only" "True"
- name: Trigger database update in Core repo
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/branch_patterns/delete_patterns.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
new-feature/boards
new-feature/cards
revert*
22 changes: 21 additions & 1 deletion .github/workflows/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
type: boolean
description: Promote selected version to latest? (Only applied if index is set to "live")
default: false
notify_sdk:
type: boolean
description: Notify SDK
default: false

jobs:
index:
Expand All @@ -38,6 +42,7 @@ jobs:
pip install requests
pip install py7zr
pip install chardet
pip install alive-progress
pip install elasticsearch==7.13.4
sudo apt-get install p7zip-full
Expand All @@ -56,7 +61,7 @@ jobs:
if [[ ${{ github.event.inputs.set_as_latest }} ]]; then
echo "Promote to latest requested, but ignored. Only available for LIVE updates."
fi
python -u scripts/index.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ github.event.inputs.release_version }} ${{ secrets.ES_INDEX_TEST }}
python -u scripts/index.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ github.event.inputs.release_version }} ${{ secrets.ES_INDEX_TEST }} "False"
fi
- name: Trigger database update in Core repo
Expand All @@ -80,3 +85,18 @@ jobs:
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"version\": \"$version\", \"index\": \"$index\", \"unit\": false, \"integration\": true}}"
- name: Build SDK Message with Python
if: ${{ github.event.inputs.notify_sdk == 'true' }}
run: |
python -u scripts/build_message_sdk.py "${{ github.event.inputs.release_version }}" > message.txt
- name: Send SDK notification to Mattermost
if: ${{ github.event.inputs.notify_sdk == 'true' }}
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
run: |
MESSAGE=$(cat message.txt)
curl -X POST -H 'Content-Type: application/json' \
--data "{\"text\": \"$MESSAGE\"}" \
$MATTERMOST_WEBHOOK_URL
36 changes: 34 additions & 2 deletions .github/workflows/notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@ name: Notify Mattermost

on:
workflow_dispatch:
inputs:
notify_sdk:
type: boolean
description: Notify SDK
default: false
release_version:
type: string
description: SDK tag version to use
default: mikroSDK-2.11.3
notify_components:
type: boolean
description: Notify Boards/Cards
default: false

jobs:
notify:
Expand All @@ -22,12 +35,31 @@ jobs:
pip install requests
pip install py7zr
pip install chardet
pip install beautifulsoup4
pip install markdown
- name: Build Message with Python
- name: Build SDK Message with Python
if: ${{ github.event.inputs.notify_sdk == 'true' }}
run: |
python -u scripts/build_message_sdk.py "${{ github.event.inputs.release_version }}" > message.txt
- name: Send SDK notification to Mattermost
if: ${{ github.event.inputs.notify_sdk == 'true' }}
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
run: |
MESSAGE=$(cat message.txt | jq -Rs .)
curl -X POST -H 'Content-Type: application/json' \
--data "{\"text\": $MESSAGE}" \
$MATTERMOST_WEBHOOK_URL
- name: Build Boards/Cards Message with Python
if: ${{ github.event.inputs.notify_components == 'true' }}
run: |
python -u scripts/build_message.py > message.txt
- name: Send notification to Mattermost
- name: Send Boards/Cards notification to Mattermost
if: ${{ github.event.inputs.notify_components == 'true' }}
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pruneBranchesByPatterns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
# Upload the artifact (deleted_branches.txt file)
- name: Upload deleted branches log as artifact
if: steps.run_script.outputs.deleted_count != '0' # Only upload if there were deletions
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: deleted-branches-log
path: deleted_branches.txt
29 changes: 1 addition & 28 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,4 @@ jobs:
run: python -u scripts/keyword_replace.py "code" "_code" "thirdparty/ethernet/cyclonetcp" "cp1252"

- name: Run Package Script
run: python -u scripts/package.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ github.event.release.tag_name }}

- name: Trigger database update in Core repo
run: |
# Set the required variables
repo_owner="MikroElektronika"
repo_name="core_packages"
event_type="trigger-workflow"
version="${{ github.event.release.tag_name }}"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.MIKROE_ACTIONS_KEY }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"version\": \"$version\", \"index\": \"Test\", \"unit\": false, \"integration\": true}}"
# Wait 30 seconds to give GIT time to merge everything
sleep 30s
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.MIKROE_ACTIONS_KEY }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"version\": \"$version\", \"index\": \"Live\", \"unit\": false, \"integration\": true}}"
run: python -u scripts/package.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ github.event.release.tag_name }} "False"
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ output
__pycache__
*.7z
tmp
install
.cache
.meproject
build*
.clangd
compile_commands.json
settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if(${_MSDK_BOARD_NAME_} STREQUAL "BOARD_NUCLEO_144_WITH_STM32F767ZI")
set(BOARD_PATH "include/boards/board_nucleo_144_with_stm32f767zi")
set(MCU_CARD FALSE)
set(SHIELD TRUE)
endif()
Loading

0 comments on commit d16e680

Please sign in to comment.