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