update ci.yml and be more explicit in .nimble (#60)

* update ci.yml and be more explicit in .nimble

* test both amd64 and arm64 macos
This commit is contained in:
Miran 2024-06-27 00:22:34 +02:00 committed by GitHub
parent a806cbfab5
commit 8790ee6401
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 9 deletions

View File

@ -22,18 +22,23 @@ 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
- target:
os: macos
builder: macos-12
cpu: amd64
builder: macos-13
- target:
os: macos
cpu: arm64
builder: macos-latest
- target:
os: windows
builder: windows-latest
@ -47,7 +52,7 @@ jobs:
continue-on-error: ${{ matrix.branch == 'devel' }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
@ -74,7 +79,7 @@ jobs:
- name: Restore llvm-mingw (Windows) from cache
if: runner.os == 'Windows'
id: windows-mingw-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: external/mingw-${{ matrix.target.cpu }}
key: 'mingw-llvm-17-${{ matrix.target.cpu }}'
@ -100,7 +105,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 }}'
@ -125,6 +130,8 @@ jobs:
run: |
if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then
PLATFORM=x64
elif [[ '${{ matrix.target.cpu }}' == 'arm64' ]]; then
PLATFORM=arm64
else
PLATFORM=x86
fi

View File

@ -24,9 +24,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
from std/strutils import endsWith