Add MPU protections #147
Workflow file for this run
This file contains hidden or 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: eCTF | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- decoder/** | |
jobs: | |
decoder: | |
name: Build Decoder firmware | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up environment | |
run: | | |
python -m pip install ./tools/ | |
python -m pip install -e ./design/ | |
- name: Generate secrets | |
run: python -m ectf25_design.gen_secrets -f secrets/secrets.json 1 2 3 | |
- name: Cache Docker images | |
uses: ScribeMD/docker-cache@0.5.0 | |
with: | |
key: docker-${{ runner.os }}-${{ hashFiles('decoder/Dockerfile') }} | |
- name: Build docker image | |
working-directory: decoder | |
run: docker build -t decoder . | |
- name: Build firmware | |
working-directory: decoder | |
run: docker run --rm -v ./build_out:/out -v ./:/decoder -v ./../secrets:/secrets -e DECODER_ID=0xdeadbeef decoder | |
- name: Create artifact | |
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: max78000.bin | |
path: decoder/build_out/max78000.bin | |
- name: Get tag name | |
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }} | |
id: tag-name | |
run: | | |
echo "tagname=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Release | |
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }} | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh release create ${{ steps.tag-name.outputs.tagname }} -t "firmware" -n "Firmware release (${{ steps.tag-name.outputs.tagname }})" | |
gh release upload ${{ steps.tag-name.outputs.tagname }} decoder/build_out/max78000.bin |