Skip to content

Commit

Permalink
Merge branch 'dev' into 'master'
Browse files Browse the repository at this point in the history
Merge for Release 1.0.0

See merge request smartme.io/arancino/ide/arancino-stm32-core!1
  • Loading branch information
sergiotomasello committed Dec 7, 2021
2 parents e32ba63 + 6243b32 commit 20a6bc9
Show file tree
Hide file tree
Showing 7,664 changed files with 1,186 additions and 477,373 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Empty file modified .editorconfig
100644 → 100755
Empty file.
Empty file modified .gitattributes
100644 → 100755
Empty file.
Empty file modified .github/CODE_OF_CONDUCT.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/bug_report.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/feature-request-improvement.md
100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE/new-variant-request.md
100644 → 100755
Empty file.
Empty file modified .github/PULL_REQUEST_TEMPLATE.md
100644 → 100755
Empty file.
Empty file modified .github/actions/pio-build/Dockerfile
100644 → 100755
Empty file.
Empty file modified .github/actions/pio-build/README.md
100644 → 100755
Empty file.
Empty file modified .github/actions/pio-build/action.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/Continuous-Integration.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
207 changes: 207 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
image: smartmeio/arancino-library-build


stages:
- start
- package
- upload
- cleanup

#################################
####### START #######
#################################

####### START
start:
stage: start

variables:
GIT_STRATEGY: none

script:
- mkdir -p tmp
- echo `date +%Y-%m-%d` > tmp/date.txt
- echo `date +%H-%M-%S` > tmp/time.txt

artifacts:
paths:
- tmp/

expire_in: 1d

only:
- tags

except:
- master
- branches

######## PUSH
push:
stage: start
only: ['tags']
except: ['master', 'branches']

allow_failure: true

variables:
GIT_STRATEGY: clone

before_script:
# - sed -i "s/version=.*/version=${CI_COMMIT_TAG}/g" library.properties
- eval `python3 check-version-tag.py ${CI_COMMIT_TAG}`

script:
#- apk add git
- git remote add github https://$GITHUB_BOT_USERNAME:[email protected]/$GITHUB_DEST_REPO
#- git remote show github
#- git remote show origin
#- git branch -a
- git checkout $CI_COMMIT_TAG
- git fetch github
#- git push github $CI_COMMIT_REF_NAME --force
- >
if [[ ${PRE_RELEASE} == "test" ]]; then
echo "not performing TAG push";
else
git push github ${CI_COMMIT_TAG}
fi
- git push github --all --force

#################################
####### PACKAGE #######
#################################

####### Package Release #######
package_release:
stage: package

script:
# create some variables into temp folder
- PKG_NAME=$PLATFORM_NAME-$CI_COMMIT_TAG
- PKG_NAME_PIO=framework-arduino-stm32-arancino-$CI_COMMIT_TAG

- echo $PKG_NAME > tmp/pkg_name.txt
- echo $PKG_NAME_PIO > tmp/pkg_name_pio.txt
- echo $CI_COMMIT_TAG > tmp/target_path.txt

- sed -i "s:\(ARANCINO_CORE_VERSION\) .*:\1 \"$CI_COMMIT_TAG\":" ./cores/arduino/Arduino.h
- sed -i "s:\(version\)=.*:\1=$CI_COMMIT_TAG:" ./platform.txt
- jq --arg tag_ver ${CI_COMMIT_TAG} '.version = $tag_ver' package.json|sponge package.json

# adding STM32FreeRTOS into core
- git clone $REPO_RTOS_URL -b 10.2.1 libraries/STM32duino_FreeRTOS

# adding ArduinoJson into core
- git clone $REPO_LIB_ARDUINOJSON_URL -b v6.18.0 libraries/ArduinoJson

# adding MsgPack into core
- git clone $REPO_LIB_MSGPACK_URL -b 0.3.8 libraries/MsgPack

# adding MsgPacketizer into core
- git clone $REPO_LIB_MSGPACKETIZER_URL -b 0.3.0 libraries/MsgPacketizer

# adding Microcontroller ID into core
- git clone $REPO_LIB_MICROCONTROLLER_ID_URL -b 1.0.0 libraries/Microcontroller-id

# adding MQTT PubSubClient into core
- git clone $REPO_LIB_PUBSUBCLIENT_URL -b v2.8 libraries/PubSubClient

- cd ..
# tar files and move temp folder back
- tar --exclude=tmp --exclude=.git* --exclude=*.DS_Store* -cvjf $PKG_NAME.tar.bz2 $CI_PROJECT_NAME

# pio packaging
- cp -r $CI_PROJECT_NAME framework-arduino-stm32-arancino
- tar --exclude=tmp --exclude=.git* --exclude=*.DS_Store* -cvjf $PKG_NAME_PIO.tar.bz2 framework-arduino-stm32-arancino

# move tar into temp folder
- cd $CI_PROJECT_NAME
- mv ../$PKG_NAME.tar.bz2 tmp/
- mv ../$PKG_NAME_PIO.tar.bz2 tmp/

# create files containing sha 256 checksum and size in bytes of the tar file
- sha256sum tmp/$PKG_NAME.tar.bz2 | awk '{print $1}' > tmp/SHA256.txt
- du -b tmp/$PKG_NAME.tar.bz2 | awk {'print $1}' > tmp/SIZE.txt
- echo FILENAME $PKG_NAME.tar.bz2
- echo SHA-256 `cat tmp/SHA256.txt`
- echo SIZE `cat tmp/SIZE.txt`
- echo PKG_NAME `cat tmp/pkg_name.txt`

# same step above but for PIO
- sha256sum tmp/$PKG_NAME_PIO.tar.bz2 | awk '{print $1}' > tmp/SHA256_pio.txt
- du -b tmp/$PKG_NAME_PIO.tar.bz2 | awk {'print $1}' > tmp/SIZE_pio.txt
- echo FILENAME_PIO $PKG_NAME_PIO.tar.bz2
- echo SHA-256-PIO `cat tmp/SHA256_pio.txt`
- echo SIZE_PIO `cat tmp/SIZE_pio.txt`
- echo PKG_NAME_PIO `cat tmp/pkg_name_pio.txt`

dependencies:
- start

artifacts:
paths:
- tmp/
except:
- branches
- master

only:
- tags

#################################
####### UPLOAD #######
#################################

####### Upload Staging and Release #######
upload:
stage: upload

before_script:
- eval `python3 check-version-tag.py ${CI_COMMIT_TAG}`

script:
- DATE="$(cat tmp/date.txt)"
- TIME="$(cat tmp/time.txt)"
- PKG_NAME="$(cat tmp/pkg_name.txt)"
- PKG_NAME_PIO="$(cat tmp/pkg_name_pio.txt)"
- TARGET_PATH="$(cat tmp/target_path.txt)"
- >
if [[ ${PRE_RELEASE} == "test" ]]; then
REPO_NAME=${REPO_NAME}-snapshot
REPO_NAME_PIO=${REPO_NAME_PIO}-snapshot
fi
# Upload to Artifactory
- curl -u $REPO_USR:$REPO_PWD -T tmp/$PKG_NAME.tar.bz2 "${REPO_BASE_URL}/artifactory/${REPO_NAME}/${TARGET_PATH}/${PKG_NAME}.tar.bz2"
- curl -u $REPO_USR:$REPO_PWD -T tmp/$PKG_NAME_PIO.tar.bz2 "${REPO_BASE_URL}/artifactory/${REPO_NAME_PIO}/${TARGET_PATH}/${PKG_NAME_PIO}.tar.bz2"

only:
- tags

except:
- master
- branches

#################################
####### CLEANUP #######
#################################

####### Cleanup Job #######
cleanup:
stage: cleanup

variables:
GIT_STRATEGY: none

script:
- echo "Cleaning up"
- rm -rf tmp/

when: always

only:
- tags

except:
- master
- branches
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#### v 1.0.0 - 2021.07.09

* First release
* Based on official STM32Duino core v2.0.0.
* Add Arancino V12 board
* Introduced the possibility to flash the firmware via usb(via DFU-utils and 1200bps trick)
* Introduced the remote MCU-reset via 300bps trick
* Add FreeRTOS in the core.
Empty file modified CI/astyle/.astyleignore
100644 → 100755
Empty file.
Empty file modified CI/astyle/.astylerc
100644 → 100755
Empty file.
Empty file modified CI/astyle/.flake8
100644 → 100755
Empty file.
Empty file modified CI/astyle/astyle.py
100644 → 100755
Empty file.
Empty file modified CI/build/.flake8
100644 → 100755
Empty file.
Empty file modified CI/build/README.md
100644 → 100755
Empty file.
Empty file modified CI/build/arduino-cli.py
100644 → 100755
Empty file.
Empty file modified CI/build/conf/cores_config.json
100644 → 100755
Empty file.
Empty file modified CI/build/conf/cores_config_ci.json
100644 → 100755
Empty file.
Empty file modified CI/build/conf/cores_config_travis.json
100644 → 100755
Empty file.
Empty file modified CI/build/conf/exclude_list.txt
100644 → 100755
Empty file.
Empty file modified CI/build/conf/path_config_travis.json
100644 → 100755
Empty file.
Empty file modified CI/build/conf/sketch_list.txt
100644 → 100755
Empty file.
Empty file modified CI/build/examples/BareMinimum/BareMinimum.ino
100644 → 100755
Empty file.
Empty file modified CI/build/examples/BareMinimum/BareMinimum.txt
100644 → 100755
Empty file.
Empty file modified CI/build/platformio-builder.py
100644 → 100755
Empty file.
Empty file modified CI/utils/.flake8
100644 → 100755
Empty file.
Empty file modified CI/utils/README.md
100644 → 100755
Empty file.
Empty file modified CI/utils/fqbn.py
100644 → 100755
Empty file.
Empty file modified CI/utils/patch/HAL/G0/0001-G0-Fix-HAL-definition.patch
100644 → 100755
Empty file.
Empty file.
Empty file modified CI/utils/stm32common.py
100644 → 100755
Empty file.
Empty file modified CI/utils/stm32update.py
100644 → 100755
Empty file.
Empty file modified CI/utils/stm32variant.py
100644 → 100755
Empty file.
Empty file modified CI/utils/stm32wrapper.py
100644 → 100755
Empty file.
Empty file modified CI/utils/templates/PeripheralPins.c
100644 → 100755
Empty file.
Empty file modified CI/utils/templates/PinNamesVar.h
100644 → 100755
Empty file.
Empty file modified CI/utils/templates/boards_entry.txt
100644 → 100755
Empty file.
Empty file modified CI/utils/templates/generic_clock.c
100644 → 100755
Empty file.
Empty file modified CI/utils/templates/variant_generic.cpp
100644 → 100755
Empty file.
Empty file modified CI/utils/templates/variant_generic.h
100644 → 100755
Empty file.
Empty file modified CONTRIBUTING.md
100644 → 100755
Empty file.
Empty file modified License.md
100644 → 100755
Empty file.
Loading

0 comments on commit 20a6bc9

Please sign in to comment.