Skip to content

Commit 64a8a5c

Browse files
committed
ci: release workflow wip
1 parent 06ad276 commit 64a8a5c

1 file changed

Lines changed: 28 additions & 34 deletions

File tree

.github/workflows/release.yaml

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,48 @@ on:
66
- "[0-9]+.[0-9]+.[0-9]+*"
77

88
jobs:
9-
core-pre-release-from-tag:
9+
core-release-from-tag:
1010
runs-on: ubuntu-latest
1111

1212
steps:
1313
- name: Checkout repository
1414
uses: actions/checkout@v2
1515

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
2417
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/
2620
27-
- name: Checkout latest tag of ArduinoCore-API and add it to the core
21+
- name: Setup build tools
2822
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
4033
run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
4134

4235
- name: Get repo name
4336
run: echo "REPOSITORY_NAME=$(echo ${{ github.repository }} | cut -d "/" -f2-)" >> $GITHUB_ENV
4437

45-
- name: Package the new core
38+
- name: Build the core
4639
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: ../
5451

5552
- name: Get architecture name
5653
run: |
@@ -70,10 +67,7 @@ jobs:
7067
repository: arduino/arduino-examples
7168
path: extras/arduino-examples
7269

73-
- name: Install Arduino CLI
74-
uses: arduino/setup-arduino-cli@v1.1.1
75-
with:
76-
version: "0.14.0"
70+
7771

7872
- name: Download and verify new core
7973
run: |

0 commit comments

Comments
 (0)