@@ -36,47 +36,46 @@ jobs:
36
36
- name : Build and store binaries from source 1
37
37
run : |
38
38
echo "Repo storage available: `df -h .`"
39
- cd ../buildA
39
+ pushd ../buildA
40
40
SOURCE_DIR=$(dirname $(find . -maxdepth 2 -name x.py))
41
41
$SOURCE_DIR/configure --set rust.channel=nightly
42
- $SOURCE_DIR/x.py build --stage 2 -j$(($(nproc)*2/3))
42
+ mkdir stage2
43
+ echo "build1" > stage2/build.txt
43
44
rm -rf $SOURCE_DIR
44
- STAGE1_DIR=`find build -name stage2`
45
- cp -r "$STAGE1_DIR" .
46
45
echo "Contents stage 2 dir : `ls stage2`"
47
46
rm -rf build
47
+ popd
48
48
49
49
- name : Build and store binaries from source 2
50
50
run : |
51
- cd ../buildA_extended
52
51
echo "Repo storage available: `df -h .`"
52
+ pushd ../buildA_extended
53
53
SOURCE_DIR=$(dirname $(find . -maxdepth 2 -name x.py))
54
54
$SOURCE_DIR/configure --set rust.channel=nightly
55
- $SOURCE_DIR/x.py build --stage 2 -j$(($(nproc)*2/3))
55
+ mkdir stage2
56
+ echo "buildA_extended" > stage2/build.txt
56
57
rm -rf $SOURCE_DIR
57
- STAGE1_DIR=`find build -name stage2`
58
- cp -r "$STAGE1_DIR" .
59
58
echo "Contents stage 2 dir : `ls stage2`"
60
59
rm -rf build
60
+ popd
61
61
62
62
- name : Install diffoscope
63
63
run : |
64
64
sudo apt-get update
65
65
sudo apt-get install -y diffoscope
66
66
67
- - name : Compare builds using git diff
67
+ - name : Compare builds
68
68
run : |
69
69
# Go back to the root directory
70
- cd ..
71
70
72
71
# Ensure the directories exist
73
- if [[ ! -d "buildA" || ! -d "buildA_extended" ]]; then
72
+ if [[ ! -d "../ buildA" || ! -d "../ buildA_extended" ]]; then
74
73
echo "Error: Build directories not found!"
75
74
exit 1
76
75
fi
77
76
78
77
# Perform a diff between the two builds
79
- diffoscope buildA/stage2 buildA_extended/stage2 > diffoscope_output.txt || echo "Differences found!"
78
+ diffoscope ../ buildA/stage2 ../ buildA_extended/stage2 > diffoscope_output.txt || echo "Differences found!"
80
79
81
80
- name : Upload diffoscope output
82
81
uses : actions/upload-artifact@v4
86
85
87
86
- name : Archive buildA and buildA_extended
88
87
run : |
89
- tar -czf buildA.tar.gz buildA
90
- tar -czf buildA_extended.tar.gz buildA_extended
88
+ tar -czf buildA.tar.gz ../ buildA
89
+ tar -czf buildA_extended.tar.gz ../ buildA_extended
91
90
92
91
- name : Upload buildA artifact
93
92
uses : actions/upload-artifact@v4
0 commit comments