documentation update #32
This file contains hidden or 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 is the name of the workflow, visible on GitHub UI. | |
| name: TaskScheduler Examples Build | |
| # Controls when the action will run. | |
| on: | |
| # Triggers the workflow on push or pull request only for the main branch | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| workflow_dispatch: | |
| # This is the list of jobs that will be run concurrently. | |
| # Since we use a build matrix, the actual number of jobs | |
| # started depends on how many configurations the matrix | |
| # will produce. | |
| jobs: | |
| # This is the name of the job - can be whatever. | |
| ArduinoIDE_AVR: | |
| # Here we tell GitHub that the jobs must be determined | |
| # dynamically depending on a matrix configuration. | |
| strategy: | |
| matrix: | |
| # The matrix will produce one job for each configuration | |
| # parameter of type `arduino-platform`, in this case, it | |
| # is only 1. | |
| arduino-platform: ["arduino:avr"] | |
| # This is usually optional but we need to statically define the | |
| # FQBN of the boards we want to test for each platform. In the | |
| # future the CLI might automatically detect and download the | |
| # core needed to compile against a certain FQBN, at that point | |
| # the following `include` section will be useless. | |
| fqbn: ["arduino:avr:uno"] | |
| example: | |
| - "Scheduler_example00_Blink" | |
| - "Scheduler_example00_Blink_Namespace" | |
| - "Scheduler_example01" | |
| - "Scheduler_example02" | |
| - "Scheduler_example03" | |
| - "Scheduler_example04_StatusRequest" | |
| - "Scheduler_example05_StatusRequest" | |
| - "Scheduler_example06_IDLE" | |
| - "Scheduler_example07_WDT" | |
| - "Scheduler_example08_LTS" | |
| - "Scheduler_example09_TimeCritical" | |
| - "Scheduler_example10_Benchmark" | |
| - "Scheduler_example11_Priority" | |
| - "Scheduler_example12_Priority" | |
| - "Scheduler_example13_Micros" | |
| - "Scheduler_example16_Multitab" | |
| - "Scheduler_example17_Timeout" | |
| - "Scheduler_example18_StatusRequest_LTS_WDT_Timeout" | |
| - "Scheduler_example19_Dynamic_Tasks" | |
| - "Scheduler_example19_Dynamic_Tasks_SelfDestruct" | |
| - "Scheduler_example20_StatusRequest_LTS_WDT_Timeout_Object" | |
| - "Scheduler_example21_OO_Callbacks" | |
| - "Scheduler_example23_IDLE_Callback" | |
| - "Scheduler_example24_CPU_LOAD" | |
| - "Scheduler_example25_SCHEDULER_CHAIN" | |
| - "Scheduler_example26_SCHEDULING_OPTIONS" | |
| - "Scheduler_example28_Tickless" | |
| # This is the platform GitHub will use to run our workflow, | |
| # I picked ubuntu. | |
| runs-on: ubuntu-latest | |
| # This is the list of steps this job will run. | |
| steps: | |
| # First of all, we clone the repo using the `checkout` action. | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| # We use the `arduino/setup-arduino-cli` action to install and | |
| # configure the Arduino CLI on the system. | |
| - name: Setup Arduino CLI | |
| uses: arduino/[email protected] | |
| # We then install the platform, which one will be determined | |
| # dynamically by the build matrix. | |
| - name: Install platform | |
| run: | | |
| arduino-cli core update-index | |
| arduino-cli core install ${{ matrix.arduino-platform }} | |
| - name: Install repo as library | |
| run: | | |
| mkdir -p "$HOME/Arduino/libraries" | |
| ln -s "$PWD" "$HOME/Arduino/libraries/." | |
| - name: Install required libraries | |
| run: | | |
| mkdir -p "$HOME/Arduino/libraries" | |
| # Install QueueArray from Arduino Playground | |
| wget -O queuearray.zip https://playground.arduino.cc/uploads/Code/QueueArray/index.zip | |
| unzip queuearray.zip -d "$HOME/Arduino/libraries/" | |
| # Install MemoryFree library from Arduino Library Manager | |
| git clone https://github.com/McNeight/MemoryFree.git | |
| cp -r MemoryFree "$HOME/Arduino/libraries/" | |
| # Finally, we compile the sketch, using the FQBN that was set | |
| # in the build matrix. | |
| - name: Compile ${{ matrix.example }} | |
| run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/${{ matrix.example }} --warnings more | |
| ArduinoIDE_ESP32: | |
| strategy: | |
| matrix: | |
| arduino-platform: ["esp32:esp32"] | |
| fqbn: ["esp32:esp32:esp32"] | |
| example: | |
| - "Scheduler_example00_Blink" | |
| - "Scheduler_example00_Blink_Namespace" | |
| - "Scheduler_example01" | |
| - "Scheduler_example02" | |
| - "Scheduler_example03" | |
| - "Scheduler_example04_StatusRequest" | |
| - "Scheduler_example05_StatusRequest" | |
| - "Scheduler_example06_IDLE" | |
| - "Scheduler_example08_LTS" | |
| - "Scheduler_example09_TimeCritical" | |
| - "Scheduler_example10_Benchmark" | |
| - "Scheduler_example11_Priority" | |
| - "Scheduler_example12_Priority" | |
| - "Scheduler_example13_Micros" | |
| - "Scheduler_example15_STDFunction" | |
| - "Scheduler_example16_Multitab" | |
| - "Scheduler_example17_Timeout" | |
| - "Scheduler_example18_StatusRequest_LTS_WDT_Timeout" | |
| - "Scheduler_example19_Dynamic_Tasks" | |
| - "Scheduler_example19_Dynamic_Tasks_SelfDestruct" | |
| - "Scheduler_example19_Dynamic_Tasks_stdQueue" | |
| - "Scheduler_example20_StatusRequest_LTS_WDT_Timeout_Object" | |
| - "Scheduler_example21_OO_Callbacks" | |
| - "Scheduler_example23_IDLE_Callback" | |
| - "Scheduler_example24_CPU_LOAD" | |
| - "Scheduler_example25_SCHEDULER_CHAIN" | |
| - "Scheduler_example26_SCHEDULING_OPTIONS" | |
| - "Scheduler_example28_Tickless" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Setup Arduino CLI | |
| uses: arduino/[email protected] | |
| - name: Install platform | |
| run: | | |
| arduino-cli core update-index | |
| arduino-cli core install ${{ matrix.arduino-platform }} | |
| - name: Install repo as library | |
| run: | | |
| mkdir -p "$HOME/Arduino/libraries" | |
| ln -s "$PWD" "$HOME/Arduino/libraries/." | |
| - name: Install required libraries | |
| run: | | |
| mkdir -p "$HOME/Arduino/libraries" | |
| # Install QueueArray from Arduino Playground | |
| wget -O queuearray.zip https://playground.arduino.cc/uploads/Code/QueueArray/index.zip | |
| unzip queuearray.zip -d "$HOME/Arduino/libraries/" | |
| # Install MemoryFree library from Arduino Library Manager | |
| git clone https://github.com/McNeight/MemoryFree.git | |
| cp -r MemoryFree "$HOME/Arduino/libraries/" | |
| - name: Compile ${{ matrix.example }} | |
| run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/${{ matrix.example }} --warnings more | |
| ArduinoIDE_ESP8266_ONLY: | |
| strategy: | |
| matrix: | |
| arduino-platform: ["esp8266:esp8266"] | |
| fqbn: ["esp8266:esp8266:nodemcuv2"] | |
| example: | |
| - "Scheduler_example14_Yield" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Setup Arduino CLI | |
| uses: arduino/[email protected] | |
| - name: Install platform | |
| run: | | |
| arduino-cli core update-index --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json | |
| arduino-cli core install ${{ matrix.arduino-platform }} --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json | |
| - name: Install repo as library | |
| run: | | |
| mkdir -p "$HOME/Arduino/libraries" | |
| ln -s "$PWD" "$HOME/Arduino/libraries/." | |
| - name: Compile ${{ matrix.example }} | |
| run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/${{ matrix.example }} --warnings more | |
| ArduinoIDE_STM32: | |
| strategy: | |
| matrix: | |
| arduino-platform: ["STMicroelectronics:stm32"] | |
| fqbn: ["STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F401RE"] | |
| example: | |
| - "Scheduler_example00_Blink" | |
| - "Scheduler_example00_Blink_Namespace" | |
| - "Scheduler_example01" | |
| - "Scheduler_example02" | |
| - "Scheduler_example03" | |
| - "Scheduler_example04_StatusRequest" | |
| - "Scheduler_example05_StatusRequest" | |
| - "Scheduler_example06_IDLE" | |
| - "Scheduler_example08_LTS" | |
| - "Scheduler_example09_TimeCritical" | |
| - "Scheduler_example10_Benchmark" | |
| - "Scheduler_example11_Priority" | |
| - "Scheduler_example12_Priority" | |
| - "Scheduler_example13_Micros" | |
| - "Scheduler_example15_STDFunction" | |
| - "Scheduler_example16_Multitab" | |
| - "Scheduler_example17_Timeout" | |
| - "Scheduler_example18_StatusRequest_LTS_WDT_Timeout" | |
| - "Scheduler_example19_Dynamic_Tasks" | |
| - "Scheduler_example19_Dynamic_Tasks_SelfDestruct" | |
| - "Scheduler_example19_Dynamic_Tasks_stdQueue" | |
| - "Scheduler_example20_StatusRequest_LTS_WDT_Timeout_Object" | |
| - "Scheduler_example21_OO_Callbacks" | |
| - "Scheduler_example23_IDLE_Callback" | |
| - "Scheduler_example24_CPU_LOAD" | |
| - "Scheduler_example25_SCHEDULER_CHAIN" | |
| - "Scheduler_example26_SCHEDULING_OPTIONS" | |
| - "Scheduler_example28_Tickless" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Setup Arduino CLI | |
| uses: arduino/[email protected] | |
| - name: Install platform | |
| run: | | |
| arduino-cli core update-index --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json | |
| arduino-cli core install ${{ matrix.arduino-platform }} --additional-urls https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json | |
| - name: Install repo as library | |
| run: | | |
| mkdir -p "$HOME/Arduino/libraries" | |
| ln -s "$PWD" "$HOME/Arduino/libraries/." | |
| - name: Install required libraries | |
| run: | | |
| mkdir -p "$HOME/Arduino/libraries" | |
| # Install QueueArray from Arduino Playground | |
| wget -O queuearray.zip https://playground.arduino.cc/uploads/Code/QueueArray/index.zip | |
| unzip queuearray.zip -d "$HOME/Arduino/libraries/" | |
| # Install MemoryFree library from GitHub | |
| git clone https://github.com/McNeight/MemoryFree.git | |
| cp -r MemoryFree "$HOME/Arduino/libraries/" | |
| - name: Compile ${{ matrix.example }} | |
| run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/${{ matrix.example }} --warnings more | |
| PIO: | |
| strategy: | |
| matrix: | |
| example: | |
| - "Scheduler_example27_PlatformIO" | |
| - "Scheduler_example29_NonArduino" | |
| environment: | |
| - "esp32dev" | |
| include: | |
| - example: "Scheduler_example27_PlatformIO" | |
| environment: "esp32dev" | |
| - example: "Scheduler_example29_NonArduino" | |
| environment: "esp32dev" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install PlatformIO | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install platformio | |
| - name: Setup libraries for PlatformIO | |
| run: | | |
| cd examples/${{ matrix.example }} | |
| # Remove any existing lib_deps from platformio.ini that reference TaskScheduler | |
| sed -i '/arkhipenko\/TaskScheduler/d' platformio.ini || true | |
| sed -i '/TaskScheduler/d' platformio.ini || true | |
| # Clone the current branch/commit to get TaskScheduler source | |
| mkdir -p lib | |
| git clone --depth 1 --branch ${GITHUB_REF#refs/heads/} https://github.com/${GITHUB_REPOSITORY}.git lib/TaskScheduler | |
| # Install other required libraries | |
| wget -O queuearray.zip https://playground.arduino.cc/uploads/Code/QueueArray/index.zip | |
| unzip queuearray.zip -d lib/ | |
| git clone https://github.com/McNeight/MemoryFree.git | |
| cp -r MemoryFree lib/ | |
| # Verify library installation | |
| ls -la lib/ | |
| - name: Compile ${{ matrix.example }} | |
| run: | | |
| cd examples/${{ matrix.example }} | |
| pio run -e ${{ matrix.environment }} |