rpm-ostree/ci/install-extra-builddeps.sh
Colin Walters 08c414f897 Rework bindgen/cxx.rs usage and CI build
cxx.rs (aka cxxbridge) and cbindgen are
both generating source code.  Since the last release
we've introduced the former, and we need to ensure
that the generated cxx.rs source ends up in release tarballs
the same way as the cbindgen code.

Rationalize and clean up the binding infrastructure.
Drop support for the vendored cbindgen which we
weren't actually using:
Closes: https://github.com/coreos/rpm-ostree/issues/2392

Move the cxx-rs and cbindgen bits into the same place,
and update our CoreOS CI build to use a separate `Makefile.bindings`
that just generates the code, so our CI still "works like"
a main Koji RPM build.
2021-01-04 13:17:35 +01:00

15 lines
660 B
Bash
Executable File

#!/usr/bin/bash
# cxx.rs (cxxbridge) isn't packaged in Fedora today. Both it and cbindgen generate
# source code, which we vendor along with our dependent crates into release
# tarballs. Note in the future it's likely we stop using cbindgen entirely in
# favor of cxx.rs.
set -xeuo pipefail
if ! command -v cxxbridge; then
ver=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name == "cxx").version')
cargo install cxxbridge-cmd --version "${ver}"
fi
if ! command -v cbindgen; then
ver=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name == "cbindgen").version')
cargo install cbindgen --version "${ver}"
fi