Run Sancus examples #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Sancus examples | |
on: | |
push: | |
# run on manual trigger | |
workflow_dispatch: | |
pull_request: | |
# trigger a cron job every monday at 8am | |
schedule: | |
- cron: '00 08 * * MON' | |
jobs: | |
matrix-gen: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{steps.list_dirs.outputs.matrix}} | |
steps: | |
- uses: actions/checkout@v2 | |
- id: list_dirs | |
run: | | |
MATRIX=$(ls -d */ | sed 's:/*$::' | jq -cnR '[inputs | select(length>0)]') | |
echo $MATRIX | |
echo "::set-output name=matrix::$MATRIX" | |
test-examples: | |
name: ${{ matrix.example }} on ${{ matrix.core }}-${{ matrix.security }} | |
runs-on: ubuntu-latest | |
needs: matrix-gen | |
container: | |
# sancus-devel Docker container is regularly built and published in the sancus-main Action Workflow | |
image: docker.pkg.github.com/sancus-tee/sancus-main/${{ matrix.core }}-devel-${{ matrix.security }}:latest | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
example: ${{fromJson(needs.matrix-gen.outputs.matrix)}} | |
core: [sancus, aion] | |
security: [64, 128] | |
# use include | |
include: | |
- example: hello-library | |
flags: ARCHIVE_MODE=thin | |
security: 64 | |
- example: hello-library | |
flags: ARCHIVE_MODE=thick | |
security: 128 | |
exclude: | |
# exclude all aion + 128 bit for now | |
- core: aion | |
security: 128 | |
- core: aion | |
example: confidential-loading | |
- core: aion | |
example: sancus-step | |
- core: aion | |
example: dma | |
- core: sancus | |
example: atomic-violation | |
# issue #22 | |
- example: fileio | |
steps: | |
- uses: actions/checkout@v2 | |
name: Pull repository | |
- run: make SANCUS_SECURITY=${{ matrix.security }} CI=1 ${{ matrix.flags }} ${{ matrix.example }}.sim | |
name: Build and run ${{ matrix.example }} on @ ${{ matrix.core }}-${{ matrix.security }} |