name: Renode Automated - Base Tests

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  renode_automated_base:
    runs-on: ubuntu-20.04

    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true

      - name: Select config
        run: |
          cp config/examples/nrf52840.config .config && make include/target.h SIGN=NONE


# SIGN=NONE TEST

      - name: Renode Tests SIGN=NONE
        run: ./tools/renode/docker-test.sh "SIGN=NONE"


# ECC256 TEST
      - name: Renode Tests ECC256
        run: ./tools/renode/docker-test.sh "SIGN=ECC256"

# ECC384 TEST
      - name: Renode Tests ECC384
        run: ./tools/renode/docker-test.sh "SIGN=ECC384"

# ED25519 TEST
      - name: Renode Tests ED25519
        run: ./tools/renode/docker-test.sh "SIGN=ED25519"

# ED448 TEST
      - name: Renode Tests ED448
        run: ./tools/renode/docker-test.sh "SIGN=ED448"

# RSA2048 TEST
      - name: Renode Tests RSA2048
        run: ./tools/renode/docker-test.sh "SIGN=RSA2048"

# RSA3072 TEST
      - name: Renode Tests RSA3072
        run: ./tools/renode/docker-test.sh "SIGN=RSA3072"

# RSA4096 TEST
      - name: Renode Tests RSA4096
        run: ./tools/renode/docker-test.sh "SIGN=RSA4096"

      - name: Upload Output Dir
        uses: actions/upload-artifact@v2
        with:
          name: Renode Test Results
          path: test_results/

