From 971edade77a470377d35a84e622324771627cd80 Mon Sep 17 00:00:00 2001 From: Caspian Baska Date: Wed, 20 Oct 2021 15:06:17 +1100 Subject: [PATCH 1/4] Fix `#encrypt_detached` for crystal 1.2.0 --- src/sodium/cipher/aead/chalsa.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sodium/cipher/aead/chalsa.cr b/src/sodium/cipher/aead/chalsa.cr index f9d20ff..57b7208 100644 --- a/src/sodium/cipher/aead/chalsa.cr +++ b/src/sodium/cipher/aead/chalsa.cr @@ -103,7 +103,7 @@ module Sodium::Cipher::Aead # `src` and `dst` may be the same object but should not overlap. # May supply `mac`, otherwise a new one is returned. # May supply `additional` - def encrypt_detached(src : Bytes, dst : Bytes? = nil, nonce : Sodium::Nonce? = nil, *, mac : Bytes? = nil, additional : String | Bytes | Nil = nil) : {Bytes, Bytes, Sodium::Nonce} + def encrypt_detached(src : Bytes, dst : Bytes? = nil, *, nonce : Sodium::Nonce? = nil, mac : Bytes? = nil, additional : String | Bytes | Nil = nil) : {Bytes, Bytes, Sodium::Nonce} dst ||= Bytes.new src.bytesize nonce ||= Sodium::Nonce.random mac ||= Bytes.new MAC_SIZE From 3c8f6287134cc9aa9f4c63a058bda6d8eb8b395a Mon Sep 17 00:00:00 2001 From: Caspian Baska Date: Wed, 20 Oct 2021 15:11:38 +1100 Subject: [PATCH 2/4] Add matrix of crystal versions The matrix represents the stated supported version in the `shard.yml` --- .github/workflows/crystal.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/crystal.yml b/.github/workflows/crystal.yml index 43fee48..bbed10a 100644 --- a/.github/workflows/crystal.yml +++ b/.github/workflows/crystal.yml @@ -9,9 +9,24 @@ on: jobs: build: runs-on: ubuntu-latest + name: "crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}" + continue-on-error: ${{ !matrix.stable }} + strategy: + matrix: + stable: [true] + crystal: + - 0.36.0 + - 0.36.1 + - 1.0.0 + - 1.1.0 + - 1.1.1 + - 1.2.0 + include: + - crystal: nightly + stable: false container: - image: crystallang/crystal + image: crystallang/crystal:${{ matrix.crystal }} steps: - uses: actions/checkout@v2 @@ -31,8 +46,7 @@ jobs: - name: Install dependencies run: shards install - name: Run tests - run: crystal spec -Dpreview_mt --order random -# run: crystal spec -Dpreview_mt --order random --error-on-warnings + run: crystal spec -Dpreview_mt --order random - name: Run bulid run: shards build -Dpreview_mt - name: Run format From 5790d171caf6da384c4d5245a73e24c714596965 Mon Sep 17 00:00:00 2001 From: Caspian Baska Date: Wed, 20 Oct 2021 15:49:10 +1100 Subject: [PATCH 3/4] Allow other jobs to continue after failure --- .github/workflows/crystal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crystal.yml b/.github/workflows/crystal.yml index bbed10a..b2d9f08 100644 --- a/.github/workflows/crystal.yml +++ b/.github/workflows/crystal.yml @@ -12,6 +12,7 @@ jobs: name: "crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}" continue-on-error: ${{ !matrix.stable }} strategy: + fail-fast: false matrix: stable: [true] crystal: @@ -54,4 +55,3 @@ jobs: - name: Failed if: ${{ failure() }} run: "[ -f libsodium_install.out ] && cat libsodium_install.out" - From f8e12cd435b170d1b02797b9293bd5da4ba88b07 Mon Sep 17 00:00:00 2001 From: Caspian Baska Date: Wed, 20 Oct 2021 15:54:50 +1100 Subject: [PATCH 4/4] Remove support for crystal versions < 1.0.0 --- .github/workflows/crystal.yml | 2 -- shard.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/crystal.yml b/.github/workflows/crystal.yml index b2d9f08..bf75807 100644 --- a/.github/workflows/crystal.yml +++ b/.github/workflows/crystal.yml @@ -16,8 +16,6 @@ jobs: matrix: stable: [true] crystal: - - 0.36.0 - - 0.36.1 - 1.0.0 - 1.1.0 - 1.1.1 diff --git a/shard.yml b/shard.yml index a77c077..4e17b80 100644 --- a/shard.yml +++ b/shard.yml @@ -4,7 +4,7 @@ version: 1.2.3 authors: - Andrew Hamon - Didactic Drunk <1479616+didactic-drunk@users.noreply.github.com> -crystal: ">= 0.36.0" +crystal: ">= 1.0.0" targets: blake2b_hash: main: examples/blake2b_hash.cr