|
| 1 | +# Workflow for checkig the backward compatibility of UMF. |
| 2 | +# Test the latest UMF shared library with binaries compiled using the older UMF |
| 3 | +# shared library. |
| 4 | +name: Compatibility |
| 5 | + |
| 6 | +on: |
| 7 | + workflow_call: |
| 8 | + inputs: |
| 9 | + tag: |
| 10 | + description: Check backward compatibility with this tag |
| 11 | + type: string |
| 12 | + default: "v0.10.1" |
| 13 | + |
| 14 | +permissions: |
| 15 | + contents: read |
| 16 | + |
| 17 | +jobs: |
| 18 | + ubuntu-build: |
| 19 | + # TODO add other OSes |
| 20 | + name: Ubuntu |
| 21 | + runs-on: 'ubuntu-22.04' |
| 22 | + |
| 23 | + steps: |
| 24 | + # NOTE: we need jemalloc for older version of UMF |
| 25 | + - name: Install apt packages |
| 26 | + run: | |
| 27 | + sudo apt-get update |
| 28 | + sudo apt-get install -y clang cmake libnuma-dev libjemalloc-dev libtbb-dev |
| 29 | +
|
| 30 | + - name: Checkout "tag" UMF version |
| 31 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 32 | + with: |
| 33 | + fetch-depth: 0 |
| 34 | + ref: refs/tags/${{inputs.tag}} |
| 35 | + path: ${{github.workspace}}/tag_version |
| 36 | + |
| 37 | + - name: Install libhwloc |
| 38 | + working-directory: ${{github.workspace}}/tag_version |
| 39 | + run: .github/scripts/install_hwloc.sh |
| 40 | + |
| 41 | + - name: Get "tag" UMF version |
| 42 | + working-directory: ${{github.workspace}}/tag_version |
| 43 | + run: | |
| 44 | + VERSION=$(git describe --tags --abbrev=0 | grep -oP '\d+\.\d+\.\d+') |
| 45 | + echo "tag version: $VERSION" |
| 46 | +
|
| 47 | + - name: Configure "tag" UMF build |
| 48 | + working-directory: ${{github.workspace}}/tag_version |
| 49 | + run: > |
| 50 | + cmake |
| 51 | + -B ${{github.workspace}}/tag_version/build |
| 52 | + -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/tag_version/build/install" |
| 53 | + -DCMAKE_BUILD_TYPE=Debug |
| 54 | + -DUMF_BUILD_SHARED_LIBRARY=ON |
| 55 | + -DCMAKE_C_COMPILER=gcc |
| 56 | + -DCMAKE_CXX_COMPILER=g++ |
| 57 | + -DUMF_BUILD_TESTS=ON |
| 58 | + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON |
| 59 | + -DUMF_BUILD_CUDA_PROVIDER=ON |
| 60 | + -DUMF_FORMAT_CODE_STYLE=OFF |
| 61 | + -DUMF_DEVELOPER_MODE=ON |
| 62 | + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON |
| 63 | + -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON |
| 64 | + -DUMF_TESTS_FAIL_ON_SKIP=ON |
| 65 | +
|
| 66 | + - name: Build "tag" UMF |
| 67 | + working-directory: ${{github.workspace}}/tag_version |
| 68 | + run: | |
| 69 | + cmake --build ${{github.workspace}}/tag_version/build -j $(nproc) |
| 70 | + |
| 71 | + # For UMF < 0.11 set ptrace_scope |
| 72 | + - name: Set ptrace value for IPC test |
| 73 | + if: ${{ startsWith(inputs.tag, 'v0.10.') || startsWith(inputs.tag, 'v0.9.') }} |
| 74 | + run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" |
| 75 | + |
| 76 | + - name: Run "tag" UMF tests |
| 77 | + working-directory: ${{github.workspace}}/tag_version/build |
| 78 | + run: | |
| 79 | + LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/ ctest --output-on-failure |
| 80 | +
|
| 81 | + - name: Checkout latest UMF version |
| 82 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 83 | + with: |
| 84 | + fetch-depth: 0 |
| 85 | + path: ${{github.workspace}}/latest_version |
| 86 | + |
| 87 | + - name: Get latest UMF version |
| 88 | + working-directory: ${{github.workspace}}/latest_version |
| 89 | + run: | |
| 90 | + VERSION=$(git describe --tags --abbrev=0 | grep -oP '\d+\.\d+\.\d+') |
| 91 | + echo "checked version: $VERSION" |
| 92 | + |
| 93 | + - name: Configure latest UMF build |
| 94 | + working-directory: ${{github.workspace}}/latest_version |
| 95 | + run: > |
| 96 | + cmake |
| 97 | + -B ${{github.workspace}}/latest_version/build |
| 98 | + -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/latest_version/build/install" |
| 99 | + -DCMAKE_BUILD_TYPE=Debug |
| 100 | + -DUMF_BUILD_SHARED_LIBRARY=ON |
| 101 | + -DCMAKE_C_COMPILER=gcc |
| 102 | + -DCMAKE_CXX_COMPILER=g++ |
| 103 | + -DUMF_BUILD_TESTS=ON |
| 104 | + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON |
| 105 | + -DUMF_BUILD_CUDA_PROVIDER=ON |
| 106 | + -DUMF_FORMAT_CODE_STYLE=OFF |
| 107 | + -DUMF_DEVELOPER_MODE=ON |
| 108 | + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON |
| 109 | + -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON |
| 110 | + -DUMF_TESTS_FAIL_ON_SKIP=ON |
| 111 | +
|
| 112 | + - name: Build latest UMF |
| 113 | + working-directory: ${{github.workspace}}/latest_version |
| 114 | + run: | |
| 115 | + cmake --build ${{github.workspace}}/latest_version/build -j $(nproc) |
| 116 | +
|
| 117 | + # NOTE: exclude umf-provider_coarse, umf-disjointCoarseMallocPool, |
| 118 | + # umf-jemalloc_coarse_file, umf-scalable_coarse_file as they use Coarse |
| 119 | + # Provider which is not supported for UMF > 0.10.0 |
| 120 | + - name: Run "tag" UMF tests with latest UMF libs (warnings enabled) |
| 121 | + working-directory: ${{github.workspace}}/tag_version/build |
| 122 | + run: > |
| 123 | + UMF_LOG="level:warning;flush:debug;output:stderr;pid:no" |
| 124 | + LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/ |
| 125 | + ctest --output-on-failure -E "umf-provider_coarse|umf-disjointCoarseMallocPool|umf-jemalloc_coarse_file|umf-scalable_coarse_file" |
0 commit comments