Skip to content

Commit 5e800f6

Browse files
committed
merged upstream
2 parents c2b6251 + ff40983 commit 5e800f6

File tree

684 files changed

+660308
-35166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

684 files changed

+660308
-35166
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Container image that runs your code
2+
FROM ubuntu:latest
3+
4+
ENV LANG C.UTF-8
5+
ENV LC_ALL C.UTF-8
6+
7+
# Install prerequisites
8+
RUN apt-get --quiet=2 update && apt-get install --quiet=2 --assume-yes git python3 python3-pip wget
9+
10+
# Install PlatformIO
11+
RUN pip3 install --quiet --upgrade platformio
12+
CMD /bin/bash
13+
14+
# Copies your code file from your action repository to the filesystem path `/` of the container
15+
COPY entrypoint.sh /entrypoint.sh
16+
17+
# Code file to execute when the docker container starts up (`entrypoint.sh`)
18+
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# PlatformIO build action
2+
3+
This action build thanks PIO.
4+
5+
## Inputs
6+
7+
### `cmsis-version`
8+
9+
The CMSIS version to use. Default `"5.5.1"`.
10+
11+
## Example usage
12+
13+
```yaml
14+
uses: ./.github/actions/pio-build
15+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# action.yml
2+
name: 'PlatformIO Build'
3+
description: 'Compile using PlatformIO'
4+
inputs:
5+
cmsis-version:
6+
description: 'CMSIS package version to use'
7+
default: '5.5.1'
8+
runs:
9+
using: 'docker'
10+
image: 'Dockerfile'
11+
args:
12+
- ${{ inputs.cmsis-version }}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
readonly CMSIS_VERSION="$1"
4+
readonly CMSIS_ARCHIVE="CMSIS-${CMSIS_VERSION}.tar.bz2"
5+
6+
# Install the development version of ststm32 platform
7+
platformio platform install "https://github.com/platformio/platform-ststm32.git" || {
8+
exit 1
9+
}
10+
# Prepare framework for CI
11+
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'] = '*'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()" || {
12+
exit 1
13+
}
14+
ln --symbolic "$GITHUB_WORKSPACE" "$HOME/.platformio/packages/framework-arduinoststm32" || {
15+
exit 1
16+
}
17+
# Download and unpack CMSIS package
18+
wget --no-verbose "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/$CMSIS_VERSION/$CMSIS_ARCHIVE" || {
19+
exit 1
20+
}
21+
tar --extract --bzip2 --file="$CMSIS_ARCHIVE" || {
22+
exit 1
23+
}
24+
cd "$GITHUB_WORKSPACE/CI/build/" || {
25+
exit 1
26+
}
27+
python3 platformio-builder.py --board=blackpill_f103c8 --board=remram_v1
28+
29+
exit $?
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: STM32 Core Continuous Integration
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- '*.json'
8+
- '**.md'
9+
- keywords.txt
10+
- CI/**
11+
- '!CI/build/arduino-cli.py'
12+
- '!CI/build/platformio-builder.py'
13+
- tools/**
14+
pull_request:
15+
paths-ignore:
16+
- '*.json'
17+
- '**.md'
18+
- keywords.txt
19+
- CI/**
20+
- '!CI/build/arduino-cli.py'
21+
- '!CI/build/platformio-builder.py'
22+
- tools/**
23+
jobs:
24+
astyle_check:
25+
runs-on: ubuntu-latest
26+
name: AStyle check
27+
steps:
28+
# First of all, clone the repo using the checkout action.
29+
- name: Checkout
30+
uses: actions/checkout@master
31+
32+
- name: Astyle check
33+
id: Astyle
34+
uses: stm32duino/actions/astyle-check@master
35+
36+
# Use the output from the `Astyle` step
37+
- name: Astyle Errors
38+
if: failure()
39+
run: |
40+
cat ${{ steps.Astyle.outputs.astyle-result }}
41+
exit 1
42+
core_build:
43+
runs-on: ubuntu-latest
44+
name: Core compilation
45+
steps:
46+
# First of all, clone the repo using the checkout action.
47+
- name: Checkout
48+
uses: actions/checkout@master
49+
50+
- name: Compilation
51+
id: Compile
52+
uses: stm32duino/actions/compile-examples@master
53+
54+
# Use the output from the `Compile` step
55+
- name: Compilation Errors
56+
if: failure()
57+
run: |
58+
cat ${{ steps.Compile.outputs.compile-result }}
59+
exit 1
60+
pio_build:
61+
runs-on: ubuntu-latest
62+
name: PlatformIO test
63+
steps:
64+
# First of all, clone the repo using the checkout action.
65+
- name: Checkout
66+
uses: actions/checkout@master
67+
68+
- name: PlatformIO
69+
id: Compile
70+
uses: ./.github/actions/pio-build

.travis.yml renamed to .travis.yml.old

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,29 @@ matrix:
3434
else
3535
echo "Coding style check OK";
3636
fi
37+
38+
#
39+
# PlatformIO test
40+
#
41+
- env:
42+
- NAME=PlatformIO
43+
- CMSIS_VERSION=5.5.1
44+
install:
45+
# Install PlatformIO
46+
- pip install -U platformio
47+
# Install the development version of ststm32 platform
48+
- platformio platform install https://github.com/platformio/platform-ststm32.git
49+
# Prepare framework for CI
50+
- python -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'] = '*'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()"
51+
- sudo ln -sf $TRAVIS_BUILD_DIR ~/.platformio/packages/framework-arduinoststm32
52+
# Download and unpack CMSIS package
53+
- wget https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/$CMSIS_VERSION/CMSIS-$CMSIS_VERSION.tar.bz2
54+
- tar -xvjf CMSIS-$CMSIS_VERSION.tar.bz2
55+
before_script:
56+
- cd $TRAVIS_BUILD_DIR/CI/build/
57+
script:
58+
- python platformio-builder.py --board=blackpill_f103c8 --board=remram_v1
59+
3760
#
3861
# Build test
3962
#

0 commit comments

Comments
 (0)