Skip to content

Commit

Permalink
Include Rust oak_loader in reproducibilty index
Browse files Browse the repository at this point in the history
  • Loading branch information
tiziano88 committed Apr 20, 2020
1 parent 37efedd commit 841dacf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
16 changes: 7 additions & 9 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,18 @@ steps:

# Rebuild the index file with hashes of reproducible artifacts. If this changed compared to the
# checked-in version, it will be detected by the `git_check_diff` step below.
# TODO(#861): Re-enable this step (before git_check_diff) when artifacts are actually reproducibly
# built.
# - name: 'gcr.io/oak-ci/oak:latest'
# id: build_reproducibility_index
# waitFor: ['run_examples', 'build_server_rust']
# timeout: 5m
# entrypoint: 'bash'
# args: ['./scripts/build_reproducibility_index']
- name: 'gcr.io/oak-ci/oak:latest'
id: build_reproducibility_index
waitFor: ['run_examples', 'build_server_rust']
timeout: 5m
entrypoint: 'bash'
args: ['./scripts/build_reproducibility_index']

# Check whether any of the previous steps resulted in file diffs that were not checked in or
# ignored by git.
- name: 'gcr.io/oak-ci/oak:latest'
id: git_check_diff
waitFor: ['git_init', 'run_clang_tidy', 'run_tests', 'run_examples']
waitFor: ['git_init', 'run_clang_tidy', 'run_tests', 'run_examples', 'build_reproducibility_index']
timeout: 5m
entrypoint: 'bash'
args: ['./scripts/git_check_diff']
Expand Down
11 changes: 1 addition & 10 deletions reproducibility_index
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
61fdf25b4e2b4171a579dd9e4716b24348fb3f9f90ad936f9c91046618c93ed5 ./target/wasm32-unknown-unknown/release/abitest_0_frontend.wasm
32a5f6aa9cbac2f71f40be10c52da32653a5b579810e5927af42df171a0f9dfc ./target/wasm32-unknown-unknown/release/abitest_1_backend.wasm
c697982360ea5d5a95b795889b4633ed27d3bc892f9bc9ac1df480c3759cb9b5 ./target/wasm32-unknown-unknown/release/aggregator.wasm
2f5b176dbe8c9269d6bc2253c82d627d556db8a7214de8133ebfa185075a08dc ./target/wasm32-unknown-unknown/release/chat.wasm
c9a7fe26f4ad22af68ec375946a212c0356f5d90827f22884df540008dfc30dc ./target/wasm32-unknown-unknown/release/hello_world.wasm
874c832f9e16cc78e393b73e98ec08ee0c6b475ed67298e4094d31eaaf07f98c ./target/wasm32-unknown-unknown/release/machine_learning.wasm
97906ca9165f63281b03647ec55203e38a7acd2207f9518de52098a4c7c81bde ./target/wasm32-unknown-unknown/release/running_average.wasm
c6f59836ce3f0b2206134ee93215da39f37658cdabd5e90fb40c216ea0f1d694 ./target/wasm32-unknown-unknown/release/translator.wasm
b2e0fe6e68f082564019b986128de56aad7eab08b791e3baacc66c784064dd04 ./bazel-clang-bin/oak/server/loader/oak_runner
6fdb4a4a2c4ec7dab0581dbb5a179c9f66b28834de32c170a4bba74cd46b72e2 ./target/debug/oak_loader
64e97f2701df8a8967f704a6c657d4fee0a92869d411fa1a512411ec9c0f6c4e ./target/x86_64-unknown-linux-musl/release/oak_loader
8 changes: 4 additions & 4 deletions scripts/build_reproducibility_index
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ source "$SCRIPTS_DIR/common"

# List of artifacts that are expected to be reproducibly built.
readonly REPRODUCIBLE_ARTIFACTS=(
./target/wasm32-unknown-unknown/release/*.wasm
./bazel-clang-bin/oak/server/loader/oak_runner
./target/debug/oak_loader
# TODO(#865): Include wasm files when they are reproducibly buildable.
# ./target/wasm32-unknown-unknown/release/*.wasm
./target/x86_64-unknown-linux-musl/release/oak_loader
)

# Index file containing hashes of the reproducible artifacts, alongside their file names.
readonly REPRODUCIBILITY_INDEX='./reproducibility_index'

# Generate the index file by computing the hashes of the artifacts.
# The index file must be checked in, and
sha256sum "${REPRODUCIBLE_ARTIFACTS[@]}" > "${REPRODUCIBILITY_INDEX}"
sha256sum "${REPRODUCIBLE_ARTIFACTS[@]}" | tee "${REPRODUCIBILITY_INDEX}"

0 comments on commit 841dacf

Please sign in to comment.