1name: Run tests in simulator 2 3on: 4 workflow_dispatch: 5 workflow_call: 6 7jobs: 8 test_avr: 9 name: Test in simavr for ATMega1284 10 runs-on: ubuntu-20.04 11 12 steps: 13 - name: Check out code from GitHub 14 uses: actions/checkout@v2 15 with: 16 path: nanopb 17 fetch-depth: "0" 18 19 - name: Install dependencies 20 run: | 21 sudo apt-get update 22 sudo apt-get install python3-protobuf protobuf-compiler scons 23 sudo apt-get install libelf-dev gcc-avr gdb-avr avr-libc 24 25 - name: Install simavr 26 run: | 27 git clone https://github.com/buserror/simavr.git 28 cd simavr 29 make build-simavr 30 sudo make install-simavr 31 sudo ldconfig 32 33 - name: Run tests in AVR simulator 34 run: | 35 cd nanopb/tests 36 scons PLATFORM=AVR 37 38 test_mips: 39 name: Test in qemu for MIPS 40 runs-on: ubuntu-20.04 41 42 steps: 43 - name: Check out code from GitHub 44 uses: actions/checkout@v2 45 with: 46 path: nanopb 47 fetch-depth: "0" 48 49 - name: Install dependencies 50 run: | 51 sudo apt-get update 52 sudo apt-get install python3-protobuf protobuf-compiler scons 53 sudo apt-get install gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-mips-linux-gnu g++-mips-linux-gnu qemu-user 54 55 - name: Run tests for big-endian MIPS 56 run: | 57 cd nanopb/tests 58 rm -rf build 59 scons PLATFORM=MIPS 60 61 - name: Run tests for little-endian MIPS 62 run: | 63 cd nanopb/tests 64 rm -rf build 65 scons PLATFORM=MIPSEL 66 67 test_riscv: 68 name: Test in qemu for RISCV64 69 runs-on: ubuntu-20.04 70 71 steps: 72 - name: Check out code from GitHub 73 uses: actions/checkout@v2 74 with: 75 path: nanopb 76 fetch-depth: "0" 77 78 - name: Install dependencies 79 run: | 80 sudo apt-get update 81 sudo apt-get install python3-protobuf protobuf-compiler scons 82 sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu qemu-user 83 84 - name: Run tests for RISCV64 85 run: | 86 cd nanopb/tests 87 rm -rf build 88 scons PLATFORM=RISCV64 89 90