1# For development, trigger this on any push.
2on:
3  push:
4    branches:
5      - main
6  pull_request:
7
8name: Sim
9
10concurrency:
11  group: sim-${{ github.event.pull_request.number || github.ref }}
12  cancel-in-progress: true
13
14jobs:
15  environment:
16    strategy:
17      matrix:
18        features:
19        - "sig-ecdsa,sig-ecdsa-mbedtls,sig-ed25519,enc-kw,bootstrap"
20        - "sig-rsa,sig-rsa3072,overwrite-only,validate-primary-slot,swap-move"
21        - "enc-rsa,enc-rsa max-align-32"
22        - "enc-aes256-rsa,enc-aes256-rsa max-align-32"
23        - "enc-ec256,enc-ec256 max-align-32"
24        - "enc-aes256-ec256,enc-aes256-ec256 max-align-32"
25        - "enc-x25519,enc-x25519 max-align-32"
26        - "enc-aes256-x25519,enc-aes256-x25519 max-align-32"
27        - "sig-rsa overwrite-only,sig-ecdsa overwrite-only,sig-ecdsa-mbedtls overwrite-only,multiimage overwrite-only"
28        - "sig-rsa validate-primary-slot,sig-ecdsa validate-primary-slot,sig-ecdsa-mbedtls validate-primary-slot,sig-rsa multiimage validate-primary-slot"
29        - "enc-kw overwrite-only,enc-kw overwrite-only max-align-32"
30        - "enc-rsa overwrite-only,enc-rsa overwrite-only max-align-32"
31        - "enc-aes256-kw overwrite-only,enc-aes256-kw overwrite-only max-align-32"
32        - "sig-rsa enc-rsa validate-primary-slot,swap-move enc-rsa sig-rsa validate-primary-slot bootstrap"
33        - "sig-rsa enc-kw validate-primary-slot bootstrap,sig-ed25519 enc-x25519 validate-primary-slot"
34        - "sig-ecdsa enc-kw validate-primary-slot"
35        - "sig-ecdsa-mbedtls enc-kw validate-primary-slot"
36        - "sig-rsa validate-primary-slot overwrite-only,sig-rsa validate-primary-slot overwrite-only max-align-32"
37        - "sig-ecdsa enc-ec256 validate-primary-slot"
38        - "sig-ecdsa-mbedtls enc-ec256-mbedtls validate-primary-slot"
39        - "sig-ecdsa-mbedtls enc-aes256-ec256 validate-primary-slot"
40        - "sig-rsa validate-primary-slot overwrite-only downgrade-prevention"
41        - "sig-rsa validate-primary-slot ram-load"
42        - "sig-rsa enc-rsa validate-primary-slot ram-load"
43        - "sig-rsa validate-primary-slot direct-xip"
44        - "sig-rsa validate-primary-slot ram-load multiimage"
45        - "sig-rsa validate-primary-slot direct-xip multiimage"
46    runs-on: ubuntu-latest
47    env:
48      MULTI_FEATURES: ${{ matrix.features }}
49    steps:
50    - uses: actions/checkout@v2
51      with:
52        fetch-depth: 0
53        submodules: recursive
54    - name: Print the environment
55      run: |
56        uname -a
57        lscpu
58        free
59        pwd
60    - name: Signed commit check
61      if: ${{ github.event_name == 'pull_request' }}
62      run: |
63        ./ci/check-signed-off-by.sh
64    - name: Install stable Rust
65      uses: actions-rs/toolchain@v1
66      with:
67        toolchain: stable
68    - name: Sim install
69      run: |
70        ./ci/sim_install.sh
71    - name: Sim run
72      run: |
73        ./ci/sim_run.sh
74