Skip to content

Commit

Permalink
update ci.yml and be more explicit in .nimble (#174)
Browse files Browse the repository at this point in the history
* update ci.yml and be more explicit in .nimble

* test both amd64 and arm64 macos

* import results: get rid of the deprecated warning
  • Loading branch information
narimiran authored Jun 26, 2024
1 parent f29698d commit 1d0d886
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,29 @@ jobs:
cpu: i386
- os: macos
cpu: amd64
- os: macos
cpu: arm64
- os: windows
cpu: amd64
#- os: windows
#cpu: i386
branch: [version-1-6, version-2-0, devel]
include:
- target:
os: linux
builder: ubuntu-20.04
builder: ubuntu-latest
shell: bash
- target:
os: macos
cpu: amd64
builder: macos-13
shell: bash
- target:
os: macos
builder: macos-12
cpu: arm64
builder: macos-latest
shell: bash
- target:
os: windows
builder: windows-2019
builder: windows-latest
shell: msys2 {0}

defaults:
Expand All @@ -50,7 +56,7 @@ jobs:
continue-on-error: ${{ matrix.branch == 'devel' }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -98,7 +104,7 @@ jobs:
- name: Restore Nim DLLs dependencies (Windows) from cache
if: runner.os == 'Windows'
id: windows-dlls-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: external/dlls-${{ matrix.target.cpu }}
key: 'dlls-${{ matrix.target.cpu }}'
Expand All @@ -122,6 +128,8 @@ jobs:
run: |
if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then
PLATFORM=x64
elif [[ '${{ matrix.target.cpu }}' == 'arm64' ]]; then
PLATFORM=arm64
else
PLATFORM=x86
fi
Expand Down
7 changes: 4 additions & 3 deletions blscurve.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ installFiles = @["blscurve.nim"]
requires "nim >= 1.6.0",
"nimcrypto",
"stew",
"results",
"taskpools >= 0.0.5"

let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
Expand All @@ -29,9 +30,9 @@ proc build(args, path: string) =
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path

proc run(args, path: string) =
build args & " -r", path
build args & " --mm:refc -r", path
if (NimMajor, NimMinor) > (1, 6):
build args & " --mm:refc -r", path
build args & " --mm:orc -r", path

### tasks
task test, "Run all tests":
Expand All @@ -55,7 +56,7 @@ task test, "Run all tests":

when (defined(windows) and sizeof(pointer) == 4):
# Eth2 vectors without batch verify
run "-d:BLS_FORCE_BACKEND=blst", "tests/eth2_vectors.nim"
run "--threads:off -d:BLS_FORCE_BACKEND=blst", "tests/eth2_vectors.nim"
else:
run "--threads:on -d:BLS_FORCE_BACKEND=blst", "tests/eth2_vectors.nim"

Expand Down
3 changes: 2 additions & 1 deletion blscurve/blst/blst_recovery.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import
sequtils,
stew/[results, objects],
results,
stew/objects,
./blst_lowlevel,
./blst_min_pubkey_sig_core

Expand Down

0 comments on commit 1d0d886

Please sign in to comment.