From bf5afd156a92c1887eb789e821b66f85161afe5a Mon Sep 17 00:00:00 2001 From: Luben Karavelov Date: Sun, 29 Oct 2023 15:43:00 +0000 Subject: [PATCH] Add the win/aarch64 dll to the jar --- .github/workflows/ci.yml | 2 +- build.sbt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d50fd5f..f1c2129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,7 +165,7 @@ jobs: - name: Deploy if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}} - shell: cmd + shell: bash env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/build.sbt b/build.sbt index d257ffe..5899514 100644 --- a/build.sbt +++ b/build.sbt @@ -179,6 +179,7 @@ Compile / packageBin / packageOptions ++= Seq( |linux/riscv64/libzstd-jni-${version.value}.so;osname=Linux;processor=riscv64, |linux/s390x/libzstd-jni-${version.value}.so;osname=Linux;processor=s390x, |win/amd64/libzstd-jni-${version.value}.dll;osname=Win32;processor=amd64, + |win/aarch64/libzstd-jni-${version.value}.dll;osname=Win32;processor=aarch64, |win/x86/libzstd-jni-${version.value}.dll;osname=Win32;processor=x86""".stripMargin}), ) @@ -410,3 +411,13 @@ Win_amd64 / packageBin / packageOptions ++= Seq( Package.ManifestAttributes(new java.util.jar.Attributes.Name("Automatic-Module-Name") -> "com.github.luben.zstd_jni"), ) addArtifact(Artifact(nameValue, "win_amd64"), Win_amd64 / packageBin) + +val Win_aarch64 = config("win_aarch64").extend(Compile) +inConfig(Win_aarch64)(Defaults.compileSettings) +Win_aarch64 / packageBin / mappings := { + (file(s"target/classes/win/aarch64/libzstd-jni-${version.value}.dll"), s"win/aarch64/libzstd-jni-${version.value}.dll") :: classes +} +Win_aarch64 / packageBin / packageOptions ++= Seq( + Package.ManifestAttributes(new java.util.jar.Attributes.Name("Automatic-Module-Name") -> "com.github.luben.zstd_jni"), +) +addArtifact(Artifact(nameValue, "win_aarch64"), Win_aarch64 / packageBin)