File tree Expand file tree Collapse file tree 4 files changed +59
-29
lines changed Expand file tree Collapse file tree 4 files changed +59
-29
lines changed Original file line number Diff line number Diff line change 1+ name : " Toolchain"
2+ description : " Find NCS toolchain version"
3+ outputs :
4+ toolchain-version :
5+ description : The version of the toolchain
6+ value : ${{ steps.setup.outputs.TOOLCHAIN_VERSION }}
7+
8+ runs :
9+ using : " composite"
10+ steps :
11+ - name : Checkout ATT
12+ uses : actions/checkout@v4
13+ with :
14+ path : att
15+ - name : Find NCS SHA
16+ shell : bash
17+ run : |
18+ NCS_REV=$(cat att/west.yml | grep "revision:" | awk '{print $2}' | xargs)
19+ echo "NCS_REV=${NCS_REV}" >> $GITHUB_ENV
20+ echo "NCS_REV=${NCS_REV}"
21+ - name : Checkout NCS
22+ uses : actions/checkout@v4
23+ with :
24+ path : nrf
25+ repository : nrfconnect/sdk-nrf
26+ ref : ${{ env.NCS_REV }}
27+ - name : Set Toolchain Version
28+ id : setup
29+ shell : bash
30+ run : |
31+ TOOLCHAIN_VERSION=$(./nrf/scripts/print_toolchain_checksum.sh)
32+ echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}"
33+ echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change @@ -57,33 +57,15 @@ jobs:
5757 setup :
5858 runs-on : ubuntu-24.04
5959 outputs :
60- TOOLCHAIN_VERSION : ${{ steps.setup.outputs.TOOLCHAIN_VERSION }}
60+ toolchain-version : ${{ steps.setup.outputs.toolchain-version }}
6161 steps :
62- - name : Checkout ATT
63- uses : actions/checkout@v4
64- with :
65- path : att
66- - name : Find NCS SHA
67- run : |
68- NCS_REV=$(cat att/west.yml | grep "revision:" | awk '{print $2}' | xargs)
69- echo "NCS_REV=${NCS_REV}" >> $GITHUB_ENV
70- echo "NCS_REV=${NCS_REV}"
71- - name : Checkout NCS
72- uses : actions/checkout@v4
73- with :
74- path : nrf
75- repository : nrfconnect/sdk-nrf
76- ref : ${{ env.NCS_REV }}
77- - name : Set Toolchain Version
62+ - uses : actions/checkout@v4
63+ - uses : ./.github/actions/toolchain
7864 id : setup
79- run : |
80- TOOLCHAIN_VERSION=$(./nrf/scripts/print_toolchain_checksum.sh)
81- echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}"
82- echo "TOOLCHAIN_VERSION=${TOOLCHAIN_VERSION}" >> $GITHUB_OUTPUT
8365 build :
8466 runs-on : ubuntu-24.04
8567 needs : setup
86- container : ghcr.io/nrfconnect/sdk-nrf-toolchain:${{ needs.setup.outputs.TOOLCHAIN_VERSION }}
68+ container : ghcr.io/nrfconnect/sdk-nrf-toolchain:${{ needs.setup.outputs.toolchain-version }}
8769 defaults :
8870 run :
8971 shell : bash
Original file line number Diff line number Diff line change 1919 required : true
2020
2121jobs :
22+ setup :
23+ runs-on : ubuntu-24.04
24+ outputs :
25+ toolchain-version : ${{ steps.setup.outputs.toolchain-version }}
26+ steps :
27+ - uses : actions/checkout@v4
28+ - uses : ./.github/actions/toolchain
29+ id : setup
2230 analyze :
2331 name : Static analysis
24- runs-on : ubuntu-latest
25- container : ghcr.io/zephyrproject-rtos/ci:v0.27.4
32+ needs : setup
33+ runs-on : ubuntu-24.04
34+ container : ghcr.io/nrfconnect/sdk-nrf-toolchain:${{ needs.setup.outputs.toolchain-version }}
2635 env :
2736 BUILD_WRAPPER_OUT_DIR : build_wrapper_output_directory
28- CMAKE_PREFIX_PATH : /opt/toolchains
37+ defaults :
38+ run :
39+ shell : bash
2940 steps :
3041 - name : Checkout
3142 uses : actions/checkout@v4
@@ -52,10 +63,13 @@ jobs:
5263 - name : Unzip update ZIPs
5364 working-directory : thingy91x-oob/artifacts
5465 run : |
55- unzip -o -d nrf91-app hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-nrf91-dfu.zip
56- unzip -o -d nrf91-bootloader hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-nrf91-bootloader.zip
57- unzip -o -d nrf53-app connectivity-bridge-${{ inputs.artifact_fw_version }}-thingy91x-nrf53-dfu.zip
58- unzip -o -d nrf53-bootloader connectivity-bridge-${{ inputs.artifact_fw_version }}-thingy91x-nrf53-bootloader.zip
66+ unzip_file() {
67+ python3 -c "import zipfile, sys; zipfile.ZipFile(sys.argv[1]).extractall(sys.argv[2])" "$1" "$2"
68+ }
69+ unzip_file hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-nrf91-dfu.zip nrf91-app
70+ unzip_file hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-nrf91-bootloader.zip nrf91-bootloader
71+ unzip_file connectivity-bridge-${{ inputs.artifact_fw_version }}-thingy91x-nrf53-dfu.zip nrf53-app
72+ unzip_file connectivity-bridge-${{ inputs.artifact_fw_version }}-thingy91x-nrf53-bootloader.zip nrf53-bootloader
5973
6074 - name : Install dependencies
6175 run : |
Original file line number Diff line number Diff line change 1313 push :
1414 branches :
1515 - main
16+ - fix-dfucheck
1617 paths-ignore :
1718 - " .github/workflows/docs-build-and-publish.yml"
1819 - " docs/**"
You can’t perform that action at this time.
0 commit comments