Add a dockerfile for the toolchain image #155
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
name: CI | |
on: | |
push: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
timeout-minutes: 150 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
shell: bash | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt-get update | |
sudo apt-get install \ | |
build-essential \ | |
flex \ | |
bison \ | |
cmake \ | |
texinfo \ | |
device-tree-compiler \ | |
u-boot-tools \ | |
lzop \ | |
libusb-1.0-0-dev \ | |
python3 \ | |
python-is-python3 \ | |
libpython3-dev \ | |
python3-dev | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
brew install python dtc u-boot-tools texinfo | |
brew install autoconf automake libtool pkg-config | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
- name: Build toolchain | |
shell: bash | |
run: | | |
make install | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
make barebox | |
fi | |
- name: Get errorinfo | |
shell: bash | |
if: ${{ failure() }} | |
run: | | |
find . -name "rsb-report-*" \ | |
-exec echo "________________________________________________________________________________________________________" \; \ | |
-exec echo '{}' \; \ | |
-exec echo "________________________________________________________________________________________________________" \; \ | |
-exec tail -500 '{}' \; \ | |
-exec echo \; | |
- name: Build demo application | |
shell: bash | |
run: | | |
make demo | |
- name: Build OpenOCD | |
shell: bash | |
run: | | |
make openocd | |
- name: Build imx_uart | |
shell: bash | |
run: | | |
make imx_uart | |
- name: Create package | |
run: make package | |
- name: Upload package artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: package-${{ runner.os }} | |
path: | | |
package/* | |
external/rtems-source-builder/rtems/rsb-report-*.txt | |
upload: | |
if: ${{ github.ref == 'refs/heads/master' }} # Only upload on master builds | |
needs: build | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Download a single artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: package-${{ runner.os }} | |
path: package | |
- name: Upload to S3 | |
run: aws s3 cp --acl public-read package/* s3://grisp/platforms/grisp2/toolchain/ | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.GRISP_S3_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.GRISP_S3_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: "us-east-1" |