Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
987Nabil committed Aug 14, 2024
1 parent b36a0af commit 319acef
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: CI

env:
JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags -Xmx6G -Xss4M -XX:+UseG1GC # JDK_JAVA_OPTIONS is _the_ env. variable to use for modern Java
JVM_OPTS: -XX:+PrintCommandLineFlags -Xmx6G -Xss4M -XX:+UseG1GC # for Java 8 only (sadly, it is not modern enough for JDK_JAVA_OPTIONS)
JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags -Xmx6G -Xss4M -XX:+UseG1GC
NODE_OPTIONS: --max_old_space_size=6144

on:
Expand Down Expand Up @@ -38,16 +37,16 @@ jobs:
strategy:
fail-fast: false
matrix:
java: ['adopt@1.11', 'openjdk@1.17']
java: ['temurin:17', 'temurin:21']
scala: ['2.12.18', '2.13.12', '3.3.1']
platform: ['JVM', 'Native', 'JS']
steps:
- uses: actions/checkout@v3.0.0
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v13
- uses: coursier/setup-action@v1
with:
java-version: ${{ matrix.java }}
jvm: ${{ matrix.java }}
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install libuv
Expand All @@ -56,6 +55,12 @@ jobs:
- name: Run tests
run: sbt ++${{ matrix.scala }}! test${{ matrix.platform }}

ci:
runs-on: ubuntu-20.04
needs: [build,lint]
steps:
- run: echo "All checks passed"

publish:
runs-on: ubuntu-20.04
timeout-minutes: 45
Expand Down
20 changes: 11 additions & 9 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import sbt._
import Keys._

import sbtcrossproject.CrossPlugin.autoImport._
import sbtbuildinfo._
import BuildInfoKeys._
import scalafix.sbt.ScalafixPlugin.autoImport._
import sbt.*
import Keys.*
import sbtcrossproject.CrossPlugin.autoImport.*
import sbtbuildinfo.*
import BuildInfoKeys.*
import scalafix.sbt.ScalafixPlugin.autoImport.*
import scalanativecrossproject.NativePlatform

import scala.scalanative.sbtplugin.ScalaNativePlugin.autoImport.nativeConfig

object BuildHelper {

private val versions: Map[String, String] = {
Expand All @@ -31,7 +32,7 @@ object BuildHelper {
val zioPreludeVersion = "1.0.0-RC28"
val zioOpticsVersion = "0.2.2"
val zioBsonVersion = "1.0.6"
val avroVersion = "1.12.0"
val avroVersion = "1.11.3"
val bsonVersion = "4.11.3"
val zioConstraintlessVersion = "0.3.3"
val scalaCollectionCompatVersion = "2.12.0"
Expand Down Expand Up @@ -186,7 +187,8 @@ object BuildHelper {
"test",
baseDirectory.value
)
}
},
nativeConfig ~= { _.withMultithreading(false) }
)

def buildInfoSettings(packageName: String) = Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ package zio.schema.codec
import java.nio.charset.StandardCharsets
import java.time.format.DateTimeFormatter
import java.time.{ Duration, Month, MonthDay, Period, Year, YearMonth }

import scala.annotation.StaticAnnotation
import scala.collection.immutable.ListMap
import scala.jdk.CollectionConverters._
import scala.util.{ Right, Try }
import org.apache.avro.{ LogicalTypes, SchemaFormatter, Schema => SchemaAvro }

import org.apache.avro.{ LogicalTypes, Schema => SchemaAvro }

import zio.Chunk
import zio.schema.CaseSet.Aux
import zio.schema.Schema.{ Record, _ }
Expand Down Expand Up @@ -861,11 +864,7 @@ object AvroSchemaCodec extends AvroSchemaCodec {
private[codec] def toZioTuple(schema: SchemaAvro): scala.util.Either[String, Schema[_]] =
for {
_ <- scala.util.Either
.cond(
schema.getFields.size() == 2,
(),
"Tuple must have exactly 2 fields:" + SchemaFormatter.getInstance("json").format(schema)
)
.cond(schema.getFields.size() == 2, (), "Tuple must have exactly 2 fields:" + schema.toString(false))
_1 <- toZioSchema(schema.getFields.get(0).schema())
_2 <- toZioSchema(schema.getFields.get(1).schema())
} yield Schema.Tuple2(_1, _2, buildZioAnnotations(schema))
Expand Down

0 comments on commit 319acef

Please sign in to comment.