Skip to content

Commit

Permalink
update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomijaga committed Dec 11, 2024
1 parent ec4743a commit 9d8cb3c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@ jobs:

- name: Install dfx cache
run: dfx cache install

- name: Install mops & mocv
run: |
npm --yes -g i ic-mops
mops i
mops toolchain init
mops toolchain use moc 0.10.4
mops toolchain use moc latest
# set moc path for dfx to use
echo "DFX_MOC_PATH=$(mops toolchain bin moc)" >> $GITHUB_ENV
- name: Benchmarks
id: benchmarks
run: |
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
sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' intermediate_results.txt > processed_results.txt
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Makefile CI

on:
on:
push:
branches:
- main
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
uses: dfinity/setup-dfx@main
- name: Confirm successful installation
run: dfx --version

- name: Install dfx cache
run: dfx cache install

Expand All @@ -48,13 +48,13 @@ jobs:
npm --yes -g i ic-mops
mops i
mops toolchain init
mops toolchain use moc 0.10.4
mops toolchain use moc latest
# set moc path for dfx to use
echo "DFX_MOC_PATH=$(mops toolchain bin moc)" >> $GITHUB_ENV
- name: Detect warnings
run: make check

- name: Run Tests
run: make test
run: make test
2 changes: 1 addition & 1 deletion dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"networks": {
"local": {
"bind": "127.0.0.1:8000",
"bind": "127.0.0.1:4943",
"type": "ephemeral"
}
}
Expand Down
11 changes: 6 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
.PHONY: test bench docs check

MocPath = $(shell mops toolchain bin moc)

test:
mops test

check:
find src -type f -name '*.mo' -print0 | \
xargs -0 $(shell mops toolchain bin moc) -r $(shell mops sources) -Werror -wasi-system-api
find src -type f -name '*.mo' -print0 | xargs -0 $(MocPath) -r $(shell mops sources) -Werror -wasi-system-api

docs:
$(MocvPath)/mo-doc
$(MocvPath)/mo-doc --format plain
$(shell dfx cache show)/mo-doc
$(shell dfx cache show)/mo-doc --format plain

bench:
mops bench --gc incremental%
mops bench

0 comments on commit 9d8cb3c

Please sign in to comment.