Skip to content

Build OSW-OS (Ubuntu, Windows, Mac OS, all models) #14

Build OSW-OS (Ubuntu, Windows, Mac OS, all models)

Build OSW-OS (Ubuntu, Windows, Mac OS, all models) #14

Workflow file for this run

name: Build OSW-OS (Ubuntu, Windows, Mac OS, all models)
on:
workflow_dispatch:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
Find-feature:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
i8n:
- 'include/locales/*.h'
- id: get_lang
run: |
if [ ${{ steps.filter.outputs.i8n }} == "true" ]; then
echo "get-languages=$(python3 .github/getWorkflowMatrix.py all_languages)" >> $GITHUB_OUTPUT
else
echo "get-languages=$(python3 .github/getWorkflowMatrix.py default_language)" >> $GITHUB_OUTPUT
fi
- id: get_mod
run: |
echo "get-models=$(python3 .github/getWorkflowMatrix.py all_models)" >> $GITHUB_OUTPUT
outputs:
get-models: ${{ steps.get_mod.outputs.get-models }}
get-languages: ${{ steps.get_lang.outputs.get-languages }}
build-OSW:
needs: Find-feature
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
model: ${{ fromJson(needs.Find-feature.outputs.get-models) }}
language: ${{ fromJson(needs.Find-feature.outputs.get-languages) }}
steps:
- name: Checkout repository and submodules
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: platformio-${{ runner.os }}
- name: Install swig on Linux
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get -y install swig
- name: Install swig on Mac OS
if: matrix.os == 'macos-latest'
run: brew install swig
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install PlatformIO
run: python -m pip install --upgrade pip && pip install --upgrade platformio
- name: Rename config
run: mv include/config.h.example include/config.h
- name: Compile language ${{ matrix.language }} model ${{ matrix.model }}
run: python3 .github/buildFirmware.py -l "${{ matrix.language }}" -m "${{ matrix.model }}" -b debug