Skip to content

Commit

Permalink
Speed up diff generation
Browse files Browse the repository at this point in the history
  • Loading branch information
frabert committed May 25, 2022
1 parent 98c5fd6 commit b0d51dd
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/diff_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,12 @@ jobs:
- name: Adding github workspace as safe directory
# See issue https://github.com/actions/checkout/issues/760
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Fetch merge
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Fetch base branch
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}
fetch-depth: 0
submodules: true
path: old
fetch-depth: 0
- name: Install utility tools
shell: bash
run: |
Expand All @@ -58,25 +52,34 @@ jobs:
-L -o vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64.tar.xz
tar xf vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64.tar.xz
- name: Build old rellic
- name: Configure rellic
shell: bash
run: |
cmake -S old -B rellic-build-old -DVCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64
cmake --build rellic-build-old
cmake -S $GITHUB_WORKSPACE \
-B rellic-build \
-DVCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64
- name: Build new rellic
- name: Build old rellic
shell: bash
run: |
cmake -S . -B rellic-build -DVCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64
cmake --build rellic-build
cp rellic-build/tools/rellic-decomp rellic-build/tools/rellic-decomp-old
- name: Checkout merge branch
shell: bash
run: git checkout --progress --force -B ${{ github.ref }}

- name: Build new rellic
shell: bash
run: cmake --build rellic-build

- name: Print job summary
shell: bash
run: |
echo "# Test diffs" >> $GITHUB_STEP_SUMMARY
cd $GITHUB_WORKSPACE/tests/tools/decomp
env CLANG=clang-14 \
OLD_RELLIC=$GITHUB_WORKSPACE/rellic-build-old/tools/rellic-decomp \
OLD_RELLIC=$GITHUB_WORKSPACE/rellic-build/tools/rellic-decomp-old \
NEW_RELLIC=$GITHUB_WORKSPACE/rellic-build/tools/rellic-decomp \
make -s -j1 -f diff_outputs.mk >> $GITHUB_STEP_SUMMARY
Expand All @@ -86,7 +89,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/tests/tools/decomp
env CLANG=clang-14 \
OLD_RELLIC=$GITHUB_WORKSPACE/rellic-build-old/tools/rellic-decomp \
OLD_RELLIC=$GITHUB_WORKSPACE/rellic-build/tools/rellic-decomp-old \
NEW_RELLIC=$GITHUB_WORKSPACE/rellic-build/tools/rellic-decomp \
make -s -j1 -f diff_outputs.mk >> $GITHUB_WORKSPACE/test-diff.md
Expand Down

0 comments on commit b0d51dd

Please sign in to comment.