-
Notifications
You must be signed in to change notification settings - Fork 27
73 lines (63 loc) · 2.18 KB
/
ci-reproducibility.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: ci-reproducibility
# Trigger the workflow when:
on:
push:
branches:
- main
- stable/*
- rc/*
# Besides pushes on the branches above, also check every day at 00:00 UTC.
schedule:
- cron: "0 0 * * *"
jobs:
check-reproducible-build-runtime:
# NOTE: This name appears in GitHub's Checks API.
name: check-reproducibility
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build runtime, 1.
id: build-1
uses: oasisprotocol/oasis-sdk/.github/actions/hash-rust@main
with:
image: ghcr.io/oasisprotocol/runtime-builder:main
dir: ${{ github.workspace }}/runtime
binaries: sapphire-paratime
- name: Build runtime, 2.
id: build-2
uses: oasisprotocol/oasis-sdk/.github/actions/hash-rust@main
with:
image: ghcr.io/oasisprotocol/runtime-builder:main
dir: ${{ github.workspace }}/runtime
binaries: sapphire-paratime
- name: Check binary equality
run: |
[ "${{ steps.build-1.outputs.hashes }}" == "${{ steps.build-2.outputs.hashes }}" ]
check-reproducible-build-sgx-runtime:
# NOTE: This name appears in GitHub's Checks API.
name: check-reproducibility
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build runtime, 1.
id: build-1
uses: oasisprotocol/oasis-sdk/.github/actions/hash-rust@main
with:
image: ghcr.io/oasisprotocol/runtime-builder:main
dir: ${{ github.workspace }}/runtime
binaries: sapphire-paratime.sgxs
sgx: yes
- name: Build runtime, 2.
id: build-2
uses: oasisprotocol/oasis-sdk/.github/actions/hash-rust@main
with:
image: ghcr.io/oasisprotocol/runtime-builder:main
dir: ${{ github.workspace }}/runtime
binaries: sapphire-paratime.sgxs
sgx: yes
- name: Check binary equality
run: |
[ "${{ steps.build-1.outputs.hashes }}" == "${{ steps.build-2.outputs.hashes }}" ]