-
Notifications
You must be signed in to change notification settings - Fork 6
107 lines (102 loc) · 2.97 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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"