From 17ed37cb153d573d2582c61854f49dddf0aa1442 Mon Sep 17 00:00:00 2001 From: darkdrag00n Date: Wed, 26 Apr 2023 00:38:17 +0530 Subject: [PATCH 1/6] Bump to moc 0.8.7 and fix CI --- .github/workflows/ci.yaml | 1 + Makefile | 6 +++--- package-set.dhall | 8 ++++++-- vessel.dhall | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f5dbc40..7059030 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,7 @@ jobs: wget https://github.com/dfinity/motoko/releases/download/${{ env.moc_version }}/motoko-linux64-${{ env.moc_version }}.tar.gz mkdir -p /home/runner/bin tar -xzf motoko-linux64-${{ env.moc_version }}.tar.gz -C /home/runner/bin + dfx cache show | xargs -n 1 -I{} cp -r /home/runner/bin/* {} echo "/home/runner/bin" >> $GITHUB_PATH - name: "install vessel" diff --git a/Makefile b/Makefile index e318f36..799e4b6 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ .PHONY: check docs test -install-dfx-cache: - dfx cache install +# install-dfx-cache: +# dfx cache install -check: install-dfx-cache +check: find src -type f -name '*.mo' -print0 | xargs -0 $(shell dfx cache show)/moc $(shell vessel sources) --check check-mops: install-dfx-cache diff --git a/package-set.dhall b/package-set.dhall index df8c71d..3c2ade6 100644 --- a/package-set.dhall +++ b/package-set.dhall @@ -1,5 +1,5 @@ let vessel_package_set = - https://github.com/dfinity/vessel-package-set/releases/download/mo-0.8.3-20230224/package-set.dhall + https://github.com/dfinity/vessel-package-set/releases/download/mo-0.8.7-20230406/package-set.dhall let Package = { name : Text, version : Text, repo : Text, dependencies : List Text } @@ -26,7 +26,11 @@ let , version = "v0.2.0" , dependencies = [ "base"] }, - { name = "base", repo = "https://github.com/dfinity/motoko-base.git", version = "moc-0.8.1", dependencies = []: List Text }, + { name = "base" + , repo = "https://github.com/dfinity/motoko-base.git" + , version = "a867420b4c147c0df64e999fb11f0978e82e1d2a" + , dependencies = []: List Text + }, { name = "map" , repo = "https://github.com/ZhenyaUsenko/motoko-hash-map" , version = "v7.0.0" diff --git a/vessel.dhall b/vessel.dhall index 9c2f3cd..66354e1 100644 --- a/vessel.dhall +++ b/vessel.dhall @@ -1,4 +1,4 @@ { - dependencies = [ "base", "matchers", "candid", "xtendedNumbers", "stablebuffer", "map","candy_0_1_12"], - compiler = Some "0.8.1", + dependencies = ["base", "matchers", "candid", "xtendedNumbers", "stablebuffer", "map", "candy_0_1_12"], + compiler = Some "0.8.7", } From 53a257e1a92fb9e6d6e40f075fd818e16c240df9 Mon Sep 17 00:00:00 2001 From: darkdrag00n Date: Wed, 26 Apr 2023 00:39:45 +0530 Subject: [PATCH 2/6] Revert unnecessary changes to Makefile --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 799e4b6..e318f36 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ .PHONY: check docs test -# install-dfx-cache: -# dfx cache install +install-dfx-cache: + dfx cache install -check: +check: install-dfx-cache find src -type f -name '*.mo' -print0 | xargs -0 $(shell dfx cache show)/moc $(shell vessel sources) --check check-mops: install-dfx-cache From 83492ad21c721f92f77b58414f87e08f5fa252a9 Mon Sep 17 00:00:00 2001 From: darkdrag00n Date: Wed, 26 Apr 2023 00:47:11 +0530 Subject: [PATCH 3/6] Bump up setup-dfx version --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7059030..18f56c4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 14 - - uses: aviate-labs/setup-dfx@v0.2.3 + - uses: aviate-labs/setup-dfx@v0.2.5 with: dfx-version: 0.13.1 From 9f42e2319c331e6139c9f463052fb947ebc9f294 Mon Sep 17 00:00:00 2001 From: darkdrag00n Date: Wed, 26 Apr 2023 00:51:53 +0530 Subject: [PATCH 4/6] Create directory if it doesn't exist --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 18f56c4..931f9f4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,6 +29,7 @@ jobs: wget https://github.com/dfinity/motoko/releases/download/${{ env.moc_version }}/motoko-linux64-${{ env.moc_version }}.tar.gz mkdir -p /home/runner/bin tar -xzf motoko-linux64-${{ env.moc_version }}.tar.gz -C /home/runner/bin + dfx cache show | xargs -n 1 -I{} mkdir -p {} dfx cache show | xargs -n 1 -I{} cp -r /home/runner/bin/* {} echo "/home/runner/bin" >> $GITHUB_PATH From 1550b8c55c45a6318bb145273bec7a1cf191fb0e Mon Sep 17 00:00:00 2001 From: darkdrag00n Date: Wed, 26 Apr 2023 01:15:58 +0530 Subject: [PATCH 5/6] Do not run dfx cache install before each command --- .github/workflows/ci.yaml | 2 +- Makefile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 931f9f4..cdd33e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,10 +26,10 @@ jobs: - name: "install Motoko binaries" run: | + dfx cache install wget https://github.com/dfinity/motoko/releases/download/${{ env.moc_version }}/motoko-linux64-${{ env.moc_version }}.tar.gz mkdir -p /home/runner/bin tar -xzf motoko-linux64-${{ env.moc_version }}.tar.gz -C /home/runner/bin - dfx cache show | xargs -n 1 -I{} mkdir -p {} dfx cache show | xargs -n 1 -I{} cp -r /home/runner/bin/* {} echo "/home/runner/bin" >> $GITHUB_PATH diff --git a/Makefile b/Makefile index e318f36..acdc70f 100644 --- a/Makefile +++ b/Makefile @@ -3,21 +3,21 @@ install-dfx-cache: dfx cache install -check: install-dfx-cache +check: find src -type f -name '*.mo' -print0 | xargs -0 $(shell dfx cache show)/moc $(shell vessel sources) --check -check-mops: install-dfx-cache +check-mops: find src -type f -name '*.mo' -print0 | xargs -0 $(shell dfx cache show)/moc $(shell mops sources) --check all: check-strict check-strict-mops docs test -check-strict: install-dfx-cache +check-strict: find src -type f -name '*.mo' -print0 | xargs -0 $(shell dfx cache show)/moc $(shell vessel sources) -Werror --check -check-strict-mops: install-dfx-cache +check-strict-mops: find src -type f -name '*.mo' -print0 | xargs -0 $(shell dfx cache show)/moc $(shell mops sources) -Werror --check -docs: install-dfx-cache +docs: $(shell dfx cache show)/mo-doc test: From a1facf4bc6a1cdc2db04290aeb32007d3d5b559d Mon Sep 17 00:00:00 2001 From: darkdrag00n Date: Wed, 26 Apr 2023 01:18:20 +0530 Subject: [PATCH 6/6] Use sudo --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cdd33e7..433bab8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,10 +26,11 @@ jobs: - name: "install Motoko binaries" run: | - dfx cache install + sudo dfx cache install wget https://github.com/dfinity/motoko/releases/download/${{ env.moc_version }}/motoko-linux64-${{ env.moc_version }}.tar.gz mkdir -p /home/runner/bin tar -xzf motoko-linux64-${{ env.moc_version }}.tar.gz -C /home/runner/bin + dfx cache show | xargs -n 1 -I{} mkdir -p {} dfx cache show | xargs -n 1 -I{} cp -r /home/runner/bin/* {} echo "/home/runner/bin" >> $GITHUB_PATH