Consolidate required CI gate (#115)
All checks were successful
CI / required (push) Successful in 3m55s
All checks were successful
CI / required (push) Successful in 3m55s
This commit is contained in:
@@ -13,6 +13,8 @@ fi
|
||||
install_prefix=$1
|
||||
pkg_config_path="$install_prefix/lib/pkgconfig"
|
||||
library_path="$install_prefix/lib"
|
||||
identity_path="$install_prefix/metacrate-openjpeg.identity"
|
||||
target_arch=$(uname -m)
|
||||
|
||||
persist_actions_environment() {
|
||||
if [ -z "${GITHUB_ENV:-}" ]; then
|
||||
@@ -33,6 +35,10 @@ persist_actions_environment() {
|
||||
}
|
||||
|
||||
if [ -f "$pkg_config_path/libopenjp2.pc" ] &&
|
||||
[ -f "$identity_path" ] &&
|
||||
[ "$(sed -n '1p' "$identity_path")" = "version=$OPENJPEG_VERSION" ] &&
|
||||
[ "$(sed -n '2p' "$identity_path")" = "commit=$OPENJPEG_COMMIT" ] &&
|
||||
[ "$(sed -n '3p' "$identity_path")" = "architecture=$target_arch" ] &&
|
||||
PKG_CONFIG_PATH="$pkg_config_path" pkg-config --exact-version "$OPENJPEG_VERSION" libopenjp2
|
||||
then
|
||||
persist_actions_environment
|
||||
@@ -64,5 +70,11 @@ cmake -S "$source_dir" -B "$build_dir" \
|
||||
cmake --build "$build_dir" --parallel
|
||||
cmake --install "$build_dir"
|
||||
|
||||
{
|
||||
printf 'version=%s\n' "$OPENJPEG_VERSION"
|
||||
printf 'commit=%s\n' "$OPENJPEG_COMMIT"
|
||||
printf 'architecture=%s\n' "$target_arch"
|
||||
} >"$identity_path"
|
||||
|
||||
PKG_CONFIG_PATH="$pkg_config_path" pkg-config --exact-version "$OPENJPEG_VERSION" libopenjp2
|
||||
persist_actions_environment
|
||||
|
||||
Reference in New Issue
Block a user