-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: 2.1 | ||
jobs: | ||
build: | ||
docker: | ||
- image: 'opensuse:leap' | ||
steps: | ||
- run: 'zypper install -y --type pattern devel_basis devel_C_C++' | ||
- run: 'zypper install -y git python3-devel python-devel gcc-c++ unzip' | ||
- run: | ||
name: Set path variable | ||
command: | | ||
SHORT_SHA1=$(echo "${CIRCLE_SHA1}" | cut -c 1-10) | ||
echo 'export TOOLCHAIN_PATH="/opt/grisp/grisp-software/grisp-base/'$SHORT_SHA1'"' >> $BASH_ENV | ||
- run: mkdir -p ${TOOLCHAIN_PATH} | ||
- checkout | ||
- run: shopt -s dotglob && mv ./* "${TOOLCHAIN_PATH}" | ||
- run: 'git -C "${TOOLCHAIN_PATH}" submodule update --init rtems-source-builder' | ||
- run: | ||
name: Disable parallelism during gcc build due to RAM limit at CircleCI | ||
command: 'sed -i "s/%define with_threads 1/%define with_threads 0/" ${TOOLCHAIN_PATH}/rtems-source-builder/rtems/config/tools/rtems-gcc-7.3.0-newlib-3.0.0.cfg' | ||
- run: | ||
command: cd $TOOLCHAIN_PATH; ./build/build.sh | ||
no_output_timeout: 90m | ||
- persist_to_workspace: | ||
root: /opt | ||
paths: | ||
- grisp/*/*/*/rtems-install | ||
deploy: | ||
docker: | ||
- image: 'opensuse:leap' | ||
steps: | ||
- run: 'zypper install -y aws-cli tar gzip' | ||
- attach_workspace: | ||
at: /opt | ||
- run: | ||
command: "GRISP_TOOLCHAIN_REVISION=$(cat /opt/grisp/*/*/*/rtems-install/rtems/5/GRISP_TOOLCHAIN_REVISION) && | ||
tar -czf /tmp/grisp_toolchain_arm-rtems5_Linux_$GRISP_TOOLCHAIN_REVISION.tar.gz ." | ||
working_directory: /opt | ||
- deploy: | ||
command: aws s3 cp /tmp/grisp_toolchain_*.tar.gz s3://grisp/platforms/grisp_base/toolchain/ --acl public-read | ||
workflows: | ||
version: 2 | ||
build-deploy: | ||
jobs: | ||
- build | ||
- deploy: | ||
requires: | ||
- build |