From ef9f181bebf1bece3c2e583026f83432eec0dde1 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 17 May 2022 11:57:50 +0700 Subject: [PATCH 1/3] update action script in build ci, use toolchain cache --- .github/workflows/githubci.yml | 38 ++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index 8135bd5..bbd40cd 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -59,31 +59,47 @@ jobs: steps: - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 - name: Setup Node.js uses: actions/setup-node@v1 - name: Checkout Code - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: submodules: true - name: Checkout linkermap - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: hathach/linkermap path: linkermap - - - name: Install Toolchains + + - name: Set Toolchain URL + # 9.3.1-1.2.1 is xpack modified version which significantly increased compiled size to 6-7KB and cause flash overflow. + 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 + + - name: Cache Toolchain + uses: actions/cache@v3 + id: cache-toolchain + with: + path: ~/cache/ + key: ${{ runner.os }}-22-05-17-${{ env.TOOLCHAIN_URL }} + + - name: Install Toolchain + if: steps.cache-toolchain.outputs.cache-hit != 'true' + run: | + mkdir -p ~/cache/toolchain + wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz + tar -C ~/cache/toolchain -xaf toolchain.tar.gz + + - name: Set Toolchain Path + run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin` + + - name: Install Tools run: | pip3 install adafruit-nrfutil uritemplate requests intelhex pip3 install linkermap/ - npm install --global xpm - # 9.3.1-1.2.1 is xpack modified version which significantly increased compiled size to 6-7KB and cause flash overflow. - # Skip this version for now, we will try again with next official release from ARM - xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@9.3.1-1.1.1 - echo `echo $HOME/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin` >> $GITHUB_PATH - name: Build run: | @@ -93,7 +109,7 @@ jobs: - name: Linker Map run: make BOARD=${{ matrix.board }} linkermap - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ matrix.board }} path: _bin/${{ matrix.board }} From 5e6e04abcf35437340692c9a1150d60e842323a1 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 17 May 2022 13:27:59 +0700 Subject: [PATCH 2/3] more ci update --- .github/workflows/githubci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index bbd40cd..c1494e2 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -60,13 +60,11 @@ jobs: steps: - name: Setup Python uses: actions/setup-python@v3 - - - name: Setup Node.js - uses: actions/setup-node@v1 - name: Checkout Code uses: actions/checkout@v3 with: + fetch-depth: 0 submodules: true - name: Checkout linkermap From daabc3d4472b8dd5fe82bec6bb798f05dcd0b3f6 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 17 May 2022 13:34:23 +0700 Subject: [PATCH 3/3] clean up --- .github/workflows/githubci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/githubci.yml b/.github/workflows/githubci.yml index c1494e2..c10bcc0 100644 --- a/.github/workflows/githubci.yml +++ b/.github/workflows/githubci.yml @@ -74,7 +74,6 @@ jobs: path: linkermap - name: Set Toolchain URL - # 9.3.1-1.2.1 is xpack modified version which significantly increased compiled size to 6-7KB and cause flash overflow. 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 - name: Cache Toolchain