diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2743337..df6c4fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,10 +3,11 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: aviate-labs/setup-dfx@v0.2.2 + - uses: actions/checkout@v3 + - uses: aviate-labs/setup-dfx@v0.2.3 with: - dfx-version: 0.8.1 - install-moc: true - vessel-version: 0.6.2 - - run: for i in test/*.mo ; do moc $(vessel sources) -r $i ; done + dfx-version: 0.12.1 + vessel-version: 0.6.3 + - run: | + make check + make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a43ee64 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +.PHONY: check test +check: + find src -type f -name '*.mo' -print0 | xargs -0 $(shell vessel bin)/moc $(shell vessel sources 2>/dev/null) --check +test: + find test -type f -name '*.mo' -print0 | xargs -0 $(shell vessel bin)/moc $(shell vessel sources 2>/dev/null) -r diff --git a/package-set.dhall b/package-set.dhall index 06b80f4..08a8a46 100644 --- a/package-set.dhall +++ b/package-set.dhall @@ -1,12 +1,12 @@ -let upstream = https://github.com/aviate-labs/package-set/releases/download/v0.1.1/package-set.dhall sha256:f1a3f0af31ad92eca20cc829f1fb32ed54e9c6a49257f43c3831732b37bf7559 +let base = https://github.com/internet-computer/base-package-set/releases/download/moc-0.7.4/package-set.dhall sha256:3a20693fc597b96a8c7cf8645fda7a3534d13e5fbda28c00d01f0b7641efe494 let Package = { name : Text, version : Text, repo : Text, dependencies : List Text } let additions = [ { name = "array" + , version = "v0.2.1" , repo = "https://github.com/aviate-labs/array.mo" - , version = "v0.1.1" - , dependencies = [ "base" ] + , dependencies = [ "base-0.7.3" ] : List Text } ] : List Package -in upstream # additions +in base # additions diff --git a/src/CRC32.mo b/src/CRC32.mo index a7f150b..37f34bb 100644 --- a/src/CRC32.mo +++ b/src/CRC32.mo @@ -1,9 +1,9 @@ -import Array "mo:base/Array"; +import Array "mo:base-0.7.3/Array"; import Array_ "mo:array/Array"; -import Hash "mo:base/Hash"; -import Iter "mo:base/Iter"; -import Nat8 "mo:base/Nat8"; -import Nat32 "mo:base/Nat32"; +import Hash "mo:base-0.7.3/Hash"; +import Iter "mo:base-0.7.3/Iter"; +import Nat8 "mo:base-0.7.3/Nat8"; +import Nat32 "mo:base-0.7.3/Nat32"; module CRC32 { // Returns the CRC-32 checksum of the given data using the IEEE polynomial. diff --git a/test/CRC32.mo b/test/CRC32.mo index e214bbb..55c2376 100644 --- a/test/CRC32.mo +++ b/test/CRC32.mo @@ -1,5 +1,5 @@ -import Blob "mo:base/Blob"; -import Text "mo:base/Text"; +import Blob "mo:base-0.7.3/Blob"; +import Text "mo:base-0.7.3/Text"; import CRC32 "../src/CRC32"; diff --git a/vessel.dhall b/vessel.dhall index 242ab52..e12eb3e 100644 --- a/vessel.dhall +++ b/vessel.dhall @@ -1,4 +1,4 @@ { - dependencies = [ "base", "array" ], - compiler = None Text + dependencies = [ "base-0.7.3", "array" ], + compiler = Some "0.7.3" }