platforms-dispatches #296
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: platforms-dispatches | |
on: | |
schedule: | |
- cron: '0 0 * * 0,3' | |
workflow_dispatch: | |
env: | |
MIN_IDF_MAJOR_VERSION: ${{ vars.MIN_IDF_MAJOR_VERSION }} | |
MIN_IDF_MINOR_VERSION: ${{ vars.MIN_IDF_MINOR_VERSION }} | |
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build-wheels: | |
name: Build for ${{ matrix.os }} (Python ${{matrix.python-version}}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | |
- windows-latest | |
- ubuntu-latest | |
- macos-13 # MacOS x86_64 | |
- macos-latest # MacOS arm64 (M1) | |
- linux-armv7-self-hosted | |
- linux-arm64-self-hosted | |
include: | |
- os: linux-armv7-self-hosted | |
CONTAINER: python:3.8-bullseye | |
- os: linux-arm64-self-hosted | |
CONTAINER: python:3.8-bullseye | |
python-version: ['3.8'] | |
# Use python container on ARM | |
container: ${{ matrix.CONTAINER }} | |
steps: | |
- name: OS info | |
if: matrix.os != 'windows-latest' | |
run: | | |
echo "Operating System: ${{ runner.os }}" | |
echo "Architecture: $(uname -m)" | |
- name: OS info | |
if: matrix.os == 'windows-latest' | |
run: | | |
echo "Operating System: ${{ runner.os }}" | |
echo "Architecture: $env:PROCESSOR_ARCHITECTURE" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
# Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108 | |
if: matrix.os != 'linux-armv7-self-hosted' && matrix.os != 'linux-arm64-self-hosted' | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get Python version | |
run: | | |
python --version | |
python -m pip install --upgrade pip | |
- name: Install build dependencies | |
run: python -m pip install -r build_requirements.txt | |
- name: Install additional OS dependencies - Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: os_dependencies/ubuntu.sh | |
- name: Install additional OS dependencies - MacOS | |
if: matrix.os == 'macos-latest' || matrix.os == 'macos-13' | |
run: os_dependencies/macos.sh | |
- name: Install additional OS dependencies - Linux ARM | |
if: matrix.os == 'linux-armv7-self-hosted' || matrix.os == 'linux-arm64-self-hosted' | |
run: os_dependencies/linux_arm.sh | |
- name: Build wheels for IDF | |
if: matrix.os != 'windows-latest' | |
run: | | |
# Rust directory needs to be included for Linux ARM7 | |
if [ "${{ matrix.os }}" = "linux-armv7-self-hosted" ]; then | |
. $HOME/.cargo/env | |
fi | |
python build_wheels.py | |
- name: Build wheels for IDF - Windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
python build_wheels.py | |
- name: Upload artifacts of downloaded_wheels directory | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-download-directory-${{ matrix.os}}-${{ matrix.python-version }} | |
path: ./downloaded_wheels | |
- name: Upload artifacts of Python version dependent wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dependent_requirements_${{ matrix.os}} | |
path: ./dependent_requirements.txt | |
build-python-version-dependent-wheels: | |
needs: build-wheels | |
name: Build Python version dependendent wheels for IDF | |
uses: espressif/idf-python-wheels/.github/workflows/build-wheels-python-dependent.yml@feat/python3-13_support # TODO change !!! | |
upload-python-wheels: | |
needs: [build-wheels, build-python-version-dependent-wheels] | |
name: Upload Python wheels | |
uses: espressif/idf-python-wheels/.github/workflows/upload-python-wheels.yml@main | |
secrets: inherit |