Skip to content

Commit

Permalink
Merge pull request #2 from kpcyrd/repro-env
Browse files Browse the repository at this point in the history
Add repro-env config for reproducible firmware
  • Loading branch information
kpcyrd authored Nov 29, 2023
2 parents a71937b + 347e5d3 commit 06d72b0
Show file tree
Hide file tree
Showing 8 changed files with 604 additions and 57 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/repro-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: repro-env

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 9 * * 1'

env:
REPRO_ENV_URL: https://github.com/kpcyrd/repro-env/releases/download/v0.3.2/repro-env
REPRO_ENV_SHA256: 660995089d32178a63763cf47e1b97e265ef5cf24bf646d16728ca51bf2fab50

jobs:
firmware:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Install repro-env
run: |
wget "${REPRO_ENV_URL}"
echo "${REPRO_ENV_SHA256} repro-env" | sha256sum -c -
sudo install -m755 repro-env -t /usr/bin
- name: Build
run: |
repro-env build -- sh -c '
D3XS_DOOR_KEY="w/CSnPJnWTaEIYpEvXvF+ktwh236iSDZfSx6hExB4bM=" \
D3XS_BRIDGE_KEY="cW49lkXDeM0wOT8N7QxAWePmWs8xZK1FXt1uQT/pcG4=" \
make firmware'
- name: Print sha256 of binary
run: sha256sum target-firmware/riscv32imc-esp-espidf/release/d3xs-firmware

- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: repro-env-test-firmware
path: target-firmware/riscv32imc-esp-espidf/release/d3xs-firmware

binaries:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Install repro-env
run: |
wget "${REPRO_ENV_URL}"
echo "${REPRO_ENV_SHA256} repro-env" | sha256sum -c -
sudo install -m755 repro-env -t /usr/bin
- name: Build
run: |
repro-env build -- sh -c 'make wasm && RUSTFLAGS="-C strip=symbols" cargo build --release --locked -p d3xs -p d3xs-bridge --target x86_64-unknown-linux-musl --features vendored'
- name: Print sha256 of binaries
run: sha256sum target/x86_64-unknown-linux-musl/release/{d3xs,d3xs-bridge}
Loading

0 comments on commit 06d72b0

Please sign in to comment.