diff --git a/.github/actions/pio-build/README.md b/.github/actions/pio-build/README.md index a28229d687..e4e709af6e 100644 --- a/.github/actions/pio-build/README.md +++ b/.github/actions/pio-build/README.md @@ -2,12 +2,6 @@ This action build thanks PIO. -## Inputs - -### `cmsis-version` - -The CMSIS version to use. Default `"5.9.0"`. - ## Example usage ```yaml diff --git a/.github/actions/pio-build/action.yml b/.github/actions/pio-build/action.yml index 5a4cedd9e0..df5a96a64a 100644 --- a/.github/actions/pio-build/action.yml +++ b/.github/actions/pio-build/action.yml @@ -1,12 +1,6 @@ # action.yml name: 'PlatformIO Build' description: 'Compile using PlatformIO' -inputs: - cmsis-version: - description: 'CMSIS package version to use' - default: '5.9.0' runs: using: 'docker' image: 'Dockerfile' - args: - - ${{ inputs.cmsis-version }} diff --git a/.github/actions/pio-build/entrypoint.sh b/.github/actions/pio-build/entrypoint.sh index d090676cd5..42aaa01759 100755 --- a/.github/actions/pio-build/entrypoint.sh +++ b/.github/actions/pio-build/entrypoint.sh @@ -1,8 +1,5 @@ #!/bin/sh -readonly CMSIS_VERSION="$1" -readonly CMSIS_ARCHIVE="CMSIS-${CMSIS_VERSION}.tar.bz2" - # Use python venv python3 -m venv "$HOME/venv" # shellcheck disable=SC1091 @@ -11,24 +8,18 @@ python3 -m venv "$HOME/venv" python3 -m pip install --quiet --upgrade platformio # Install the development version of ststm32 platform -platformio platform install "https://github.com/platformio/platform-ststm32.git" || { +pio pkg install --platform "https://github.com/platformio/platform-ststm32.git" --force --global || { exit 1 } # Prepare framework for CI +# Modify platform.json to use local framework-arduinoststm32 package python3 -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/ststm32/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoststm32']['version'] = '*'; del data['packages']['framework-arduinoststm32']['owner']; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || { exit 1 } - +# Create symbolic link to the framework-arduinoststm32 package pointing to the repository workspace ln --symbolic "$GITHUB_WORKSPACE" "$HOME/.platformio/packages/framework-arduinoststm32" || { exit 1 } -# Download and unpack CMSIS package -wget --no-verbose "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/$CMSIS_VERSION/$CMSIS_ARCHIVE" || { - exit 1 -} -tar --extract --bzip2 --file="$CMSIS_ARCHIVE" || { - exit 1 -} cd "$GITHUB_WORKSPACE/CI/build/" || { exit 1 }