forked from oasisprotocol/oasis-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.86 KB
/
ci-reproducibility.yml
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
# 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/*
# Or when a pull request event occurs for a pull request against one of the
# matched branches and at least one modified file matches the configured paths.
pull_request:
branches:
- main
- stable/*
paths:
- .github/actions/**
# Besides pushes on the branches above, also check every day at 00:00 UTC.
schedule:
- cron: "0 0 * * *"
# Cancel in-progress jobs on same branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-reproducible-build:
# NOTE: This name appears in GitHub's Checks API.
name: check-reproducibility
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Determine tag name
id: determine-tag
uses: ./.github/actions/determine-tag
with:
use_base_for_pr: yes
- name: Build test binaries, 1.
id: build-1
uses: ./.github/actions/hash-rust
with:
binaries: test-runtime-simple-consensus,test-runtime-simple-keyvalue
image: ghcr.io/oasisprotocol/runtime-builder:${{ steps.determine-tag.outputs.tag }}
- name: Build test binaries, 2.
id: build-2
uses: ./.github/actions/hash-rust
with:
binaries: test-runtime-simple-consensus,test-runtime-simple-keyvalue
image: ghcr.io/oasisprotocol/runtime-builder:${{ steps.determine-tag.outputs.tag }}
- name: Check result is non-empty
run: |
[ "${{ steps.build-1.outputs.hashes }}" != "" ]
- name: Check binary equality
run: |
[ "${{ steps.build-1.outputs.hashes }}" == "${{ steps.build-2.outputs.hashes }}" ]