Allow operations to not store their result in the cache #3884
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
# We deliberately set `Release` and then `O1`, s.t. we get faster compile times (O1, less optimizations), but | |
# smaller binaries (no debug info), because otherwise we run out of memory on GitHub actions. | |
warnings: [ "-Wall -Wextra -O1 " ] | |
build-type: [Release] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
path: 'pr' | |
- uses: actions/checkout@v4 | |
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 | |
# Only build the actually required executables to save space on the device. | |
run: | | |
cmake --build ${{github.workspace}}/master/build --config ${{matrix.build-type}} --target IndexBuilderMain -- -j $(nproc) | |
cmake --build ${{github.workspace}}/master/build --config ${{matrix.build-type}} --target ServerMain -- -j $(nproc) | |
cmake --build ${{github.workspace}}/master/build --config ${{matrix.build-type}} --target PrintIndexVersionMain -- -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 | |
# also only build the required executables here. | |
run: | | |
cmake --build ${{github.workspace}}/pr/build --config ${{matrix.build-type}} --target IndexBuilderMain -- -j $(nproc) | |
cmake --build ${{github.workspace}}/pr/build --config ${{matrix.build-type}} --target ServerMain -- -j $(nproc) | |
cmake --build ${{github.workspace}}/pr/build --config ${{matrix.build-type}} --target PrintIndexVersionMain -- -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 |