@@ -23,36 +23,50 @@ jobs:
23
23
with :
24
24
python-version : ' 3.x' # Adjust to the version you need
25
25
26
- - name : Copy source files to two separate folders
26
+ - name : Copy source files to two separate folder
27
27
run : |
28
28
# Copy source files into two separate folders
29
29
mkdir ../buildA ../buildA_extended
30
30
# Copy the repo contents into both
31
31
cp -r "$(pwd)" ../buildA
32
32
cp -r "$(pwd)" ../buildA_extended
33
33
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`"
38
+ rm -rf "$FIRST_SOURCE"
36
39
37
- - name : Build source 1
40
+ - name : Build and store binaries from source 1
38
41
run : |
42
+ cd buildA
39
43
echo "Repo storage available: `df -h .`"
40
- cd ../buildA
41
44
SOURCE_DIR=$(dirname $(find . -maxdepth 2 -name x.py))
42
45
$SOURCE_DIR/configure --set rust.channel=nightly
43
- $SOURCE_DIR/x.py build --stage 1 -j8
46
+ $SOURCE_DIR/x.py build --stage 1 -j$(($(nproc)*2/3))
47
+ rm -rf $SOURCE_DIR
48
+ STAGE1_DIR=`find build -name stage1`
49
+ cp -r "$STAGE1_DIR" .
50
+ echo "Contents stage 1 dir : `ls stage1`"
51
+ rm -rf build
52
+ cd ..
44
53
45
- - name : Build source 2
54
+ - name : Build and store binaries from source 2
46
55
run : |
47
- cd ../buildA_extended
56
+ cd buildA_extended
57
+ echo "Repo storage available: `df -h .`"
48
58
SOURCE_DIR=$(dirname $(find . -maxdepth 2 -name x.py))
49
59
$SOURCE_DIR/configure --set rust.channel=nightly
50
- $SOURCE_DIR/x.py build --stage 1 -j8
60
+ $SOURCE_DIR/x.py build --stage 1 -j$(($(nproc)*2/3))
61
+ rm -rf $SOURCE_DIR
62
+ STAGE1_DIR=`find build -name stage1`
63
+ cp -r "$STAGE1_DIR" .
64
+ echo "Contents stage 1 dir : `ls stage1`"
65
+ rm -rf build
66
+ cd ..
51
67
52
68
- name : Compare builds using git diff
53
69
run : |
54
- # Go back to the root directory
55
- cd ..
56
70
57
71
# Ensure the directories exist
58
72
if [[ ! -d "buildA" || ! -d "buildA_extended" ]]; then
61
75
fi
62
76
63
77
# 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
-
78
+ diff -r buildA/stage1 buildA_extended/stage1 || echo "Differences found!"
0 commit comments