Skip to content

Commit 1c2fa36

Browse files
committed
Substitute Ruby for Python oneliner for version finding
1 parent 30c55d1 commit 1c2fa36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/pull-request-check-rust-api.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
# by the other jobs already present in `pull-request-checks.yaml`.
6262
- name: Run Rust API tests
6363
run: |
64-
VERSION=$(ruby -ne 'puts $~.captures if /^CBMC_VERSION\ =\ (\d+.\d+.\d+)$/' src/config.inc)
64+
VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))")
6565
cd src/libcprover-rust;\
6666
cargo clean;\
6767
CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1
@@ -101,7 +101,7 @@ jobs:
101101
# by the other jobs already present in `pull-request-checks.yaml`.
102102
- name: Run Rust API tests
103103
run: |
104-
VERSION=$(ruby -ne 'puts $~.captures if /^CBMC_VERSION\ =\ (\d+.\d+.\d+)$/' src/config.inc)
104+
VERSION=$(cat src/config.inc | python3 -c "import sys,re;line = [line for line in sys.stdin if re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line)];sys.stdout.write(re.search('CBMC_VERSION = (\d+\.\d+\.\d+)', line[0]).group(1))")
105105
cd src/libcprover-rust;\
106106
cargo clean;\
107107
CBMC_LIB_DIR=../../${{env.default_build_dir}}/lib CBMC_VERSION=$VERSION cargo test -- --test-threads=1

0 commit comments

Comments
 (0)