Introduce new example for baremetal application #39
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
name: Run Simulation Tests | |
on: | |
push: | |
branches: | |
- '*' # Trigger on push to any branch | |
pull_request: | |
branches: | |
- '*' # Trigger on pull request to any branch | |
jobs: | |
sil: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code with submodules | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
# Install dependencies | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest swig | |
# Install CMake and build tools | |
- name: Install CMake and build tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install cmake gcc g++ python3-dev -y | |
# Find all example directories and build them dynamically | |
- name: Build and test all examples | |
run: | | |
EXAMPLES_DIR="examples" | |
for example in $(find "$EXAMPLES_DIR" -maxdepth 1 -type d | tail -n +2); do | |
echo "Processing $example..." | |
# Create build directory and configure the project | |
mkdir -p "$example/build" | |
cd "$example/build" | |
cmake .. | |
# Build the project | |
make | |
echo "Running tests for $example..." | |
cd "$example/test" | |
sh run_tests.sh | |
# Return to root directory for the next example | |
cd ../../../ | |
done |