From 25841328a7493a87487f1c6364bed692d3943a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondrej=20Kur=C3=A1k?= Date: Tue, 10 Dec 2024 15:53:55 +0100 Subject: [PATCH] Fix paths --- tests/conf1.conf | 2 +- tests/conf2.conf | 2 +- workflow.yml | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/conf1.conf b/tests/conf1.conf index a40458d..376fe8d 100644 --- a/tests/conf1.conf +++ b/tests/conf1.conf @@ -4,6 +4,6 @@ ], "process": "emv", "solc": "solc0.7.6", - "verify": "tests/InvertibleBroken:Invertible.spec", + "verify": "InvertibleBroken:tests/Invertible.spec", "wait_for_results": "all" } diff --git a/tests/conf2.conf b/tests/conf2.conf index 1aa6da3..fd86974 100644 --- a/tests/conf2.conf +++ b/tests/conf2.conf @@ -4,5 +4,5 @@ ], "process": "emv", "solc": "solc0.8.1", - "verify": "tests/InvertibleBroken:Invertible.spec" + "verify": "InvertibleBroken:tests/Invertible.spec" } diff --git a/workflow.yml b/workflow.yml index 2e04b49..c2b0997 100644 --- a/workflow.yml +++ b/workflow.yml @@ -124,6 +124,9 @@ jobs: path: /opt/solc-bin key: solc-bin + - name: Add Solidity to Github Path + run: echo "/opt/solc-bin/" >> $GITHUB_PATH + - name: Download Solidity Binaries run: | mkdir -p /opt/solc-bin @@ -134,27 +137,32 @@ jobs: for version in $VERSIONS; do version="${version#v}" - if [ ! -f "/opt/solc-bin/solc$version" ]; then + BIN_PATH="/opt/solc-bin/solc$version" + + if [ ! -f "$BIN_PATH" ]; then echo "Downloading Solidity $version" RELEASE_DETAIL=$(curl -sH "$AUTH_HEADER" "${GH_LINK}${version}") + if [[ -z "$RELEASE_DETAIL" || $(jq 'has("assets")' <<< "$RELEASE_DETAIL") == "false" ]]; then echo "Failed to fetch release details for Solidity $version" echo "$RELEASE_DETAIL" exit 1 fi BIN_LINK=$(jq -r "$JQ_FILTER" <<< "$RELEASE_DETAIL") + curl -L \ -H "Accept: application/octet-stream" \ -H "$AUTH_HEADER" \ - "${BIN_LINK}" -o "/opt/solc-bin/solc$version" + "${BIN_LINK}" -o "$BIN_PATH" + + # Verify the binary + chmod +x "$BIN_PATH" + "solc$version" --version fi done ls -1 /opt/solc-bin/ - - name: Add Solidity to Github Path - run: echo "/opt/solc-bin" >> $GITHUB_PATH - - name: Sanitize confugurations run: | CONFIGURATIONS="${{ inputs.configurations }}"