Skip to content

Commit e5f3dfb

Browse files
committed
reproducibility check added
1 parent 7586a9f commit e5f3dfb

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/repro_check.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build and Diff Projects
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- reproducible
8+
pull_request:
9+
branches:
10+
- master
11+
- reproducible
12+
13+
jobs:
14+
build_and_compare:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: '3.x' # Adjust to the version you need
25+
26+
- name: Copy source files to two separate folders
27+
run: |
28+
# Copy source files into two separate folders
29+
mkdir ../buildA ../buildA_extended
30+
cp -r `pwd` ../buildA
31+
cp -r `pwd` ../buildA_extended
32+
echo "Present Directory : `pwd`"
33+
echo "work contents : `ls ..`"
34+
35+
- name: Build source 1
36+
run: |
37+
echo "Repo storage available: `df -h .`"
38+
cd ../buildA
39+
./rustLangRust/configure --set rust.channel=nightly
40+
./rustLangRust/x.py build --stage 1 -j8
41+
42+
- name: Build source 2
43+
run: |
44+
cd ../buildA_extended
45+
./rustLangRust/configure --set rust.channel=nightly
46+
./rustLangRust/x.py build --stage 1 -j8
47+
48+
- name: Compare builds using git diff
49+
run: |
50+
# Go back to the root directory
51+
cd ..
52+
53+
# Ensure the directories exist
54+
if [[ ! -d "buildA" || ! -d "buildA_extended" ]]; then
55+
echo "Error: Build directories not found!"
56+
exit 1
57+
fi
58+
59+
# Perform a diff between the two builds
60+
buildA_stage1=`find buildA/build -name stage1`
61+
buildA2_stage1=`find buildA_extended/build -name stage1`
62+
diff -r $buildA_stage1/bin $buildA2_stage1/bin || echo "Differences found!"
63+

0 commit comments

Comments
 (0)