File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments