Skip to content

Commit

Permalink
Add check for binary compatibility by building a small sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcamiel committed Nov 27, 2022
1 parent ed3217c commit 18bad93
Show file tree
Hide file tree
Showing 6 changed files with 1,532 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
options: --volume ${{ github.workspace }}:/work:rw --workdir /work --privileged --env CARGO_TERM_COLOR=always
run: gitleaks detect --verbose --config .github/workflows/config/gitleaks.toml

- name: Install Prerequisites
- name: Install prerequisites
run: bin/check/install_prerequisites.sh

- name: Rustfmt
Expand All @@ -58,6 +58,9 @@ jobs:
- name: Check crates licence
run: python3 bin/check/license.py

- name: Check hurl crate API changes
run: bin/check/compatibility.sh

- name: Check CHANGELOG
run: bin/check/changelog.sh

16 changes: 16 additions & 0 deletions bin/check/compatibility.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -eu

# Extract snapshots versions
hurl_snapshot_version=$(grep --regexp '^version = ' packages/hurl/Cargo.toml | cut --delimiter '"' --field 2)
hurl_cure_snapshot_version=$(grep --regexp '^version = ' packages/hurl_core/Cargo.toml | cut --delimiter '"' --field 2)

# Replace versions for our sample
sed -i '' "s/hurl = \"[0-9.]*\"/hurl = { version = \"$hurl_snapshot_version\", path = \"..\/..\/packages\/hurl\" }/" contrib/sample/Cargo.toml
sed -i '' "s/hurl_core = \"[0-9.]*\"/hurl_core = { version = \"$hurl_cure_snapshot_version\", path = \"..\/..\/packages\/hurl_core\" }/" contrib/sample/Cargo.toml

cd contrib/sample || exit
cargo clean
cargo update
cargo build
cargo run -- hello.hurl
Loading

0 comments on commit 18bad93

Please sign in to comment.