Skip to content

Commit

Permalink
Merge tag 'v3.3.0-rc.1' into release/v3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
avtolstoy committed Mar 18, 2022
2 parents 72ab0a5 + 582d1ab commit 4301067
Show file tree
Hide file tree
Showing 169 changed files with 2,368 additions and 17,596 deletions.
3 changes: 3 additions & 0 deletions .buildpackrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# Additionally release/prerelease information is used to automatically create
# build targets in Particle Cloud when pushing a tag.

export BUILDPACK_BUILDER_VERSION=0.2.0

# GCC version is no longer managed by this variable.
# GCC dependencies come from .workbench/manifest.json
export BUILDPACK_VARIATION=manifest
Expand All @@ -19,3 +21,4 @@ export PRERELEASE_PLATFORMS=( photon p1 electron argon boron bsom b5som tracker

# Platforms which require modules to be prebuilt
export MODULAR_PLATFORMS=( photon p1 electron argon boron bsom b5som tracker )

186 changes: 186 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

# Explicit tag filters to trigger workflows on tags
tag_filters: &tag_filters
filters:
tags:
only:
- /.+/

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
combine-binaries:
docker:
- image: alpine:latest
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
resource_class: small
steps:
- run:
name: "Prepare"
command: |
apk add --no-cache bash zip unzip
- attach_workspace:
at: ~/workspace
- run:
name: "Combine binaries"
shell: /bin/bash
command: |
for f in $(find $HOME/workspace/release -name '*has_failures'); do
cat $f >> $HOME/has_failures
done
failures=$(cat $HOME/has_failures)
if [ "${failures}" != "" ]; then
exit 0
fi
COMBINE_BINARIES=$(head -n 1 <(find $HOME/workspace/release/ -name 'combine_binaries.sh'))
RELEASE_REF=$(head -n 1 <(cat $HOME/workspace/release/*/ref))
$COMBINE_BINARIES $HOME/workspace/release $RELEASE_REF $HOME
RESULT=$?
if [ $RESULT -ne 0 ]; then
exit 0
fi
echo "${CIRCLE_BUILD_NUM}" > $HOME/workspace/release/binaries_build_num
exit 0
- persist_to_workspace:
root: ~/workspace
paths:
- release
- store_artifacts:
path: ~/release
report:
docker:
- image: alpine:latest
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
resource_class: small
working_directory: ~/device-os
steps:
- attach_workspace:
at: ~/workspace
- run:
name: "Make a report"
command: |
apk add --no-cache bash curl
export CIRCLE_BUILD_TIMESTAMP=$(head -n 1 <(cat $HOME/workspace/release/timestamp_* | sort -n))
mkdir $HOME/failures
for f in $(find $HOME/workspace/release -name '*has_failures'); do
cat $f >> $HOME/failures/has_failures
done
if [ -f $HOME/workspace/release/binaries_build_num ]; then
export CIRCLE_ARTIFACTS_URL="https://app.circleci.com/jobs/github/particle-iot/device-os/$(cat $HOME/workspace/release/binaries_build_num)/artifacts"
fi
export CIRCLE_WORKFLOW_URL="https://app.circleci.com/pipelines/workflows/${CIRCLE_WORKFLOW_ID}"
GENERATE_MESSAGE=$(head -n 1 <(find $HOME/workspace/release/ -name 'cf_generate_message.sh'))
bash ${GENERATE_MESSAGE} $HOME/failures
export SLACK_MESSAGE=$(bash ${GENERATE_MESSAGE} $HOME/failures)
curl -X POST -H "Content-type: application/json" --data "${SLACK_MESSAGE}" ${SLACK_WEBHOOK_URL}
for f in $(find $HOME/workspace/release -name '*has_failures'); do
failure=$(cat $f)
if [ "${failure}" != "" ]; then
cat "$(dirname $f)/log"
fi
done
echo "${SLACK_MESSAGE}" | grep 'failed in' && exit 1 || exit 0
build-and-test:
docker:
- image: docker:stable-git
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
working_directory: ~/device-os
resource_class: small
parameters:
platform:
type: string
steps:
- checkout
# https://support.circleci.com/hc/en-us/articles/360050934711
- setup_remote_docker:
version: 19.03.13
- run:
name: "Install bash"
command: |
TIMESTAMP_FILE=timestamp_$RANDOM
mkdir -p $HOME/workspace/release
date +%s > $HOME/workspace/release/$TIMESTAMP_FILE
apk -q update && apk -q add bash
- run:
name: "Fetch dependencies"
shell: /bin/bash
command: |
cd $HOME
source $HOME/device-os/.buildpackrc
git clone [email protected]:particle-iot/firmware-buildpack-builder.git -b "$BUILDPACK_BUILDER_VERSION"
cd $HOME/device-os
git submodule update --init --recursive
if [ -z "$CIRCLE_TAG" ]; then
export ARTIFACT_TAG=$(echo "$CIRCLE_BRANCH" | tr '[:upper:]' '[:lower:]' | sed 's,/,-,g')-$(git rev-parse --short HEAD)
else
export ARTIFACT_TAG=$CIRCLE_TAG
fi
echo "$ARTIFACT_TAG" > $HOME/device-os/.git/ref
- run:
name: "Run tests / build for platforms"
shell: /bin/bash
command: |
cd $HOME/device-os
export FIRMWARE_PATH=$HOME/device-os
export TAG=$(cat $HOME/device-os/.git/ref)
export DOCKER_IMAGE_NAME=particle/cf-device-os-buildpack
mkdir -p ~/failures
export BUILD_PLATFORM="<< parameters.platform >>"
export BUILDPACK_NORM=1
export BUILD_PLATFORM_NORMALIZED=$(echo "$BUILD_PLATFORM" | sed 's/ /_/g')
export EXTRA_ARG="--env DEVICE_OS_CI_API_TOKEN=$DEVICE_OS_CI_API_TOKEN --env CI_BUILD_RELEASE=1 --name build --env VERSION=$TAG"
mkdir -p $HOME/workspace/release/$BUILD_PLATFORM_NORMALIZED
$HOME/firmware-buildpack-builder/scripts/ci | tee $HOME/workspace/release/$BUILD_PLATFORM_NORMALIZED/log | tee >(grep -E '^has_failures [0-9]+ ' > $HOME/failures/has_failures); export TMPRESULT=${PIPESTATUS[0]}
cp -r $HOME/failures/* $HOME/workspace/release/$BUILD_PLATFORM_NORMALIZED/ || true
export RESULT=${TMPRESULT}
echo ${RESULT}
# exit ${RESULT}
exit 0
- run:
shell: /bin/bash
name: Copy artifacts
command: |
export BUILD_PLATFORM="<< parameters.platform >>"
export BUILD_PLATFORM=$(echo "$BUILD_PLATFORM" | sed 's/ /_/g')
mkdir -p $HOME/workspace/release/$BUILD_PLATFORM
export TAG=$(cat $HOME/device-os/.git/ref)
docker cp build:/firmware/compiled-binaries/$TAG $HOME/workspace/release/$BUILD_PLATFORM/ || true
cp $HOME/device-os/build/release-publish.sh $HOME/workspace/release/$BUILD_PLATFORM/
cp $HOME/device-os/ci/combine_binaries.sh $HOME/workspace/release/$BUILD_PLATFORM/
cp $HOME/device-os/ci/cf_generate_message.sh $HOME/workspace/release/$BUILD_PLATFORM/
docker cp build:/firmware/build/coverage $HOME/workspace/release/
cp $HOME/device-os/.git/ref $HOME/workspace/release/$BUILD_PLATFORM/ref
find $HOME/workspace/release
exit 0
- persist_to_workspace:
root: ~/workspace
paths:
- release


workflows:
build-and-test:
jobs:
- build-and-test:
<<: *tag_filters
context:
- particle-ci-private
matrix:
parameters:
platform: ["photon", "p1", "electron", "argon", "boron", "bsom", "b5som", "tracker", "unit-test newhal gcc"]
- combine-binaries:
requires:
- build-and-test
- report:
requires:
- build-and-test
- combine-binaries
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,12 @@ docs/doxygen/html/
CMakeFiles/
CMakeCache.txt
cmake_install.cmake

#direnv config files
.envrc
opt/
node_modules/

# Code coverage
coverage/

102 changes: 0 additions & 102 deletions .travis.yml

This file was deleted.

45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## 3.3.0-rc.1

### FEATURES

- [Gen3] BLE Provisioning Mode [#2382](https://github.com/particle-iot/device-os/pull/2382) [#2379](https://github.com/particle-iot/device-os/pull/2379) [#2405](https://github.com/particle-iot/device-os/pull/2405)
- System.off() API support for unsubscribing from system events/handlers [#2390](https://github.com/particle-iot/device-os/pull/2390)

### ENHANCEMENTS

- Enables stack overflow detection in all builds [#2392](https://github.com/particle-iot/device-os/pull/2392)
- Adds LOG_C_VARG() logging macro to support vargs from user apps [#2393](https://github.com/particle-iot/device-os/pull/2393)
- Adds os_thread_dump* introspection functions to wrap the FreeRTOS functions [#2394](https://github.com/particle-iot/device-os/pull/2394)
- [ci] Migration to CircleCI [#2395](https://github.com/particle-iot/device-os/pull/2395)
- Adds ability to override the panic handler in user applications [#2384](https://github.com/particle-iot/device-os/pull/2384)
- [gen3] SystemPowerConfiguration::socBitPrecision(uint8_t bits)) API added [#2401](https://github.com/particle-iot/device-os/pull/2401)

### BUGFIXES

- Thread/interrupt safety for system_event_t subscriptions [#2390](https://github.com/particle-iot/device-os/pull/2390)

### INTERNAL

- Removes WiFiTesting mode and Setup over Serial1 [#2386](https://github.com/particle-iot/device-os/pull/2386)
- [gen3] Add GCC feature 'build-id' into the system part1, monolithic and user apps [#2391](https://github.com/particle-iot/device-os/pull/2391) [#2400](https://github.com/particle-iot/device-os/pull/2400)
- Moves legacy makefile-based unit tests to CMake [#2396](https://github.com/particle-iot/device-os/pull/2396)
- Makes system_version.h compliant with C; Coalesce FreeRTOS task list internals into single location [#2399](https://github.com/particle-iot/device-os/pull/2399)
- Improves reliability of a few tests [#2406](https://github.com/particle-iot/device-os/pull/2406)

## 3.2.0

### BUGFIXES
Expand Down Expand Up @@ -289,6 +317,21 @@
- [Gen 2] Fix D0 alternate-function being unconditionally reset when calling `Serial1.end()` [#2256](https://github.com/particle-iot/device-os/pull/2256)
- [Gen 3] Fix an issue with `BLE.scan()` deadlocking [#2220](https://github.com/particle-iot/device-os/pull/2220)

## 2.3.0

### FEATURES

- [Boron / B SoM ] Support for SARA R510 [#2359](https://github.com/particle-iot/device-os/pull/2359) [#2365](https://github.com/particle-iot/device-os/pull/2365)
- [Electron] Optional feature to use HSE/LSI as RTC clock source instead of LSE (external 32KHz XTAL) [#2354](https://github.com/particle-iot/device-os/pull/2354)

### ENHANCEMENTS

- [Boron / B SoM / R510] Add additional modem responsiveness check on warm boot to avoid triggering R510-specific initialization issue [#2373](https://github.com/particle-iot/device-os/pull/2373)

### INTERNAL

- Fix gcov installation [#2361](https://github.com/particle-iot/device-os/pull/2361)

## 2.3.0-rc.1

### FEATURES
Expand All @@ -298,7 +341,7 @@

### INTERNAL

- Fix gcov installation [#2365](https://github.com/particle-iot/device-os/pull/2365)
- Fix gcov installation [#2361](https://github.com/particle-iot/device-os/pull/2361)

## 2.2.0

Expand Down
1 change: 1 addition & 0 deletions bootloader/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ GLOBAL_DEFINES += MODULE_VERSION=$(BOOTLOADER_VERSION)
GLOBAL_DEFINES += MODULE_FUNCTION=$(MODULE_FUNCTION_BOOTLOADER)
GLOBAL_DEFINES += MODULE_DEPENDENCY=$(BOOTLOADER_MODULE_DEPENDENCY)
GLOBAL_DEFINES += MODULE_DEPENDENCY2=$(BOOTLOADER_MODULE_DEPENDENCY2)
GLOBAL_DEFINES += LOG_DISABLE

ifeq ($(MONO_MFG_FIRMWARE_AT_USER_PART),y)
GLOBAL_DEFINES += MONO_MFG_FIRMWARE_AT_USER_PART
Expand Down
Loading

0 comments on commit 4301067

Please sign in to comment.