remove Nim 1.2 and 1.4 support (#52)

This commit is contained in:
tersec 2023-06-12 14:32:14 +00:00 committed by GitHub
parent 5fd8135783
commit 2acbbdcc0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 16 deletions

View File

@ -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

View File

@ -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,9 +7,6 @@
## those terms.
##
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
import

View File

@ -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"

View File

@ -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 & "/precomputed_ecmult.c".}
{.compile: srcPath & "/precomputed_ecmult_gen.c".}