Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into new-feature/automatio…
Browse files Browse the repository at this point in the history
…n/37
  • Loading branch information
DaniloMilenkovic committed Dec 13, 2024
2 parents 9651c0f + c96dadc commit 4eb2efc
Show file tree
Hide file tree
Showing 1,638 changed files with 1,857,239 additions and 19,029 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/checkIndexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
regex:
type: string
description: Regex to use when searching for indexed items
default: "arm_gcc_clang|arm_mikroc|clocks|database|dspic|^images$|mikroe_utils|pic|preinit|riscv|schemas|unit_test_lib"
default: "arm_gcc_clang|arm_mikroc|clocks|database|dspic|^images$|mikroe_utils|avr|pic|preinit|riscv|schemas|unit_test_lib|.+[device|tool]_support$"
fix:
type: boolean
description: Fix the broken links with new ones?
Expand All @@ -26,6 +26,9 @@ on:
schedule:
- cron: "0/30 7-16 * * 1-5" # Every 30 minutes, between 07:00 AM and 04:59 PM, Monday through Friday

env:
GLOBAL_REGEX: "arm_gcc_clang|arm_mikroc|clocks|database|dspic|^images$|mikroe_utils|avr|pic|preinit|riscv|schemas|unit_test_lib|.+[device|tool]_support$"

jobs:
manual_run:
if: ${{ github.event_name == 'workflow_dispatch' }}
Expand All @@ -47,13 +50,19 @@ jobs:
- name: Check Indexed Links - Live
if: ${{ github.event.inputs.select_index == 'Live' || github.event.inputs.select_index == 'Both' }}
run: |
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ES_INDEX_LIVE }} "--es_regex" "${{ github.event.inputs.regex }}" "--log_only" ${{ !github.event.inputs.fix }}
FIX_ACTION=${{ github.event.inputs.fix }} # Capture the fix input
LOG_ONLY=$([[ "$FIX_ACTION" == "false" ]] && echo true || echo false) # Negate the fix input
echo "LOG_ONLY is set to $LOG_ONLY"
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ME_ES_HOST }} ${{ secrets.ME_ES_USER }} ${{ secrets.ME_ES_PASSWORD }} ${{ secrets.ES_INDEX_LIVE }} "--es_regex" "${{ github.event.inputs.regex }}" "--log_only" "$LOG_ONLY"
continue-on-error: true # Ensure the workflow continues

- name: Check Indexed Links - Test
if: ${{ github.event.inputs.select_index == 'Test' || github.event.inputs.select_index == 'Both' }}
run: |
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ES_INDEX_TEST }} "--es_regex" "${{ github.event.inputs.regex }}" "--log_only" ${{ !github.event.inputs.fix }}
FIX_ACTION=${{ github.event.inputs.fix }} # Capture the fix input
LOG_ONLY=$([[ "$FIX_ACTION" == "false" ]] && echo true || echo false) # Negate the fix input
echo "LOG_ONLY is set to $LOG_ONLY"
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ME_ES_HOST }} ${{ secrets.ME_ES_USER }} ${{ secrets.ME_ES_PASSWORD }} ${{ secrets.ES_INDEX_TEST }} "--es_regex" "${{ github.event.inputs.regex }}" "--log_only" "$LOG_ONLY"
continue-on-error: true # Ensure the workflow continues

push_to_main_run:
Expand All @@ -75,12 +84,12 @@ jobs:
- name: Check Indexed Links - Live
run: |
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ES_INDEX_LIVE }} "--es_regex" "arm_gcc_clang|arm_mikroc|clocks|database|dspic|^images$|mikroe_utils|pic|preinit|riscv|schemas|unit_test_lib"
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ME_ES_HOST }} ${{ secrets.ME_ES_USER }} ${{ secrets.ME_ES_PASSWORD }} ${{ secrets.ES_INDEX_LIVE }} "--es_regex" "$GLOBAL_REGEX"
continue-on-error: true # Ensure the workflow continues

- name: Check Indexed Links - Test
run: |
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ES_INDEX_TEST }} "--es_regex" "arm_gcc_clang|arm_mikroc|clocks|database|dspic|^images$|mikroe_utils|pic|preinit|riscv|schemas|unit_test_lib"
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ME_ES_HOST }} ${{ secrets.ME_ES_USER }} ${{ secrets.ME_ES_PASSWORD }} ${{ secrets.ES_INDEX_TEST }} "--es_regex" "$GLOBAL_REGEX"
continue-on-error: true # Ensure the workflow continues

scheduled_run:
Expand All @@ -102,10 +111,10 @@ jobs:
- name: Check Indexed Links - Live
run: |
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ES_INDEX_LIVE }} "--es_regex" "arm_gcc_clang|arm_mikroc|clocks|database|dspic|^images$|mikroe_utils|pic|preinit|riscv|schemas|unit_test_lib"
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ME_ES_HOST }} ${{ secrets.ME_ES_USER }} ${{ secrets.ME_ES_PASSWORD }} ${{ secrets.ES_INDEX_LIVE }} "--es_regex" "$GLOBAL_REGEX"
continue-on-error: true # Ensure the workflow continues

- name: Check Indexed Links - Test
run: |
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ES_INDEX_TEST }} "--es_regex" "arm_gcc_clang|arm_mikroc|clocks|database|dspic|^images$|mikroe_utils|pic|preinit|riscv|schemas|unit_test_lib"
python -u scripts/check_indexes.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_HOST }} ${{ secrets.ES_USER }} ${{ secrets.ES_PASSWORD }} ${{ secrets.ME_ES_HOST }} ${{ secrets.ME_ES_USER }} ${{ secrets.ME_ES_PASSWORD }} ${{ secrets.ES_INDEX_TEST }} "--es_regex" "$GLOBAL_REGEX"
continue-on-error: true # Ensure the workflow continues
13 changes: 13 additions & 0 deletions .github/workflows/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
pip install -r scripts/requirements/shared.txt
sudo apt-get install p7zip-full
- name: Update and upload new database
run: |
python -u scripts/reupload_databases.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ secrets.PROG_DEBUG_CODEGRIP }} ${{ secrets.PROG_DEBUG_MIKROPROG }} ${{ github.event.inputs.release_version }} "latest" ${{ github.event.inputs.select_index }}
- name: Run Index Script
env:
ES_HOST: ${{ secrets.ES_HOST }}
Expand All @@ -56,3 +60,12 @@ jobs:
fi
python -u scripts/index.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} ${{ secrets.ES_INDEX_TEST }} ${{ github.event.inputs.force_index }} ${{ github.event.inputs.release_version }} False False
fi
- name: Send notification to Mattermost
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
run: |
MESSAGE="Core version \"${{ github.event.inputs.release_version }}\" indexed."
curl -X POST -H 'Content-Type: application/json' \
--data "{\"text\": \"$MESSAGE\"}" \
$MATTERMOST_WEBHOOK_URL
54 changes: 54 additions & 0 deletions .github/workflows/newCoreRecursiveBuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: New Core Files Build Test

on:
workflow_dispatch:

jobs:
recursiveCoreBuild:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure full history is fetched, not just the latest commit

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Add GitHub Actions credentials
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Fetch Main Branch
run: git fetch origin main:main # Ensure the main branch is fetched

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements/shared.txt
pip install -r scripts/requirements/databases.txt
pip install colorama
pip install enums
sudo apt-get update
sudo apt-get install $(cat scripts/requirements/recursive_build.txt)
- name: Install NECTO
run: |
export NECTO_DOWNLOAD_URL=${{ secrets.NECTO_DEV_DOWNLOAD_URL }}
python -u scripts/install_necto.py
- name: Run Core Files Build
run: |
python -u scripts/recursive_build.py
- name: Archive test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: /home/runner/test_results
3 changes: 3 additions & 0 deletions .github/workflows/notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Notify Mattermost
on:
workflow_dispatch:

schedule:
- cron: "0 10 * * 1-5" # 11:00 AM, Monday through Friday

jobs:
notify:
runs-on: ubuntu-latest
Expand Down
77 changes: 0 additions & 77 deletions .github/workflows/recursiveBuild.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
pip install -r scripts/requirements/release.txt
pip install -r scripts/requirements/databases.txt
- name: Update database for packaging
run: |
python -u scripts/reupload_databases.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ secrets.PROG_DEBUG_CODEGRIP }} ${{ secrets.PROG_DEBUG_MIKROPROG }} "latest" "latest" "Live" "--mcus_only" "True"
- name: Run Release Script
env:
DB_PATH: ${{ secrets.DB_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdkAutomation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Send greeting
run: echo "Starting CORE generation workflow..."
# Checkout branch
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Authorize Mikroe Actions App
uses: actions/create-github-app-token@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sdkAutomation_noBuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Send greeting
run: echo "Starting CORE generation workflow..."
# Checkout branch
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Authorize Mikroe Actions App
uses: actions/create-github-app-token@v1
Expand Down
Loading

0 comments on commit 4eb2efc

Please sign in to comment.