Add check for max glibc version (#1458)
* Add check for max glibc version * checkout first * tolerate subversions * exit better * rename ci gen script
This commit is contained in:
parent
1e06b07d0f
commit
34136173d5
3 changed files with 19 additions and 2 deletions
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
- run:
|
||||
name: Generate config
|
||||
command: |
|
||||
/tmp/bbb .circleci/script/short_ci.clj > generated_config.yml
|
||||
/tmp/bbb .circleci/script/gen_ci.clj > generated_config.yml
|
||||
- continuation/continue:
|
||||
configuration_path: generated_config.yml
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
(ns short-ci
|
||||
(ns gen-ci
|
||||
(:require
|
||||
[babashka.tasks :as tasks]
|
||||
[clj-yaml.core :as yaml]
|
||||
|
|
@ -154,6 +154,8 @@ java -jar \"$jar\" --config .build/bb.edn --deps-root . release-artifact \"$refl
|
|||
:steps (gen-steps shorted?
|
||||
(filter some?
|
||||
[:checkout
|
||||
(when (contains? #{"linux" "linux-aarch64"} platform)
|
||||
(run "Check max glibc version" "script/check_glibc.sh"))
|
||||
{:attach_workspace {:at "/tmp"}}
|
||||
(run "Pull Submodules" "git submodule init\ngit submodule update")
|
||||
{:restore_cache
|
||||
15
script/check_glibc.sh
Executable file
15
script/check_glibc.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function ver_lte() {
|
||||
printf '%s\n%s' "$1" "$2" | sort -C -V
|
||||
}
|
||||
|
||||
max_glibc_version="2.31"
|
||||
current_glibc_version=$(ldd --version | head -1 | awk '{print $4}' | cut -d "-" -f 1)
|
||||
|
||||
function bail() {
|
||||
echo "glibc greater than max version ${max_glibc_version}: ${current_glibc_version}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
ver_lte "${current_glibc_version}" "${max_glibc_version}" || bail
|
||||
Loading…
Reference in a new issue