Skip to content

Commit fe3b2c7

Browse files
committed
remove unnecessary sources and folders to save space
1 parent ab3e8b0 commit fe3b2c7

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

.github/workflows/repro_check.yml

+26-15
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,50 @@ 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`"
38+
rm -rf "$FIRST_SOURCE"
3639
37-
- name: Build source 1
40+
- name: Build and store binaries from source 1
3841
run: |
42+
cd buildA
3943
echo "Repo storage available: `df -h .`"
40-
cd ../buildA
4144
SOURCE_DIR=$(dirname $(find . -maxdepth 2 -name x.py))
4245
$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 ..
4453
45-
- name: Build source 2
54+
- name: Build and store binaries from source 2
4655
run: |
47-
cd ../buildA_extended
56+
cd buildA_extended
57+
echo "Repo storage available: `df -h .`"
4858
SOURCE_DIR=$(dirname $(find . -maxdepth 2 -name x.py))
4959
$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 ..
5167
5268
- name: Compare builds using git diff
5369
run: |
54-
# Go back to the root directory
55-
cd ..
5670
5771
# Ensure the directories exist
5872
if [[ ! -d "buildA" || ! -d "buildA_extended" ]]; then
@@ -61,7 +75,4 @@ jobs:
6175
fi
6276
6377
# 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

Comments
 (0)