diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 117e4c975d5..818ce174543 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -54,8 +54,7 @@ jobs: BENCHER_ADAPTER: json run: | set -euxo pipefail - workspace=$(pwd) - docker run --name k-posting-profiling-tests-${GITHUB_SHA} \ + docker run --name k-posting-profiling-tests-${GITHUB_SHA} \ --rm -it --detach \ -e BENCHER_API_TOKEN=$BENCHER_API_TOKEN \ -e BENCHER_PROJECT=$BENCHER_PROJECT \ @@ -67,6 +66,7 @@ jobs: -e GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME \ -e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \ -e GITHUB_REF=$GITHUB_REF \ + -e GITHUB_SHA=${GITHUB_SHA} \ --workdir /opt/workspace \ -v "${workspace}:/opt/workspace" \ ${BASE_OS}:${BASE_DISTRO} @@ -77,14 +77,14 @@ jobs: - name: 'Getting Performance Tests Results' run: | set -euxo pipefail - docker exec -t k-posting-profiling-tests-${GITHUB_SHA} /bin/bash -c './k-distribution/tests/profiling/post_results_to_develop.py' + docker exec -t k-posting-profiling-tests-${GITHUB_SHA} /bin/bash -c './k-distribution/tests/profiling/post_results_to_develop.py ${GITHUB_SHA}' - name: 'Posting Performance Tests Results' run: | set -euxo pipefail docker exec -t k-posting-profiling-tests-${GITHUB_SHA} /bin/bash -c 'bencher run \ --if-branch "develop" --else-if-branch "master" \ --file .profiling-results.json --err --ci-only-on-alert \ - --github-actions "${GITHUB_TOKEN}" 'echo "Exporting report"' + --github-actions "${GITHUB_TOKEN}" "echo Exporting report"' - name: 'Tear down Docker' if: always() run: | diff --git a/flake.lock b/flake.lock index 78f50307f22..0c43822d99a 100644 --- a/flake.lock +++ b/flake.lock @@ -784,11 +784,11 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1692976793, - "narHash": "sha256-ytl8wuFYYx9NAaIBLjil/UgZcK9fBgXDspDE1y+gNHM=", + "lastModified": 1695238986, + "narHash": "sha256-z/pK5vTyXUIvVk/UaqxJq3xOa08MBOyemeQSwg2+kfY=", "owner": "runtimeverification", "repo": "llvm-backend", - "rev": "f3e29231a9a8bc4373fbbc74866f96df454cbc7e", + "rev": "c603ac78f4c1e08ab90ca9083c1841399e236bf8", "type": "github" }, "original": { diff --git a/k-distribution/pl-tutorial/1_k/4_imp++/lesson_6/tests/spawn.imp.out b/k-distribution/pl-tutorial/1_k/4_imp++/lesson_6/tests/spawn.imp.out index 7552e7a23a0..eba23e61a03 100644 --- a/k-distribution/pl-tutorial/1_k/4_imp++/lesson_6/tests/spawn.imp.out +++ b/k-distribution/pl-tutorial/1_k/4_imp++/lesson_6/tests/spawn.imp.out @@ -1,13 +1,13 @@ { Out:String #Equals - "x = 21\n" + "x = 11\n" } #And { Store:Map #Equals - 0 |-> 21 + 0 |-> 11 } #Or { @@ -19,7 +19,7 @@ { Store:Map #Equals - 0 |-> 11 + 0 |-> 21 } #Or { @@ -31,31 +31,31 @@ { Store:Map #Equals - 0 |-> 21 + 0 |-> 33 } #Or { Out:String #Equals - "x = 11\n" + "x = 16\n" } #And { Store:Map #Equals - 0 |-> 33 + 0 |-> 16 } #Or { Out:String #Equals - "x = 16\n" + "x = 21\n" } #And { Store:Map #Equals - 0 |-> 16 + 0 |-> 21 } #Or { diff --git a/k-distribution/tests/profiling/post_results_to_develop.py b/k-distribution/tests/profiling/post_results_to_develop.py index 37104b56def..21716a86ba9 100755 --- a/k-distribution/tests/profiling/post_results_to_develop.py +++ b/k-distribution/tests/profiling/post_results_to_develop.py @@ -1,8 +1,9 @@ #!/usr/bin/env python3 import json +import sys import subprocess -COMMIT_SHA='' +COMMIT_SHA = sys.argv[1] FROM_BRANCH='' TO_BRANCH='develop' @@ -24,10 +25,6 @@ def execute_command(command): return result.stdout -# git command to get the last commit in develop -commit_command = [ 'git', 'log', '--format=\"%H\"', '-n', '1' ] -COMMIT_SHA = execute_command(commit_command).strip('\"').strip('\"\n') - # curl command to get the branch name of last commit in develop API_URL = 'https://api.github.com/repos/runtimeverification/k/commits/' \ + COMMIT_SHA + '/pulls' @@ -36,6 +33,9 @@ def execute_command(command): '\"X-GitHub-Api-Version:', '2022-11-28\"', API_URL] FROM_BRANCH = json.loads(execute_command(branch_command))[0]['head']['label'] +# If FROM_BRANCH contains user information get only the branch name +if ':' in FROM_BRANCH: FROM_BRANCH = FROM_BRANCH.split(':')[1] + print("Exporting last bencher report from", FROM_BRANCH, "to", TO_BRANCH) # This command will generate a JSON file with a list containing the last reports @@ -49,6 +49,8 @@ def execute_command(command): k_framework = [item for item in data if item['project']['slug'] == 'k-framework' and item['branch']['slug'] == FROM_BRANCH] +print("Found", len(k_framework), "reports for k-framework in", FROM_BRANCH) + # Append the last 6 reports to the list, they correspond to the last performance # execution on the last commit in FROM_BRANCH def get_name_and_value(item): @@ -64,7 +66,7 @@ def get_name_and_value(item): branch = item['branch'] print("Appended:", benchmark_name, "created in", item['created'], - "on branch", branch['name'], "with version", branch['version']['number']) + "on branch", branch['name'], "with id", branch['version']['number']) data.update({benchmark_name: {metric_name_size: {"value": value_size}, metric_name_memory: {"value": value_memory}} diff --git a/kernel/src/main/java/org/kframework/unparser/KPrint.java b/kernel/src/main/java/org/kframework/unparser/KPrint.java index 67a2893a465..ee9882e9f76 100644 --- a/kernel/src/main/java/org/kframework/unparser/KPrint.java +++ b/kernel/src/main/java/org/kframework/unparser/KPrint.java @@ -196,7 +196,7 @@ private Term disambiguateForUnparse(Module mod, Term t) { private String unparseInternal(Module mod, K input, ColorSetting colorize) { ExpandMacros expandMacros = ExpandMacros.forNonSentences(mod, files, kompileOptions, true); return Formatter.format( - new AddBrackets(mod).addBrackets((ProductionReference) disambiguateForUnparse(mod, KOREToTreeNodes.apply(KOREToTreeNodes.up(mod, expandMacros.expand(input)), mod))), options.color(tty.stdout, files.getEnv())); + new AddBrackets(mod).addBrackets((ProductionReference) disambiguateForUnparse(mod, KOREToTreeNodes.apply(KOREToTreeNodes.up(mod, expandMacros.expand(input)), mod))), colorize); } public K abstractTerm(Module mod, K term) { diff --git a/llvm-backend/src/main/native/llvm-backend b/llvm-backend/src/main/native/llvm-backend index f3e29231a9a..c603ac78f4c 160000 --- a/llvm-backend/src/main/native/llvm-backend +++ b/llvm-backend/src/main/native/llvm-backend @@ -1 +1 @@ -Subproject commit f3e29231a9a8bc4373fbbc74866f96df454cbc7e +Subproject commit c603ac78f4c1e08ab90ca9083c1841399e236bf8