diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c15160d..9464323 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 - builder: macos-12 + cpu: amd64 + builder: macos-13 + shell: bash + - target: + os: macos + cpu: arm64 + builder: macos-latest shell: bash - target: os: windows - builder: windows-2019 + builder: windows-latest shell: msys2 {0} defaults: @@ -50,7 +56,7 @@ jobs: continue-on-error: ${{ matrix.branch == 'devel' }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install build dependencies (Linux i386) if: runner.os == 'Linux' && matrix.target.cpu == 'i386' @@ -96,7 +102,7 @@ jobs: - name: Restore Nim DLLs dependencies (Windows) from cache if: runner.os == 'Windows' id: windows-dlls-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: external/dlls-${{ matrix.target.cpu }} key: 'dlls-${{ matrix.target.cpu }}' @@ -120,6 +126,8 @@ jobs: run: | if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then PLATFORM=x64 + elif [[ '${{ matrix.target.cpu }}' == 'arm64' ]]; then + PLATFORM=arm64 else PLATFORM=x86 fi diff --git a/presto.nimble b/presto.nimble index 93b8290..8ed9900 100644 --- a/presto.nimble +++ b/presto.nimble @@ -11,6 +11,7 @@ requires "nim >= 1.6.0", "chronos#head", "chronicles", "metrics", + "results", "stew" let nimc = getEnv("NIMC", "nim") # Which nim compiler to use @@ -26,10 +27,10 @@ let cfg = proc build(args, path: string) = exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path -proc run(args, path: string) = - build args & " -r", path +proc run(path: string) = + build " --mm:refc -r", path if (NimMajor, NimMinor) > (1, 6): - build args & " --mm:refc -r", path + build " --mm:orc -r", path task test, "Runs rest tests": - run "", "tests/testall" + run "tests/testall" diff --git a/presto/common.nim b/presto/common.nim index 31ebb40..b1b56ae 100644 --- a/presto/common.nim +++ b/presto/common.nim @@ -10,7 +10,8 @@ {.push raises: [].} import chronos/apps/http/[httpcommon, httptable] -import stew/[results, byteutils], httputils +import results +import stew/[byteutils], httputils export results, httputils, httptable diff --git a/presto/secureserver.nim b/presto/secureserver.nim index ebf2eef..080343b 100644 --- a/presto/secureserver.nim +++ b/presto/secureserver.nim @@ -12,7 +12,7 @@ import std/options import chronos, chronos/apps/http/shttpserver import chronicles -import stew/results +import results import "."/[route, common, segpath, servercommon, serverprivate, agent] export options, chronos, shttpserver, servercommon, chronicles, agent diff --git a/presto/segpath.nim b/presto/segpath.nim index cae0331..f4cdc4d 100644 --- a/presto/segpath.nim +++ b/presto/segpath.nim @@ -10,7 +10,8 @@ {.push raises: [].} import std/[uri, strutils] -import stew/[bitops2, results] +import stew/bitops2 +import results import chronos/apps import "."/common export common, apps diff --git a/presto/server.nim b/presto/server.nim index b4415ad..76bfd79 100644 --- a/presto/server.nim +++ b/presto/server.nim @@ -12,7 +12,7 @@ import std/[options, json, strutils] import chronos, chronos/apps/http/httpserver import chronicles -import stew/results +import results import "."/[route, common, segpath, servercommon, serverprivate, agent] export options, chronos, httpserver, servercommon, chronicles, agent diff --git a/presto/serverprivate.nim b/presto/serverprivate.nim index 55ce8c1..7fdfafb 100644 --- a/presto/serverprivate.nim +++ b/presto/serverprivate.nim @@ -10,7 +10,7 @@ {.push raises: [].} import std/[options, strutils] -import chronos, chronicles, stew/[base10, results] +import chronos, chronicles, stew/base10, results import "."/[route, common, segpath, servercommon] when defined(metrics):