Skip to content

Commit 2190421

Browse files
authored
update ci.yml and be more explicit in .nimble (#80)
Also, use `results` instead of deprecated `stew/results`.
1 parent a9687dd commit 2190421

File tree

7 files changed

+27
-16
lines changed

7 files changed

+27
-16
lines changed

.github/workflows/ci.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,29 @@ jobs:
2222
cpu: i386
2323
- os: macos
2424
cpu: amd64
25+
- os: macos
26+
cpu: arm64
2527
- os: windows
2628
cpu: amd64
27-
#- os: windows
28-
#cpu: i386
2929
branch: [version-1-6, version-2-0, devel]
3030
include:
3131
- target:
3232
os: linux
33-
builder: ubuntu-20.04
33+
builder: ubuntu-latest
34+
shell: bash
35+
- target:
36+
os: macos
37+
cpu: amd64
38+
builder: macos-13
3439
shell: bash
3540
- target:
3641
os: macos
37-
builder: macos-12
42+
cpu: arm64
43+
builder: macos-latest
3844
shell: bash
3945
- target:
4046
os: windows
41-
builder: windows-2019
47+
builder: windows-latest
4248
shell: msys2 {0}
4349

4450
defaults:
@@ -50,7 +56,7 @@ jobs:
5056
continue-on-error: ${{ matrix.branch == 'devel' }}
5157
steps:
5258
- name: Checkout
53-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
5460

5561
- name: Install build dependencies (Linux i386)
5662
if: runner.os == 'Linux' && matrix.target.cpu == 'i386'
@@ -96,7 +102,7 @@ jobs:
96102
- name: Restore Nim DLLs dependencies (Windows) from cache
97103
if: runner.os == 'Windows'
98104
id: windows-dlls-cache
99-
uses: actions/cache@v2
105+
uses: actions/cache@v4
100106
with:
101107
path: external/dlls-${{ matrix.target.cpu }}
102108
key: 'dlls-${{ matrix.target.cpu }}'
@@ -120,6 +126,8 @@ jobs:
120126
run: |
121127
if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then
122128
PLATFORM=x64
129+
elif [[ '${{ matrix.target.cpu }}' == 'arm64' ]]; then
130+
PLATFORM=arm64
123131
else
124132
PLATFORM=x86
125133
fi

presto.nimble

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ requires "nim >= 1.6.0",
1111
"chronos#head",
1212
"chronicles",
1313
"metrics",
14+
"results",
1415
"stew"
1516

1617
let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
@@ -26,10 +27,10 @@ let cfg =
2627
proc build(args, path: string) =
2728
exec nimc & " " & lang & " " & cfg & " " & flags & " " & args & " " & path
2829

29-
proc run(args, path: string) =
30-
build args & " -r", path
30+
proc run(path: string) =
31+
build " --mm:refc -r", path
3132
if (NimMajor, NimMinor) > (1, 6):
32-
build args & " --mm:refc -r", path
33+
build " --mm:orc -r", path
3334

3435
task test, "Runs rest tests":
35-
run "", "tests/testall"
36+
run "tests/testall"

presto/common.nim

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
{.push raises: [].}
1111

1212
import chronos/apps/http/[httpcommon, httptable]
13-
import stew/[results, byteutils], httputils
13+
import results
14+
import stew/[byteutils], httputils
1415

1516
export results, httputils, httptable
1617

presto/secureserver.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import std/options
1313
import chronos, chronos/apps/http/shttpserver
1414
import chronicles
15-
import stew/results
15+
import results
1616
import "."/[route, common, segpath, servercommon, serverprivate, agent]
1717
export options, chronos, shttpserver, servercommon, chronicles, agent
1818

presto/segpath.nim

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
{.push raises: [].}
1111

1212
import std/[uri, strutils]
13-
import stew/[bitops2, results]
13+
import stew/bitops2
14+
import results
1415
import chronos/apps
1516
import "."/common
1617
export common, apps

presto/server.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import std/[options, json, strutils]
1313
import chronos, chronos/apps/http/httpserver
1414
import chronicles
15-
import stew/results
15+
import results
1616
import "."/[route, common, segpath, servercommon, serverprivate, agent]
1717
export options, chronos, httpserver, servercommon, chronicles, agent
1818

presto/serverprivate.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{.push raises: [].}
1111

1212
import std/[options, strutils]
13-
import chronos, chronicles, stew/[base10, results]
13+
import chronos, chronicles, stew/base10, results
1414
import "."/[route, common, segpath, servercommon]
1515

1616
when defined(metrics):

0 commit comments

Comments
 (0)