Skip to content

Commit c9d4645

Browse files
committed
ci: fix test-reproducibility makefile targets, add to CI job
1 parent aea9ff9 commit c9d4645

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
with:
3030
name: firefox
3131
path: artifacts/firefox.zip
32+
- name: Check reproducibility from src-zip
33+
run: make test-reproducibility-firefox
3234

3335
- name: Build Chrome
3436
run: make build-chrome
@@ -37,6 +39,8 @@ jobs:
3739
with:
3840
name: chrome
3941
path: artifacts/chrome.zip
42+
- name: Check reproducibility from src-zip
43+
run: make test-reproducibility-chrome
4044

4145
typecheck:
4246
runs-on: ubuntu-latest

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,28 @@ test-reproducibility-setup:
6666

6767
# Tests whether the zipped src reliably builds the same as the archive
6868
test-reproducibility-chrome: zip-src build-chrome test-reproducibility-setup
69-
(cd build/aw-watcher-web && make build-chrome && cp build.zip ../../artifacts/reproducibility-chrome.zip)
70-
rm -r build/aw-watcher-web
71-
wc -c artifacts/chrome.zip artifacts/reproducibility-chrome.zip | \
69+
@echo "Building from src-zip..."
70+
@(cd build/aw-watcher-web && make build-chrome && cp artifacts/chrome.zip ../../artifacts/reproducibility-chrome.zip)
71+
@rm -r build/aw-watcher-web
72+
@echo "Checking..."
73+
@wc -c artifacts/chrome.zip artifacts/reproducibility-chrome.zip | \
7274
sort -n | \
7375
cut -d' ' -f2 | \
7476
uniq -c | \
7577
grep -q ' 2 ' \
7678
|| (echo "build artifacts not the same size" && exit 1)
79+
@echo "✅ Reproducibility test passed"
7780

7881
# Tests whether the zipped src reliably builds the same as the archive
7982
test-reproducibility-firefox: zip-src build-firefox test-reproducibility-setup
80-
(cd build/aw-watcher-web && make build-firefox && cp build.zip ../../artifacts/reproducibility-firefox.zip)
81-
rm -r build/aw-watcher-web
82-
wc -c aw-watcher-web.zip build/aw-watcher-web/aw-watcher-web.zip | \
83+
@echo "Building from src-zip..."
84+
@(cd build/aw-watcher-web && make build-firefox && cp artifacts/firefox.zip ../../artifacts/reproducibility-firefox.zip)
85+
@rm -r build/aw-watcher-web
86+
@echo "Checking..."
87+
@wc -c artifacts/firefox.zip artifacts/reproducibility-firefox.zip | \
8388
sort -n | \
8489
cut -d' ' -f2 | \
8590
uniq -c | \
8691
grep -q ' 2 ' \
8792
|| (echo "build artifacts not the same size" && exit 1)
93+
@echo "✅ Reproducibility test passed"

0 commit comments

Comments
 (0)