summaryrefslogtreecommitdiff
path: root/.github/workflows/build_tests.yml
blob: 5ce6e416d4d66e3579f48be2be0d99e2eb9ff6df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build Tests

on:
  push:
    branches:
    - master
    - release/v1.5
  pull_request:
    branches:
    - master
    - release/v1.5

jobs:
  build_hpmicro:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Install dependencies
        run: sudo apt-get update && sudo apt-get install -y cmake ninja-build

      - name: Download hpm_sdk
        run: |
          cd ~
          git clone https://github.com/hpmicro/hpm_sdk.git

      - name: Download RISC-V toolchain
        run: |
          cd ~
          wget https://github.com/hpmicro/riscv-gnu-toolchain/releases/download/2023.10.18/rv32imac_zicsr_zifencei_multilib_b_ext-linux.tar.gz
          tar -xzf rv32imac_zicsr_zifencei_multilib_b_ext-linux.tar.gz

      - name: Build hpm demo
        run: |
          cd tests/hpmicro
          export HPM_SDK_BASE=~/hpm_sdk
          export GNURISCV_TOOLCHAIN_PATH=~/rv32imac_zicsr_zifencei_multilib_b_ext-linux
          export HPM_SDK_TOOLCHAIN_VARIANT=
          cmake -S . -B build -GNinja -DBOARD=hpm6800evk -DHPM_BUILD_TYPE=flash_sdram_xip -DCMAKE_BUILD_TYPE=debug -DEXTRA_C_FLAGS="-Werror";cmake --build build

  build_bouffalolab:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Install dependencies
        run: sudo apt-get update && sudo apt-get install -y cmake make

      - name: Download bouffalo_sdk
        run: |
          cd ~
          git clone https://github.com/bouffalolab/bouffalo_sdk.git

      - name: Download RISC-V toolchain
        run: |
          cd ~
          git clone https://github.com/bouffalolab/toolchain_gcc_t-head_linux.git

      - name: Build bouffalo demo
        run: |
          cd tests/bouffalolab
          export BL_SDK_BASE=~/bouffalo_sdk
          export PATH=~/toolchain_gcc_t-head_linux/bin:$PATH
          make CHIP=bl616 BOARD=bl616dk -j12

  build_espressif:
    strategy:
      matrix:
        idf_ver: ["latest"]
    runs-on: ubuntu-latest
    container: espressif/idf:${{ matrix.idf_ver }}
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: 'recursive'
      - name: Build espressif demo
        shell: bash
        run: |
          . ${IDF_PATH}/export.sh
          pip install idf-component-manager ruamel.yaml idf-build-apps --upgrade
          idf-build-apps build -p ./tests/espressif --recursive --target esp32s3