Skip to content

Commit 8463983

Browse files
authored
Update Build and Test CI Workflow (#149)
* Remove support for Ubuntu 18.04 builds * Removing unavailable platforms from build and test workflow * Set workflow for Ubuntu 22.04 * Adjust GCC and CLANG versions for Ubuntu 22.04 * Adjusting build environment for HEXL experimental build on Ubuntu 20.04 The HEXL experimental build workflow is only available on Ubuntu 20.04. This is an experimental and unsupported build.
1 parent 2d196fd commit 8463983

File tree

1 file changed

+18
-104
lines changed

1 file changed

+18
-104
lines changed

.github/workflows/github-ci.yml

Lines changed: 18 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ env:
3030
-DHEXL_HINT_DIR=${GITHUB_WORKSPACE}/lib/cmake/hexl-${HEXL_VER}
3131
COVERAGE_COMPILER_FLAGS: >
3232
-DCMAKE_BUILD_TYPE=Debug
33-
-DCMAKE_CXX_COMPILER=g++-9
34-
-DCMAKE_C_COMPILER=gcc-9
33+
-DCMAKE_CXX_COMPILER=g++-11
34+
-DCMAKE_C_COMPILER=gcc-11
3535
-DHEXL_BENCHMARK=ON
3636
-DHEXL_TESTING=ON
3737
-DHEXL_COVERAGE=ON
@@ -42,7 +42,7 @@ env:
4242
jobs:
4343
format:
4444
name: Format
45-
runs-on: ubuntu-20.04
45+
runs-on: ubuntu-22.04
4646
steps:
4747
- uses: actions/checkout@v2
4848
# Required for pre-commit
@@ -60,8 +60,11 @@ jobs:
6060
shell: bash
6161
strategy:
6262
matrix:
63+
# removed platforms not available on github hosted servers.
64+
# sel-fhosted ice-lake servers not enabled by sysadmin
6365
# os: [ice-lake, [self-hosted, ubuntu-18.04], macos-latest, ubuntu-20.04]
64-
os: [ice-lake, macos-latest, ubuntu-20.04]
66+
# os: [macos-latest, ubuntu-20.04]
67+
os: [macos-latest, ubuntu-22.04]
6568
build_type: [Release, Debug]
6669
shared_lib: [ON, OFF]
6770
include:
@@ -83,8 +86,8 @@ jobs:
8386
run: |
8487
set -x
8588
if [ "$RUNNER_OS" == "Linux" ]; then
86-
export CC=clang-10
87-
export CXX=clang++-10
89+
export CC=clang-14
90+
export CXX=clang++-14
8891
fi
8992
9093
# Print information useful for debugging
@@ -177,101 +180,6 @@ jobs:
177180
178181
# TODO: add pkgconfig and vcpkg examples
179182
180-
181-
182-
ubuntu-1804-build:
183-
name: '${{ matrix.os }} ${{ matrix.build_type }} shared=${{ matrix.shared_lib }}'
184-
runs-on: '${{ matrix.os }}'
185-
defaults:
186-
run:
187-
shell: bash
188-
strategy:
189-
matrix:
190-
os: [ubuntu-18.04]
191-
build_type: [Release, Debug]
192-
shared_lib: [ON, OFF]
193-
include:
194-
# Run benchmarks quickly in Debug mode
195-
- build_type: Debug
196-
benchmark_min_time: "--benchmark_min_time=0.001"
197-
- build_type: Release
198-
benchmark_min_time: ""
199-
exclude: # Skip debug on Mac. TODO: add Debug mode
200-
- os: macos-latest
201-
build_type: Debug
202-
steps:
203-
- uses: actions/checkout@v2
204-
- name: Setup cmake
205-
uses: jwlawson/[email protected]
206-
with:
207-
cmake-version: '3.13.x'
208-
- name: Default build
209-
run: |
210-
set -x
211-
if [ "$RUNNER_OS" == "Linux" ]; then
212-
export CC=gcc
213-
export CXX=g++
214-
fi
215-
216-
# Print information useful for debugging
217-
gcc --version
218-
g++ --version
219-
whoami
220-
echo $HOME
221-
echo $GITHUB_WORKSPACE
222-
echo "Testing from branch:"
223-
echo $GITHUB_REFH
224-
cmake --version
225-
pwd
226-
227-
# Build library
228-
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
229-
-DHEXL_SHARED_LIB=${{ matrix.shared_lib }} \
230-
-DCMAKE_INSTALL_PREFIX=./
231-
cmake --build build -j
232-
cmake --build build --target install
233-
cmake --build build --target unittest
234-
# Instead of calling cmake --build build --target bench,
235-
# we run the executable directly to pass command-line arguments
236-
./build/benchmark/bench_hexl \
237-
--benchmark_out="${GITHUB_WORKFLOW}_${GITHUB_SHA}" \
238-
--benchmark_out_format=csv ${{ matrix.benchmark_min_time }}
239-
240-
# Build and run examples
241-
cd $GITHUB_WORKSPACE/example/cmake
242-
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
243-
${{ env.HEXL_HINT_DIR }}
244-
cmake --build build
245-
build/example
246-
247-
# Build example using pkgconfig
248-
cd $GITHUB_WORKSPACE/example/pkgconfig
249-
# Set PKG_CONFIG_PATH to locate hexl.pc
250-
export PKG_CONFIG_PATH=$GITHUB_WORKSPACE/lib/pkgconfig
251-
cmake -S . -B build
252-
cmake --build build
253-
build/example
254-
255-
# Build example using vcpkg
256-
# TODO: fix vcpkg example CI
257-
# vcpkg install hexl --overlay-ports=$GITHUB_WORKSPACE/port/hexl/ --head
258-
# cd $GITHUB_WORKSPACE/example/vcpkg
259-
# vcpkg_toolchain=$(locate vcpkg.cmake)
260-
# echo $vcpkg_toolchain
261-
# cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$vcpkg_toolchain
262-
# cmake --build build
263-
# build/example
264-
# set +x
265-
266-
- name: Archive benchmark results
267-
uses: actions/upload-artifact@v2
268-
with:
269-
name: bench_hexl_${{github.sha}}.csv
270-
path: ${{ github.workspace }}/${{ github.workflow }}_${{ github.sha }}
271-
retention-days: 90 # Maximum for free version
272-
273-
274-
275183
experimental-build:
276184
name: 'experimental: ${{ matrix.os }} ${{ matrix.build_type }} shared=${{ matrix.shared_lib }}'
277185
runs-on: '${{ matrix.os }}'
@@ -280,7 +188,13 @@ jobs:
280188
shell: bash
281189
strategy:
282190
matrix:
283-
os: [ice-lake]
191+
# This is an unsupported experimental build - use at your own risk
192+
#
193+
# Ice-lake platform not available on github
194+
# self-hosted platforms disabled by Intel github sys admin
195+
# building on default ubuntu-20.04 platform
196+
# os: [ice-lake]
197+
os: [ubuntu-20.04]
284198
build_type: [Release]
285199
shared_lib: [ON]
286200
steps:
@@ -289,8 +203,8 @@ jobs:
289203
run: |
290204
set -x
291205
if [ "$RUNNER_OS" == "Linux" ]; then
292-
export CC=clang-10
293-
export CXX=clang++-10
206+
export CC=clang-11
207+
export CXX=clang++-11
294208
fi
295209
296210
# Print information useful for debugging

0 commit comments

Comments
 (0)