Merge pull request #69 from status-im/fix_gh_action

github CI: fixes backend selection
This commit is contained in:
andri lim 2021-01-08 12:06:21 +07:00 committed by GitHub
commit 932fa6cef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 8 deletions

View File

@ -184,13 +184,13 @@ jobs:
run: |
env TEST_LANG="${{ matrix.target.TEST_LANG }}" nimble test
- name: Setup VCC (i386)
- name: Setup VCC (Windows-i386)
if: runner.os == 'Windows' && matrix.target.cpu == 'i386'
uses: ilammy/msvc-dev-cmd@v1.5.0
with:
arch: amd64_x86
- name: Setup VCC (amd64)
- name: Setup VCC (Windows-amd64)
if: runner.os == 'Windows' && matrix.target.cpu == 'amd64'
uses: ilammy/msvc-dev-cmd@v1.5.0
with:
@ -200,4 +200,5 @@ jobs:
if: runner.os == 'Windows'
shell: cmd
working-directory: nim-stew
run: nimble testvcc
run: |
env TEST_LANG="${{ matrix.target.TEST_LANG }}" nimble testvcc

View File

@ -9,11 +9,22 @@ skipDirs = @["tests"]
requires "nim >= 1.2.0"
### Helper functions
proc test(env, path: string) =
# Compilation language is controlled by TEST_LANG
var lang = "c"
if existsEnv"TEST_LANG":
lang = getEnv"TEST_LANG"
exec "nim " & lang & " " & env &
" -r --hints:off --warnings:off " & path
task test, "Run all tests":
exec "nim c -r --threads:off tests/all_tests"
exec "nim c -r --threads:on -d:nimTypeNames tests/all_tests"
exec "nim c -r --threads:on -d:noIntrinsicsBitOpts -d:noIntrinsicsEndians tests/all_tests"
test "--threads:off", "tests/all_tests"
test "--threads:on -d:nimTypeNames", "tests/all_tests"
test "--threads:on -d:noIntrinsicsBitOpts -d:noIntrinsicsEndians", "tests/all_tests"
task testvcc, "Run all tests with vcc compiler":
exec "nim c -r --cc:vcc --threads:off tests/all_tests"
exec "nim c -r --cc:vcc --threads:on -d:nimTypeNames tests/all_tests"
test "--cc:vcc --threads:off", "tests/all_tests"
test "--cc:vcc --threads:on -d:nimTypeNames", "tests/all_tests"
test "--cc:vcc --threads:on -d:noIntrinsicsBitOpts -d:noIntrinsicsEndians", "tests/all_tests"