diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70de0cf..f18640f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: cpu: amd64 #- os: windows #cpu: i386 - branch: [version-1-2, version-1-4, version-1-6, version-2-0, devel] + branch: [version-1-6, version-2-0, devel] include: - target: os: linux diff --git a/secp256k1.nim b/secp256k1.nim index 7799d22..bee3855 100644 --- a/secp256k1.nim +++ b/secp256k1.nim @@ -1,4 +1,4 @@ -## Copyright (c) 2018-2020 Status Research & Development GmbH +## Copyright (c) 2018-2023 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) ## * MIT license ([LICENSE-MIT](LICENSE-MIT)) @@ -7,10 +7,7 @@ ## those terms. ## -when (NimMajor, NimMinor) < (1, 4): - {.push raises: [Defect].} -else: - {.push raises: [].} +{.push raises: [].} import strformat, typetraits, diff --git a/secp256k1.nimble b/secp256k1.nimble index 66cf15d..d22fc67 100644 --- a/secp256k1.nimble +++ b/secp256k1.nimble @@ -8,7 +8,7 @@ license = "Apache License 2.0" skipDirs = @["tests"] installDirs = @["vendor"] -requires "nim >= 1.2.0", +requires "nim >= 1.6.0", "stew", "nimcrypto" @@ -17,9 +17,8 @@ let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js) let flags = getEnv("NIMFLAGS", "") # Extra flags for the compiler let verbose = getEnv("V", "") notin ["", "0"] -let styleCheckStyle = if (NimMajor, NimMinor) < (1, 6): "hint" else: "error" let cfg = - " --styleCheck:usages --styleCheck:" & styleCheckStyle & + " --styleCheck:usages --styleCheck:error" & (if verbose: "" else: " --verbosity:0 --hints:off") & " --skipParentCfg --skipUserCfg --outdir:build --nimcache:build/nimcache -f" diff --git a/secp256k1/abi.nim b/secp256k1/abi.nim index 5253edd..9bb5528 100644 --- a/secp256k1/abi.nim +++ b/secp256k1/abi.nim @@ -18,13 +18,7 @@ const compileFlags = " -I" & quoteShell(srcPath) & asmFlags -when (NimMajor, NimMinor) >= (1, 4): - {.compile(srcPath & "/secp256k1.c", compileFlags).} -else: - # Per-compile flags not supported in 1.2 - {.passc: compileFlags.} - {.compile: srcPath & "/secp256k1.c".} - +{.compile(srcPath & "/secp256k1.c", compileFlags).} {.compile: srcPath & "/precomputed_ecmult.c".} {.compile: srcPath & "/precomputed_ecmult_gen.c".}