@@ -23,36 +23,49 @@ jobs:
2323 with :
2424 python-version : ' 3.x' # Adjust to the version you need
2525
26- - name : Copy source files to two separate folders
26+ - name : Copy source files to two separate folder
2727 run : |
2828 # Copy source files into two separate folders
2929 mkdir ../buildA ../buildA_extended
3030 # Copy the repo contents into both
3131 cp -r "$(pwd)" ../buildA
3232 cp -r "$(pwd)" ../buildA_extended
3333
34- echo "Present Directory : `pwd`"
35- echo "work contents : `ls ..`"
34+ FIRST_SOURCE=`pwd`
35+ echo "Present Directory : $FIRST_SOURCE"
36+ cd ..
37+ echo "work contents : `ls`"
3638
37- - name : Build source 1
39+ - name : Build and store binaries from source 1
3840 run : |
41+ cd buildA
3942 echo "Repo storage available: `df -h .`"
40- cd ../buildA
4143 SOURCE_DIR=$(dirname $(find . -maxdepth 2 -name x.py))
4244 $SOURCE_DIR/configure --set rust.channel=nightly
43- $SOURCE_DIR/x.py build --stage 1 -j8
45+ $SOURCE_DIR/x.py build --stage 1 -j$(($(nproc)*2/3))
46+ rm -rf $SOURCE_DIR
47+ STAGE1_DIR=`find build -name stage1`
48+ cp -r "$STAGE1_DIR" .
49+ echo "Contents stage 1 dir : `ls stage1`"
50+ rm -rf build
51+ cd ..
4452
45- - name : Build source 2
53+ - name : Build and store binaries from source 2
4654 run : |
47- cd ../buildA_extended
55+ cd buildA_extended
56+ echo "Repo storage available: `df -h .`"
4857 SOURCE_DIR=$(dirname $(find . -maxdepth 2 -name x.py))
4958 $SOURCE_DIR/configure --set rust.channel=nightly
50- $SOURCE_DIR/x.py build --stage 1 -j8
59+ $SOURCE_DIR/x.py build --stage 1 -j$(($(nproc)*2/3))
60+ rm -rf $SOURCE_DIR
61+ STAGE1_DIR=`find build -name stage1`
62+ cp -r "$STAGE1_DIR" .
63+ echo "Contents stage 1 dir : `ls stage1`"
64+ rm -rf build
65+ cd ..
5166
5267 - name : Compare builds using git diff
5368 run : |
54- # Go back to the root directory
55- cd ..
5669
5770 # Ensure the directories exist
5871 if [[ ! -d "buildA" || ! -d "buildA_extended" ]]; then
6174 fi
6275
6376 # Perform a diff between the two builds
64- buildA_stage1=`find buildA/build -name stage1`
65- buildA2_stage1=`find buildA_extended/build -name stage1`
66- diff -r $buildA_stage1/bin $buildA2_stage1/bin || echo "Differences found!"
67-
77+ diff -r buildA/stage1 buildA_extended/stage1 || echo "Differences found!"
0 commit comments