From 0b4cbaa79f2909222efe43021b4d30558c5d8458 Mon Sep 17 00:00:00 2001 From: Rafal Rudnicki Date: Tue, 7 Jan 2025 13:42:28 +0100 Subject: [PATCH] use the UMF version from git describe in tests, not the harcoded one --- .github/workflows/reusable_basic.yml | 18 ++++++++++++++++-- RELEASE_STEPS.md | 1 - 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_basic.yml b/.github/workflows/reusable_basic.yml index ae67aae657..5866f939e7 100644 --- a/.github/workflows/reusable_basic.yml +++ b/.github/workflows/reusable_basic.yml @@ -7,8 +7,6 @@ permissions: contents: read env: - # for installation testing - it should match with version set in git - UMF_VERSION: 0.11.0 BUILD_DIR : "${{github.workspace}}/build" INSTL_DIR : "${{github.workspace}}/../install-dir" COVERAGE_DIR : "${{github.workspace}}/coverage" @@ -150,6 +148,11 @@ jobs: - name: Set ptrace value for IPC test run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" + - name: Get UMF version + run: | + VERSION=$(git describe --tags --abbrev=0 | grep -oP '\d+\.\d+\.\d+') + echo "UMF_VERSION=$VERSION" >> $GITHUB_ENV + - name: Configure build run: > ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh &&' || ''}} @@ -266,6 +269,12 @@ jobs: run: vcpkg install shell: pwsh # Specifies PowerShell as the shell for running the script. + - name: Get UMF version + run: | + $version = (git describe --tags --abbrev=0 | Select-String -Pattern '\d+\.\d+\.\d+').Matches.Value + echo "UMF_VERSION=$version" >> $env:GITHUB_ENV + shell: pwsh + - name: Configure build run: > cmake @@ -469,6 +478,11 @@ jobs: - name: Install hwloc run: brew install hwloc tbb automake + - name: Get UMF version + run: | + VERSION=$(git describe --tags --abbrev=0 | grep -Eo '\d+\.\d+\.\d+') + echo "UMF_VERSION=$VERSION" >> $GITHUB_ENV + - name: Configure build run: > cmake diff --git a/RELEASE_STEPS.md b/RELEASE_STEPS.md index efdadbe9fd..2609e36bb0 100644 --- a/RELEASE_STEPS.md +++ b/RELEASE_STEPS.md @@ -42,7 +42,6 @@ Do changes for a release: - Update project's version in a few places: - For major and minor releases: `UMF_VERSION_CURRENT` in `include/umf/base.h` (the API version) - `release` variable in `docs/config/conf.py` (for docs) - - `UMF_VERSION` variable in `.github/workflows/reusable_basic.yml` (for installation test) - For major releases update ABI version in `.map` and `.def` files - These files are defined for all public libraries (`libumf` and `proxy_lib`, at the moment) - Commit these changes and tag the release: