Skip to content

Commit

Permalink
ci: check-dependencies: compare bitwuzla version
Browse files Browse the repository at this point in the history
  • Loading branch information
elopez committed Jul 28, 2024
1 parent 2d531a7 commit 92ea611
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ jobs:
run: |
NIXPKGS_REV="$(jq -r '.nodes.nixpkgs_2.locked.rev' < flake.lock)"
VERSIONS="$(nix eval -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/$NIXPKGS_REV.tar.gz" --impure --json \
--expr 'let pkgs = (import <nixpkgs> {}); in { "secp256k1" = pkgs.secp256k1.version; "ff" = pkgs.libff.version; }')"
--expr 'let pkgs = (import <nixpkgs> {}); in { "secp256k1" = pkgs.secp256k1.version; "ff" = pkgs.libff.version; "bitwuzla" = pkgs.bitwuzla.version; }')"
LIBFF_REV="$(jq .ff -r <<<"$VERSIONS")"
LIBSECP256K1_REV="$(jq .secp256k1 -r <<<"$VERSIONS")"
{ echo "nixpkgs=$NIXPKGS_REV"; echo "libff=$LIBFF_REV"; echo "libsecp256k1=$LIBSECP256K1_REV"; } >> "$GITHUB_OUTPUT"
BITWUZLA_REV="$(jq .bitwuzla -r <<<"$VERSIONS")"
{ echo "nixpkgs=$NIXPKGS_REV"; echo "libff=$LIBFF_REV"; echo "libsecp256k1=$LIBSECP256K1_REV"; echo "bitwuzla=$BITWUZLA_REV"; } >> "$GITHUB_OUTPUT"
- name: lookup local versions
id: local
run: |
LIBFF_REV="$(grep '^INSTALL_VERSION=' .github/scripts/install-libff.sh | cut -f2 -d=)"
LIBSECP256K1_REV="$(grep '^INSTALL_VERSION=' .github/scripts/install-libsecp256k1.sh | cut -f2 -d=)"
{ echo "libff=$LIBFF_REV"; echo "libsecp256k1=$LIBSECP256K1_REV"; } >> "$GITHUB_OUTPUT"
BITWUZLA_REV="$(grep 'BITWUZLA_VERSION:' .github/workflows/bitwuzla-windows.yml | cut -f2 -d: | sed 's/\s//')"
{ echo "libff=$LIBFF_REV"; echo "libsecp256k1=$LIBSECP256K1_REV"; echo "bitwuzla=$BITWUZLA_REV"; } >> "$GITHUB_OUTPUT"
- name: compare versions
run: |
if [ "${{ steps.nixpkgs.outputs.libff }}" != "${{ steps.local.outputs.libff }}" ]; then
Expand All @@ -40,3 +42,7 @@ jobs:
echo "libsecp256k1 versions do not match! nix=${{ steps.nixpkgs.outputs.libsecp256k1 }} local=${{ steps.local.outputs.libsecp256k1 }}"
exit 1
fi
if [ "${{ steps.nixpkgs.outputs.bitwuzla }}" != "${{ steps.local.outputs.bitwuzla }}" ]; then
echo "bitwuzla versions do not match! nix=${{ steps.nixpkgs.outputs.bitwuzla }} local=${{ steps.local.outputs.bitwuzla }}"
exit 1
fi

0 comments on commit 92ea611

Please sign in to comment.