1name: Build HW models
2
3on:
4  pull_request
5
6env:
7  CHECKOUT_PATH: ${{ github.workspace }}/ext_NRF52_hw_models
8  NRFX_BASE: ${{ github.workspace }}/nrfx
9  BSIM_OUT_PATH: ${{ github.workspace }}/bsim
10  BSIM_COMPONENTS_PATH: ${{ github.workspace }}/bsim/components
11  BSIM_BASE_PATH: ${{ github.workspace }}/bsim/components
12
13jobs:
14  build-hw-models:
15    name: "Build HW models"
16    runs-on: ubuntu-latest
17
18    steps:
19    - name: Install dependencies
20      run: |
21        sudo apt-get install gcc-multilib binutils
22
23    - name: Get PR
24      uses: actions/checkout@v2
25      with:
26        path: ${{env.CHECKOUT_PATH}}
27
28    - name: Fetch dependencies
29      run: |
30        git clone -b v2.8.0 --depth=1 https://github.com/NordicSemiconductor/nrfx ${NRFX_BASE}
31        mkdir ${BSIM_OUT_PATH}
32        cd ${BSIM_OUT_PATH}
33        wget https://storage.googleapis.com/git-repo-downloads/repo
34        chmod a+x ./repo
35        python3 ./repo init -u https://github.com/BabbleSim/manifest.git -m nrf_hw_models_ci.xml -b master --depth=1
36        python3 ./repo sync -c
37
38    - name: Compile HW models
39      run: |
40        cd ${CHECKOUT_PATH}
41        make compile
42