Skip to content

Commit

Permalink
add mops package details
Browse files Browse the repository at this point in the history
  • Loading branch information
tomijaga committed Jun 18, 2024
1 parent 03add37 commit 9f80404
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 31 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Comment Benchmarks

on:
push:
branches:
- main
pull_request:
branches:
- "*"
Expand Down Expand Up @@ -35,34 +32,29 @@ jobs:
path: |
~/.cache/mops
~/mops
- uses: aviate-labs/setup-dfx@v0.2.3
with:
dfx-version: 0.15.1
- name: Install dfx
uses: dfinity/setup-dfx@main
- name: Confirm successful installation
run: dfx --version

- name: Install dfx cache
run: dfx cache install

- name: Install mops & mocv
run: |
npm -g i mocv
npm --yes -g i ic-mops
mops i
mops toolchain init
mops toolchain use moc 0.10.4
- name: Install wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- name: Set DFX MOC Path
run: |
make set-moc-version
echo "DFX_MOC_PATH=$(mocv bin)/moc" >> $GITHUB_ENV
# set moc path for dfx to use
echo "DFX_MOC_PATH=$(mops toolchain bin moc)" >> $GITHUB_ENV
- name: Benchmarks
id: benchmarks
run: |
mops bench 2>&1 | tee benchmark_results.txt
mops bench --gc incremental 2>&1 | tee benchmark_results.txt
# Process the output to remove everything up to the last occurrence of \033[2K
awk '/\x1b\[2K/ { buffer = "" } { buffer = buffer $0 "\n" } END { print buffer }' benchmark_results.txt > intermediate_results.txt
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,24 @@ jobs:
~/.cache/mops
~/mops
- uses: aviate-labs/setup-dfx@v0.2.3
with:
dfx-version: 0.15.0
- name: Install dfx
uses: dfinity/setup-dfx@main
- name: Confirm successful installation
run: dfx --version

- name: Install dfx cache
run: dfx cache install

- name: Install mops & mocv
run: |
npm -g i mocv
npm --yes -g i ic-mops
mops i
- name: install wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
npm --yes -g i ic-mops
mops i
mops toolchain init
mops toolchain use moc 0.10.4
# set moc path for dfx to use
echo "DFX_MOC_PATH=$(mops toolchain bin moc)" >> $GITHUB_ENV
- name: Detect warnings
run: make check

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Tomi Jaga
Copyright (c) 2024 Tomi Jaga

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 8 additions & 0 deletions mops.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[package]
name = "ic-assets"
description = "A library implementation of the IC Assets Canister with v2 certification"
version = "0.0.1"
repository = "https://github.com/NatLabs/ic-assets"
license = "MIT"
keywords = ["certified", "http", "request", "streaming"]

[dependencies]
base = "0.11.1"
http-types = "1.0.1"
Expand Down

0 comments on commit 9f80404

Please sign in to comment.