|
6 | 6 | - "[0-9]+.[0-9]+.[0-9]+*" |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - core-pre-release-from-tag: |
| 9 | + core-release-from-tag: |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 |
|
12 | 12 | steps: |
13 | 13 | - name: Checkout repository |
14 | 14 | uses: actions/checkout@v2 |
15 | 15 |
|
16 | | - - name: Checkout ArduinoCore-API |
17 | | - uses: actions/checkout@v2 |
18 | | - with: |
19 | | - repository: arduino/ArduinoCore-API |
20 | | - path: extras/ArduinoCore-API |
21 | | - |
22 | | - - name: Check if API should be compiled in the core |
23 | | - id: checkapi |
| 16 | + - name : Get the toolchain |
24 | 17 | run: | |
25 | | - if [[ $(grep -r api platform.txt) ]]; then echo "::set-output name=IS_API::true"; fi |
| 18 | + wget -O /opt/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 https://developer.arm.com/-/media/files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 |
| 19 | + tar -xjf /opt/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 -C /opt/ |
26 | 20 |
|
27 | | - - name: Checkout latest tag of ArduinoCore-API and add it to the core |
| 21 | + - name: Setup build tools |
28 | 22 | run: | |
29 | | - cd extras/ArduinoCore-API |
30 | | - git fetch --tags |
31 | | - git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) |
32 | | - cd ../.. |
33 | | - mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino" |
34 | | - if: steps.checkapi.outputs.IS_API == 'true' |
35 | | - |
36 | | - - name: Remove ArduinoCore-API |
37 | | - run: rm -r "$GITHUB_WORKSPACE/extras/ArduinoCore-API" |
38 | | - |
39 | | - - name: Set env |
| 23 | + sudo apt-get install -y python3 python3-pip git mercurial |
| 24 | + mkdir /opt/mbed_env |
| 25 | + python -m venv /opt/mbed_env/ |
| 26 | + source /opt/mbed_env/bin/activate |
| 27 | + python3 -m pip install -r extras/requirements.txt |
| 28 | + python3 -m pip install mbed-cli setuptools |
| 29 | + python3 -m pip install --upgrade six |
| 30 | + mbed config -G GCC_ARM_PATH /opt/gcc-arm-none-eabi-9-2019-q4-major/bin/ |
| 31 | +
|
| 32 | + - name: Set core version |
40 | 33 | run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
41 | 34 |
|
42 | 35 | - name: Get repo name |
43 | 36 | run: echo "REPOSITORY_NAME=$(echo ${{ github.repository }} | cut -d "/" -f2-)" >> $GITHUB_ENV |
44 | 37 |
|
45 | | - - name: Package the new core |
| 38 | + - name: Build the core |
46 | 39 | run: | |
47 | | - extras/pack.release.bash $TAG_VERSION $REPOSITORY_NAME |
48 | | - cd extras |
49 | | - mkdir staging |
50 | | - echo $PWD |
51 | | - mv ../*.json staging/ |
52 | | - mv ../*.tar.bz2 staging/ |
53 | | - cd .. |
| 40 | + source /opt/mbed_env/bin/activate |
| 41 | + export PATH=$PATH:/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/ |
| 42 | + extras/package_full.sh |
| 43 | + ls |
| 44 | + ls ../ |
| 45 | +
|
| 46 | + - name: Save artifacts |
| 47 | + uses: actions/upload-artifact@v4 |
| 48 | + with: |
| 49 | + name: $REPOSITORY_NAME*.tar.bz2 |
| 50 | + path: ../ |
54 | 51 |
|
55 | 52 | - name: Get architecture name |
56 | 53 | run: | |
|
70 | 67 | repository: arduino/arduino-examples |
71 | 68 | path: extras/arduino-examples |
72 | 69 |
|
73 | | - - name: Install Arduino CLI |
74 | | - uses: arduino/setup-arduino-cli@v1.1.1 |
75 | | - with: |
76 | | - version: "0.14.0" |
| 70 | + |
77 | 71 |
|
78 | 72 | - name: Download and verify new core |
79 | 73 | run: | |
|
0 commit comments