forked from ad-freiburg/qlever
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (77 loc) · 3.3 KB
/
check_index_version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Check index version
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
merge_group:
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
check-index-version:
strategy:
fail-fast: false
matrix:
compiler: [gcc]
compiler-version: [11]
warnings: [ "-Wall -Wextra -O1 " ]
build-type: [Debug]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
path: 'pr'
- uses: actions/checkout@v3
with:
submodules: 'recursive'
path: 'master'
ref: 'master'
- name: Install dependencies
uses: ./pr/.github/workflows/install-dependencies-ubuntu
- name: Install compiler
uses: ./pr/.github/workflows/install-compiler-ubuntu
with:
compiler: ${{matrix.compiler}}
compiler-version: ${{matrix.compiler-version}}
- name: Configure CMake Master
working-directory: ${{github.workspace}}/master
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DCMAKE_TOOLCHAIN_FILE="$(pwd)/toolchains/${{matrix.compiler}}${{matrix.compiler-version}}.cmake" -DADDITIONAL_COMPILER_FLAGS="${{matrix.warnings}} ${{matrix.asan-flags}} ${{matrix.ubsan-flags}}" -DUSE_PARALLEL=true -DRUN_EXPENSIVE_TESTS=true -DENABLE_EXPENSIVE_CHECKS=true
- name: Configure CMake PR
working-directory: ${{github.workspace}}/pr
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DCMAKE_TOOLCHAIN_FILE="$(pwd)/toolchains/${{matrix.compiler}}${{matrix.compiler-version}}.cmake" -DADDITIONAL_COMPILER_FLAGS="${{matrix.warnings}} ${{matrix.asan-flags}} ${{matrix.ubsan-flags}}" -DUSE_PARALLEL=true -DRUN_EXPENSIVE_TESTS=true -DENABLE_EXPENSIVE_CHECKS=true
- name: Build master
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/master/build --config ${{matrix.build-type}} -- -j $(nproc)
- name: E2E on Master
working-directory: ${{github.workspace}}/master
run: e2e/e2e.sh
- name: Get index version master
working-directory: ${{github.workspace}}/master/build
run: |
if test -f "./PrintIndexVersionMain"; then
echo 'index_version_master<<EOF' >> $GITHUB_ENV
./PrintIndexVersionMain >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
else
echo 'index_version_master={}' >> $GITHUB_ENV
fi
- name: Clean master
run: cmake --build ${{github.workspace}}/master/build --target clean
- name: BuildPr
run: cmake --build ${{github.workspace}}/pr/build --config ${{matrix.build-type}} -- -j $(nproc)
- name: Get index version PR
working-directory: ${{github.workspace}}/pr/build
run: |
echo 'index_version_pr<<EOF' >> $GITHUB_ENV
./PrintIndexVersionMain >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Print index versions
run : |
echo '${{ fromJson(env.index_version_master)}}'
echo '${{ fromJson(env.index_version_pr)}}'
- name: E2E on PR using index from Master
if: env.index_version_master == env.index_version_pr
working-directory: ${{github.workspace}}/pr
run: e2e/e2e.sh -i ../master