Skip to content

Commit 9c1dc68

Browse files
committed
chore(pio): clean up cmsis package handling
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 339e635 commit 9c1dc68

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

.github/actions/pio-build/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
This action build thanks PIO.
44

5-
## Inputs
6-
7-
### `cmsis-version`
8-
9-
The CMSIS version to use. Default `"5.9.0"`.
10-
115
## Example usage
126

137
```yaml
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# action.yml
22
name: 'PlatformIO Build'
33
description: 'Compile using PlatformIO'
4-
inputs:
5-
cmsis-version:
6-
description: 'CMSIS package version to use'
7-
default: '5.9.0'
84
runs:
95
using: 'docker'
106
image: 'Dockerfile'
11-
args:
12-
- ${{ inputs.cmsis-version }}

.github/actions/pio-build/entrypoint.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/sh
22

3-
readonly CMSIS_VERSION="$1"
4-
readonly CMSIS_ARCHIVE="CMSIS-${CMSIS_VERSION}.tar.bz2"
5-
63
# Use python venv
74
python3 -m venv "$HOME/venv"
85
# shellcheck disable=SC1091
@@ -11,24 +8,18 @@ python3 -m venv "$HOME/venv"
118
python3 -m pip install --quiet --upgrade platformio
129

1310
# Install the development version of ststm32 platform
14-
platformio platform install "https://github.com/platformio/platform-ststm32.git" || {
11+
pio pkg install --platform "https://github.com/platformio/platform-ststm32.git" --force --global || {
1512
exit 1
1613
}
1714
# Prepare framework for CI
15+
# Modify platform.json to use local framework-arduinoststm32 package
1816
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()" || {
1917
exit 1
2018
}
21-
19+
# Create symbolic link to the framework-arduinoststm32 package pointing to the repository workspace
2220
ln --symbolic "$GITHUB_WORKSPACE" "$HOME/.platformio/packages/framework-arduinoststm32" || {
2321
exit 1
2422
}
25-
# Download and unpack CMSIS package
26-
wget --no-verbose "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/$CMSIS_VERSION/$CMSIS_ARCHIVE" || {
27-
exit 1
28-
}
29-
tar --extract --bzip2 --file="$CMSIS_ARCHIVE" || {
30-
exit 1
31-
}
3223
cd "$GITHUB_WORKSPACE/CI/build/" || {
3324
exit 1
3425
}

0 commit comments

Comments
 (0)