1name: Build uoscore-uedhoc 2 3on: push 4 5jobs: 6# This workflow contains 2 jobs build and test 7 8 build: 9 name: Build uoscore-uedhoc 10 runs-on: ubuntu-latest 11 12 steps: 13 - name: Install Zephyr tools 14 run: | 15 sudo apt update 16 sudo apt upgrade 17 wget https://apt.kitware.com/kitware-archive.sh 18 sudo bash kitware-archive.sh 19 sudo apt install --no-install-recommends git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev 20 21 pip3 install --user -U west 22 echo 'export PATH=~/.local/bin:"$PATH"' >> ~/.bashrc 23 source ~/.bashrc 24 25 west init ~/zephyrproject 26 cd ~/zephyrproject 27 west update 28 29 west zephyr-export 30 31 pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt 32 33 cd ~ 34 wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.13.1/zephyr-sdk-0.13.1-linux-x86_64-setup.run 35 36 chmod +x zephyr-sdk-0.13.1-linux-x86_64-setup.run 37 ./zephyr-sdk-0.13.1-linux-x86_64-setup.run -- -d ~/zephyr-sdk-0.13.1 38 39 - name: Checkout code 40 uses: actions/checkout@v2 41 with: 42 submodules: recursive 43 44### build, test and archive 45# native_posix (0x68) 46 - name: Build native_posix 47 run: | 48 source ~/zephyrproject/zephyr/zephyr-env.sh 49 cd test/ 50 west build -b=native_posix 51 west build -t run 52 53 - name: Archive static lib 54 uses: actions/upload-artifact@v2 55 with: 56 name: uoscore-uedhoc-x86 57 path: test/build/uoscore_uedhoc/libuoscore-uedhoc.a 58 59# native_posix_64 60 - name: Build native_posix_64 61 run: | 62 source ~/zephyrproject/zephyr/zephyr-env.sh 63 cd test/ 64 rm -rf build 65 rm -rf build_lib_test 66 west build -b=native_posix_64 67 west build -t run 68 69 - name: Archive static lib 70 uses: actions/upload-artifact@v2 71 with: 72 name: uoscore-uedhoc-x86-64 73 path: test/build/uoscore_uedhoc/libuoscore-uedhoc.a