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        - "sig-ecdsa hw-rollback-protection multiimage"
47        - "sig-ecdsa-psa,sig-ecdsa-psa sig-p384"
48        - "ram-load enc-aes256-kw multiimage"
49        - "ram-load enc-aes256-kw sig-ecdsa-mbedtls multiimage"
50    runs-on: ubuntu-latest
51    env:
52      MULTI_FEATURES: ${{ matrix.features }}
53    steps:
54    - uses: actions/checkout@v2
55      with:
56        fetch-depth: 0
57        submodules: recursive
58    - name: Print the environment
59      run: |
60        uname -a
61        lscpu
62        free
63        pwd
64    - name: Signed commit check
65      if: ${{ github.event_name == 'pull_request' }}
66      run: |
67        ./ci/check-signed-off-by.sh
68    - name: Install stable Rust
69      uses: actions-rs/toolchain@v1
70      with:
71        toolchain: stable
72    - name: Sim install
73      run: |
74        ./ci/sim_install.sh
75    - name: Sim run
76      run: |
77        ./ci/sim_run.sh
78