Skip to content

Commit

Permalink
Merge branch 'develop' into _update-deps/runtimeverification/llvm-bac…
Browse files Browse the repository at this point in the history
…kend
  • Loading branch information
rv-jenkins authored Nov 7, 2023
2 parents 125a6cf + 37f2a27 commit d945fb2
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ jobs:
-e GITHUB_TOKEN=$GITHUB_TOKEN \
-e GITHUB_ACTIONS=true \
-e GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME \
-e GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH \
-e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \
-e GITHUB_REF=$GITHUB_REF \
-e GITHUB_SHA=${GITHUB_SHA} \
--workdir /opt/workspace \
-v "${workspace}:/opt/workspace" \
-v "${GITHUB_EVENT_PATH}:${GITHUB_EVENT_PATH}" \
${BASE_OS}:${BASE_DISTRO}
- name: 'Setting up dependencies'
run: |
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Mac Dependencies
run: |
# Via: https://github.com/ledger/ledger/commit/1eec9f86667cad3b0bbafb82a83739a0d30ca09f
# Unlink and re-link to prevent errors when github mac runner images
# install python outside of brew, for example:
# https://github.com/orgs/Homebrew/discussions/3895
# https://github.com/actions/setup-python/issues/577
# https://github.com/actions/runner-images/issues/6459
# https://github.com/actions/runner-images/issues/6507
# https://github.com/actions/runner-images/issues/2322
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
- name: Build brew bottle
id: build
env:
Expand Down Expand Up @@ -255,6 +267,18 @@ jobs:
name: homebrew
path: homebrew-k-old

- name: Mac Dependencies
run: |
# Via: https://github.com/ledger/ledger/commit/1eec9f86667cad3b0bbafb82a83739a0d30ca09f
# Unlink and re-link to prevent errors when github mac runner images
# install python outside of brew, for example:
# https://github.com/orgs/Homebrew/discussions/3895
# https://github.com/actions/setup-python/issues/577
# https://github.com/actions/runner-images/issues/6459
# https://github.com/actions/runner-images/issues/6507
# https://github.com/actions/runner-images/issues/2322
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
- name: 'Test brew bottle'
id: test
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,12 @@ jobs:
-e GITHUB_TOKEN=$GITHUB_TOKEN \
-e GITHUB_ACTIONS=true \
-e GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME \
-e GITHUB_EVENT_PATH=$GITHUB_EVENT_PATH \
-e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \
-e GITHUB_REF=$GITHUB_REF \
--workdir /opt/workspace \
-v "${workspace}:/opt/workspace" \
-v "${GITHUB_EVENT_PATH}:${GITHUB_EVENT_PATH}" \
${BASE_OS}:${BASE_DISTRO}
- name: 'Install K from Package'
run: |
Expand Down
7 changes: 4 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
nixpkgs.follows = "haskell-backend/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
mavenix = {
url = "github:goodlyrottenapple/mavenix";
url = "github:goodlyrottenapple/mavenix/0cbd57b2494d52909b27f57d03580acc66bf0298";
inputs.nixpkgs.follows = "haskell-backend/nixpkgs";
inputs.utils.follows = "flake-utils";
};
Expand Down
20 changes: 10 additions & 10 deletions k-distribution/tests/profiling/post_results_to_develop.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import sys
import subprocess
from slugify import slugify

COMMIT_SHA = sys.argv[1]
FROM_BRANCH=''
Expand Down Expand Up @@ -38,18 +39,17 @@ def execute_command(command):

print("Exporting last bencher report from", FROM_BRANCH, "to", TO_BRANCH)

# Remove any special characters from the branch name to get the slug
FROM_BRANCH = slugify(FROM_BRANCH)

# This command will generate a JSON file with a list containing the last reports
# sorted in descendenting order for the project.
bencher_command = ["bencher", "report", "list", "--project", "k-framework",
"--sort", "date_time", "--direction", "desc", "--per-page",
"255"]
data = json.loads(execute_command(bencher_command))

# Collect all elemnts where the key 'project' is 'k_framework'
k_framework = [item for item in data if item['project']['slug'] == 'k-framework'
and item['branch']['slug'] == FROM_BRANCH]
bencher_command = ["bencher", "report", "list", "--project", "k-framework",
"--branch", FROM_BRANCH, "--sort", "date_time",
"--direction", "desc"]
reports = json.loads(execute_command(bencher_command))

print("Found", len(k_framework), "reports for k-framework in", FROM_BRANCH)
print("Found", len(reports), "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
Expand All @@ -58,7 +58,7 @@ def get_name_and_value(item):

data = {}
for i in range(0,6):
item = k_framework[i]
item = reports[i]
results = item['results']
benchmark_name = results[0][0]['benchmarks'][0]['name']
metric_name_memory, value_memory = get_name_and_value(results[0][0])
Expand Down
5 changes: 3 additions & 2 deletions k-distribution/tests/profiling/setup_profiling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
set -euxo pipefail

export DEBIAN_FRONTEND=noninteractive
export BENCHER_VERSION="0.3.10"
export BENCHER_VERSION="0.3.15"
apt-get update
apt-get upgrade --yes
apt-get install --yes python3 git curl make time sudo wget
apt-get install --yes python3 python3-pip git curl make time sudo wget
# Build K if no flag was given and don't execute if flag was given
if [ $# -eq 0 ]; then
apt-get install --yes ./kframework.deb
fi
python3 -m pip install python-slugify

wget https://github.com/bencherdev/bencher/releases/download/v"${BENCHER_VERSION}"/bencher_"${BENCHER_VERSION}"_amd64.deb
sudo dpkg -i bencher_"${BENCHER_VERSION}"_amd64.deb

0 comments on commit d945fb2

Please sign in to comment.