|
| 1 | +name: PIC32MZ simulator test |
| 2 | + |
| 3 | +# START OF COMMON SECTION |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ 'master', 'main', 'release/**' ] |
| 7 | + pull_request: |
| 8 | + branches: [ '*' ] |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | +# END OF COMMON SECTION |
| 14 | + |
| 15 | +# Build the PIC32MZ software simulator (https://github.com/wolfSSL/simulators, |
| 16 | +# PIC32MZSim/ subdirectory) and run the wolfCrypt test suite on emulated |
| 17 | +# PIC32MZ EC (no FPU, CE ignores OUT_SWAP) and EF (FPU + OUT_SWAP) parts, |
| 18 | +# through both the direct-register PIC32 port and the MPLAB Harmony 3 driver |
| 19 | +# port. |
| 20 | +# |
| 21 | +# Like stm32-sim.yml, the Dockerfiles read wolfSSL from /opt/wolfssl at |
| 22 | +# runtime via a bind mount, so no Dockerfile patching is required - the PR |
| 23 | +# checkout is mounted directly. |
| 24 | + |
| 25 | +jobs: |
| 26 | + pic32mz_sim: |
| 27 | + name: wolfCrypt on PIC32MZ ${{ matrix.chip_label }} (${{ matrix.port_label }}) |
| 28 | + if: github.repository_owner == 'wolfssl' |
| 29 | + runs-on: ubuntu-24.04 |
| 30 | + timeout-minutes: 30 |
| 31 | + strategy: |
| 32 | + fail-fast: false |
| 33 | + matrix: |
| 34 | + include: |
| 35 | + - port_label: direct |
| 36 | + chip_label: EC |
| 37 | + dockerfile: Dockerfile.wolfcrypt-direct |
| 38 | + image_tag: pic32mz-wolfcrypt-direct:ci |
| 39 | + script: run-wolfcrypt-direct-ec.sh |
| 40 | + cache_scope: pic32mz-direct |
| 41 | + - port_label: direct |
| 42 | + chip_label: EF |
| 43 | + dockerfile: Dockerfile.wolfcrypt-direct |
| 44 | + image_tag: pic32mz-wolfcrypt-direct:ci |
| 45 | + script: run-wolfcrypt-direct-ef.sh |
| 46 | + cache_scope: pic32mz-direct |
| 47 | + - port_label: harmony |
| 48 | + chip_label: EC |
| 49 | + dockerfile: Dockerfile.wolfcrypt-harmony |
| 50 | + image_tag: pic32mz-wolfcrypt-harmony:ci |
| 51 | + script: run-wolfcrypt-harmony-ec.sh |
| 52 | + cache_scope: pic32mz-harmony |
| 53 | + - port_label: harmony |
| 54 | + chip_label: EF |
| 55 | + dockerfile: Dockerfile.wolfcrypt-harmony |
| 56 | + image_tag: pic32mz-wolfcrypt-harmony:ci |
| 57 | + script: run-wolfcrypt-harmony-ef.sh |
| 58 | + cache_scope: pic32mz-harmony |
| 59 | + steps: |
| 60 | + - name: Checkout wolfSSL (PR source) |
| 61 | + uses: actions/checkout@v4 |
| 62 | + with: |
| 63 | + path: wolfssl |
| 64 | + |
| 65 | + - name: Clone PIC32MZ simulator |
| 66 | + run: git clone --depth 1 https://github.com/wolfSSL/simulators simulators |
| 67 | + |
| 68 | + - uses: docker/setup-buildx-action@v3 |
| 69 | + |
| 70 | + - name: Build ${{ matrix.image_tag }} image |
| 71 | + uses: docker/build-push-action@v5 |
| 72 | + with: |
| 73 | + context: simulators/PIC32MZSim |
| 74 | + file: simulators/PIC32MZSim/${{ matrix.dockerfile }} |
| 75 | + push: false |
| 76 | + load: true |
| 77 | + tags: ${{ matrix.image_tag }} |
| 78 | + cache-from: type=gha,scope=${{ matrix.cache_scope }} |
| 79 | + cache-to: type=gha,mode=max,scope=${{ matrix.cache_scope }} |
| 80 | + |
| 81 | + - name: Run wolfCrypt tests on PIC32MZ ${{ matrix.chip_label }} (${{ matrix.port_label }}) |
| 82 | + run: | |
| 83 | + docker run --rm \ |
| 84 | + -v "${{ github.workspace }}/wolfssl:/opt/wolfssl:ro" \ |
| 85 | + ${{ matrix.image_tag }} \ |
| 86 | + /app/scripts/${{ matrix.script }} |
0 commit comments