Skip to content

Commit d7ff064

Browse files
committed
add backward-compatibility workflow
1 parent 16be5ad commit d7ff064

File tree

2 files changed

+219
-0
lines changed

2 files changed

+219
-0
lines changed

.github/workflows/pr_push.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,11 @@ jobs:
8585
contents: read
8686
security-events: write
8787
uses: ./.github/workflows/reusable_trivy.yml
88+
Compatibility:
89+
needs: [Build]
90+
uses: ./.github/workflows/reusable_compatibility.yml
91+
strategy:
92+
matrix:
93+
tag: ["v0.11.0-dev1"]
94+
with:
95+
tag: ${{matrix.tag}}
Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
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.11.0-dev1"
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
ubuntu-build:
19+
name: Ubuntu
20+
runs-on: 'ubuntu-22.04'
21+
22+
steps:
23+
- name: Install apt packages
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y clang cmake libnuma-dev libtbb-dev
27+
28+
- name: Checkout "tag" UMF version
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
30+
with:
31+
fetch-depth: 0
32+
ref: refs/tags/${{inputs.tag}}
33+
path: ${{github.workspace}}/tag_version
34+
35+
- name: Install libhwloc
36+
working-directory: ${{github.workspace}}/tag_version
37+
run: .github/scripts/install_hwloc.sh
38+
39+
- name: Get "tag" UMF version
40+
working-directory: ${{github.workspace}}/tag_version
41+
run: |
42+
VERSION=$(git describe --tags)
43+
echo "tag version: $VERSION"
44+
45+
- name: Configure "tag" UMF build
46+
working-directory: ${{github.workspace}}/tag_version
47+
run: >
48+
cmake
49+
-B ${{github.workspace}}/tag_version/build
50+
-DCMAKE_BUILD_TYPE=Debug
51+
-DUMF_BUILD_SHARED_LIBRARY=ON
52+
-DCMAKE_C_COMPILER=gcc
53+
-DCMAKE_CXX_COMPILER=g++
54+
-DUMF_BUILD_TESTS=ON
55+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
56+
-DUMF_BUILD_CUDA_PROVIDER=ON
57+
-DUMF_FORMAT_CODE_STYLE=OFF
58+
-DUMF_DEVELOPER_MODE=ON
59+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
60+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
61+
-DUMF_TESTS_FAIL_ON_SKIP=ON
62+
63+
- name: Build "tag" UMF
64+
working-directory: ${{github.workspace}}/tag_version
65+
run: |
66+
cmake --build ${{github.workspace}}/tag_version/build -j $(nproc)
67+
68+
- name: Run "tag" UMF tests
69+
working-directory: ${{github.workspace}}/tag_version/build
70+
run: |
71+
LD_LIBRARY_PATH=${{github.workspace}}/tag_version/build/lib/ ctest --output-on-failure
72+
73+
- name: Checkout latest UMF version
74+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
75+
with:
76+
fetch-depth: 0
77+
path: ${{github.workspace}}/latest_version
78+
79+
- name: Get latest UMF version
80+
working-directory: ${{github.workspace}}/latest_version
81+
run: |
82+
VERSION=$(git describe --tags)
83+
echo "checked version: $VERSION"
84+
85+
- name: Configure latest UMF build
86+
working-directory: ${{github.workspace}}/latest_version
87+
run: >
88+
cmake
89+
-B ${{github.workspace}}/latest_version/build
90+
-DCMAKE_BUILD_TYPE=Debug
91+
-DUMF_BUILD_SHARED_LIBRARY=ON
92+
-DCMAKE_C_COMPILER=gcc
93+
-DCMAKE_CXX_COMPILER=g++
94+
-DUMF_BUILD_TESTS=OFF
95+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
96+
-DUMF_BUILD_CUDA_PROVIDER=ON
97+
-DUMF_FORMAT_CODE_STYLE=OFF
98+
-DUMF_DEVELOPER_MODE=ON
99+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
100+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
101+
-DUMF_TESTS_FAIL_ON_SKIP=ON
102+
103+
- name: Build latest UMF
104+
working-directory: ${{github.workspace}}/latest_version
105+
run: |
106+
cmake --build ${{github.workspace}}/latest_version/build -j $(nproc)
107+
108+
- name: Run "tag" UMF tests with latest UMF libs (warnings enabled)
109+
working-directory: ${{github.workspace}}/tag_version/build
110+
run: >
111+
UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
112+
LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
113+
ctest --output-on-failure
114+
115+
windows-build:
116+
name: Windows
117+
env:
118+
VCPKG_PATH: "${{github.workspace}}/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/vcpkg/packages/jemalloc_x64-windows"
119+
runs-on: "windows-2022"
120+
121+
steps:
122+
- name: Checkout "tag" UMF version
123+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
124+
with:
125+
fetch-depth: 0
126+
ref: refs/tags/${{inputs.tag}}
127+
path: ${{github.workspace}}/tag_version
128+
129+
- name: Initialize vcpkg
130+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
131+
with:
132+
vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289
133+
vcpkgDirectory: ${{github.workspace}}/vcpkg
134+
vcpkgJsonGlob: '**/vcpkg.json'
135+
136+
- name: Install dependencies
137+
working-directory: ${{github.workspace}}/tag_version
138+
run: vcpkg install
139+
shell: pwsh # Specifies PowerShell as the shell for running the script.
140+
141+
- name: Get "tag" UMF version
142+
working-directory: ${{github.workspace}}/tag_version
143+
run: |
144+
$version = (git describe --tags)
145+
echo "tag version: $VERSION"
146+
147+
- name: Configure "tag" UMF build
148+
working-directory: ${{github.workspace}}/tag_version
149+
run: >
150+
cmake
151+
-B "${{github.workspace}}/tag_version/build"
152+
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
153+
-DCMAKE_C_COMPILER=cl
154+
-DCMAKE_CXX_COMPILER=cl
155+
-DUMF_BUILD_SHARED_LIBRARY=ON
156+
-DUMF_BUILD_TESTS=ON
157+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
158+
-DUMF_BUILD_CUDA_PROVIDER=ON
159+
-DUMF_FORMAT_CODE_STYLE=OFF
160+
-DUMF_DEVELOPER_MODE=ON
161+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
162+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
163+
-DUMF_TESTS_FAIL_ON_SKIP=ON
164+
165+
- name: Build "tag" UMF
166+
run: cmake --build "${{github.workspace}}/tag_version/build" --config Debug -j $Env:NUMBER_OF_PROCESSORS
167+
168+
- name: Run "tag" UMF tests
169+
working-directory: "${{github.workspace}}/tag_version/build"
170+
run: ctest -C Debug --output-on-failure --test-dir test
171+
172+
- name: Checkout latest UMF version
173+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
174+
with:
175+
fetch-depth: 0
176+
path: ${{github.workspace}}/latest_version
177+
178+
# NOTE we use vcpkg setup from "tag" version
179+
- name: Get latest UMF version
180+
working-directory: ${{github.workspace}}/latest_version
181+
run: |
182+
$version = (git describe --tags)
183+
echo "latest version: $VERSION"
184+
185+
- name: Configure latest UMF build
186+
working-directory: ${{github.workspace}}/latest_version
187+
run: >
188+
cmake
189+
-B "${{github.workspace}}/latest_version/build"
190+
-DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}"
191+
-DCMAKE_C_COMPILER=cl
192+
-DCMAKE_CXX_COMPILER=cl
193+
-DUMF_BUILD_SHARED_LIBRARY=ON
194+
-DUMF_BUILD_TESTS=OFF
195+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
196+
-DUMF_BUILD_CUDA_PROVIDER=ON
197+
-DUMF_FORMAT_CODE_STYLE=OFF
198+
-DUMF_DEVELOPER_MODE=ON
199+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
200+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
201+
-DUMF_TESTS_FAIL_ON_SKIP=ON
202+
203+
- name: Build latest UMF
204+
run: cmake --build "${{github.workspace}}/latest_version/build" --config Debug -j $Env:NUMBER_OF_PROCESSORS
205+
206+
- name: Run "tag" UMF tests with latest UMF libs (warnings enabled)
207+
working-directory: ${{github.workspace}}/tag_version/build
208+
run: |
209+
$env:UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
210+
cp ${{github.workspace}}/latest_version/build/bin/Debug/umf.dll ${{github.workspace}}/tag_version/build/bin/Debug/umf.dll
211+
ctest -C Debug --output-on-failure --test-dir test

0 commit comments

Comments
 (0)