From 4d4fdf62107de2f21f17e82704895c98e04d9992 Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Thu, 20 Jun 2024 13:20:55 +1000 Subject: [PATCH] Use nim v1.6+ (#12) * Use nim v1.6+ nim-stew now requires nim >= 1.6, so nim-leopard must be bumped * Use macos-13 (intel) runner image instead of arm * change 1.2 to 1.6 in readme and .nimble --- .github/workflows/test.yml | 18 +++++++----------- README.md | 2 +- leopard.nimble | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54f0754..146a73f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,28 +10,31 @@ jobs: fail-fast: false matrix: cache_nonce: [ 1 ] - nim_version: [ 1.2.18, 1.4.8, 1.6.6 ] + nim_version: [ 1.6.20 ] # add stable for testing 2.0+ platform: - { icon: 🐧, label: Linux, os: ubuntu, + runner: ubuntu-latest, shell: bash --noprofile --norc -eo pipefail } - { icon: 🍎, label: macOS, os: macos, + runner: macos-13, # x86 shell: bash --noprofile --norc -eo pipefail } - { icon: 🏁, label: Windows, os: windows, + runner: windows-latest, shell: msys2 } name: ${{ matrix.platform.icon }} ${{ matrix.platform.label }} - Nim v${{ matrix.nim_version }} - runs-on: ${{ matrix.platform.os }}-latest + runs-on: ${{ matrix.platform.runner }} defaults: run: shell: ${{ matrix.platform.shell }} {0} @@ -142,15 +145,8 @@ jobs: export LDFLAGS="-L$(brew --prefix libomp)/lib -L$(brew --prefix llvm@14)/lib -Wl,-rpath,$(brew --prefix llvm@14)/lib" compiler_extra_options="-d:LeopardCmakeFlags='-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$(brew --prefix llvm@14)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm@14)/bin/clang++' -d:LeopardExtraCompilerlags='-fopenmp' -d:LeopardExtraLinkerFlags='-fopenmp -L$(brew --prefix libomp)/lib'" fi - if [[ ${{ matrix.nim_version }} = 1.2.* ]]; then - eval nimble --verbose test -d:release --gc:refc ${compiler_extra_options} - elif [[ ${{ matrix.nim_version }} = 1.4.* ]]; then - eval nimble --verbose test -d:release --gc:refc ${compiler_extra_options} - eval nimble --verbose test -d:release --gc:orc ${compiler_extra_options} - else - eval nimble --verbose test -d:release --mm:refc ${compiler_extra_options} - eval nimble --verbose test -d:release --mm:orc ${compiler_extra_options} - fi + eval nimble --verbose test -d:release --mm:refc ${compiler_extra_options} + eval nimble --verbose test -d:release --mm:orc ${compiler_extra_options} if [[ ${{ matrix.platform.os }} = macos ]]; then echo echo otool -L tests/testleopard diff --git a/README.md b/README.md index 31dd4c7..45942f2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Nim wrapper for [Leopard-RS](https://github.com/catid/leopard): a fast library f ## Requirements * Same as Leopard-RS' requirements, e.g. CMake 3.7 or newer. -* Nim 1.2 or newer. +* Nim 1.6 or newer. ## Installation diff --git a/leopard.nimble b/leopard.nimble index eaa42b3..2d41950 100644 --- a/leopard.nimble +++ b/leopard.nimble @@ -7,7 +7,7 @@ description = "A wrapper for Leopard-RS" license = "Apache License 2.0 or MIT" installDirs = @["vendor"] -requires "nim >= 1.2.0", +requires "nim >= 1.6.0", "stew", "unittest2", "upraises >= 0.1.0 & < 0.2.0"