@@ -59,31 +59,44 @@ jobs:
5959
6060 steps :
6161 - name : Setup Python
62- uses : actions/setup-python@v2
63-
64- - name : Setup Node.js
65- uses : actions/setup-node@v1
62+ uses : actions/setup-python@v3
6663
6764 - name : Checkout Code
68- uses : actions/checkout@v1
65+ uses : actions/checkout@v3
6966 with :
67+ fetch-depth : 0
7068 submodules : true
7169
7270 - name : Checkout linkermap
73- uses : actions/checkout@v2
71+ uses : actions/checkout@v3
7472 with :
7573 repository : hathach/linkermap
7674 path : linkermap
77-
78- - name : Install Toolchains
75+
76+ - name : Set Toolchain URL
77+ run : echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz
78+
79+ - name : Cache Toolchain
80+ uses : actions/cache@v3
81+ id : cache-toolchain
82+ with :
83+ path : ~/cache/
84+ key : ${{ runner.os }}-22-05-17-${{ env.TOOLCHAIN_URL }}
85+
86+ - name : Install Toolchain
87+ if : steps.cache-toolchain.outputs.cache-hit != 'true'
88+ run : |
89+ mkdir -p ~/cache/toolchain
90+ wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
91+ tar -C ~/cache/toolchain -xaf toolchain.tar.gz
92+
93+ - name : Set Toolchain Path
94+ run : echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
95+
96+ - name : Install Tools
7997 run : |
8098 pip3 install adafruit-nrfutil uritemplate requests intelhex
8199 pip3 install linkermap/
82- npm install --global xpm
83- # 9.3.1-1.2.1 is xpack modified version which significantly increased compiled size to 6-7KB and cause flash overflow.
84- # Skip this version for now, we will try again with next official release from ARM
85- xpm install --global @xpack-dev-tools/[email protected] 86- echo `echo $HOME/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin` >> $GITHUB_PATH
87100
88101 - name : Build
89102 run : |
93106 - name : Linker Map
94107 run : make BOARD=${{ matrix.board }} linkermap
95108
96- - uses : actions/upload-artifact@v2
109+ - uses : actions/upload-artifact@v3
97110 with :
98111 name : ${{ matrix.board }}
99112 path : _bin/${{ matrix.board }}
0 commit comments