Skip to content

Commit

Permalink
Bump v0.25.0-2
Browse files Browse the repository at this point in the history
Update uniffi-bindgen-cpp to v0.2.2+v0.25.0

Signed-off-by: Kristupas Antanavičius <[email protected]>
  • Loading branch information
arg0d committed Jan 18, 2024
1 parent cdb2a54 commit a47c91f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN cargo search --limit 0
RUN cd /project && cargo install --path uniffi-bindgen
RUN cargo install uniffi-bindgen-cs --tag v0.7.0+v0.25.0 --git https://github.com/NordSecurity/uniffi-bindgen-cs
RUN cargo install uniffi-bindgen-go --tag v0.2.0+v0.25.0 --git https://github.com/NordSecurity/uniffi-bindgen-go
RUN cargo install uniffi-bindgen-cpp --tag v0.1.0+v0.25.0 --git https://github.com/NordSecurity/uniffi-bindgen-cpp
RUN cargo install uniffi-bindgen-cpp --tag v0.2.2+v0.25.0 --git https://github.com/NordSecurity/uniffi-bindgen-cpp

FROM rust:1.72-bullseye
COPY --from=builder /usr/local/cargo/bin/uniffi-bindgen /bin
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ shows which versions of each generator are inside the docker image.

| Docker image | uniffi-rs version | uniffi-bindgen-cs version | uniffi-bindgen-go version | uniffi-bindgen-cpp version |
|------------------------|-----------------------|---------------------------|---------------------------|----------------------------|
| v0.25.0-2 | v0.3.0+0.25.0 | v0.7.0+v0.25.0 | v0.2.0+v0.25.0 | **v0.2.2+v0.25.0** |
| v0.25.0-1 | **v0.3.0+0.25.0** | **v0.7.0+v0.25.0** | **v0.2.0+v0.25.0** | **v0.1.0+v0.25.0** |
| v0.23.0-6 | v0.23.0-3 | v0.4.0+v0.23.0 | v0.1.5+v0.23.0 | not present |
| v0.23.0-5 | v0.23.0-3 | **v0.4.0+v0.23.0** | **v0.1.5+v0.23.0** | not present |
Expand Down
2 changes: 1 addition & 1 deletion compatibility-test/setup_bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ source "$SCRIPT_DIR/env.sh"
docker run --rm \
--volume $ROOT_DIR:/workspace \
--workdir /workspace/compatibility-test \
ghcr.io/nordsecurity/uniffi-generators:v0.25.0-1 \
generators:test \
/bin/bash /workspace/compatibility-test/setup_bindings_inner.sh
7 changes: 4 additions & 3 deletions compatibility-test/setup_test_source.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash
set -euo pipefail
set +x

SCRIPT_DIR="${SCRIPT_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )}"
source "$SCRIPT_DIR/env.sh"

# Disable logging commands to make the file download logs easy to read
set +x

# XD use docker to rm tmp directory as root. The tests run in Docker container, and create files
# in tmp directory as root.
docker run --rm \
Expand Down Expand Up @@ -44,8 +46,7 @@ download_file "$GITHUB_URL/binding_tests/coverall_test.go" "$TMP_DIR/go"
download_file "$GITHUB_URL/binding_tests/go.mod" "$TMP_DIR/go"
download_file "$GITHUB_URL/binding_tests/go.sum" "$TMP_DIR/go"

# TODO use tagged version
GITHUB_VERSION="f47dc471643f9d079f2cab03df68adf6b6d3d0b3"
GITHUB_VERSION="v0.2.2+v0.25.0"
GITHUB_URL="https://raw.githubusercontent.com/NordSecurity/uniffi-bindgen-cpp/$GITHUB_VERSION"
download_file "$GITHUB_URL/cpp-tests/tests/coverall/main.cpp" "$TMP_DIR/cpp/coverall"
download_file "$GITHUB_URL/cpp-tests/tests/include/test_common.hpp" "$TMP_DIR/cpp/include"
10 changes: 9 additions & 1 deletion compatibility-test/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,13 @@ function cpp_docker() {
$*
}

cpp_docker g++ -std=c++20 coverall/main.cpp -I. -Iinclude -o test_coverall
COMPILE_CMD=(
g++ -o test_coverall
-std=c++20
-I. -Iinclude
-L /workspace/target/debug -lcompatibility_test -lpthread
coverall/main.cpp coverall.cpp
)

cpp_docker ${COMPILE_CMD[@]}
cpp_docker ./test_coverall
7 changes: 3 additions & 4 deletions test_generators.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
set -euo pipefail

SCRIPT_DIR="${SCRIPT_DIR:-$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )}"

# Run compatibility tests for all generators
# You can either run this script with -bd flags
Expand Down Expand Up @@ -57,7 +58,7 @@ set -x
function build_docker() {
docker run --rm \
-v $HOME/.cargo/registry:/usr/local/cargo/registry \
-v $ROOT_DIR:/workspace \
-v $SCRIPT_DIR:/workspace \
-w /workspace \
rust:1.72-bullseye \
$*
Expand Down Expand Up @@ -98,9 +99,7 @@ if [[ -z "$GENERATOR" || "$GENERATOR" = "go" ]]; then
fi

if [[ -z "$GENERATOR" || "$GENERATOR" = "cpp" ]]; then
:
# TODO currently does not work without creating a new release
# ./compatibility-test/test_cpp.sh
./compatibility-test/test_cpp.sh
fi

echo Compatibility tests passed!

0 comments on commit a47c91f

Please sign in to comment.