Skip to content

Commit 6340b04

Browse files
authored
ci: Combine c/c++ (#43)
* ci: Combine c/c++ * x * x * fix test * x
1 parent 1306c10 commit 6340b04

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

.github/workflows/ci.yml

+5-18
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
inputs:
99
branch:
10-
default: stable
10+
default: '"stable"'
1111

1212
concurrency: # Cancel stale PR builds (but not push builds)
1313
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
@@ -18,23 +18,9 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
target:
22-
- os: linux
23-
cpu: amd64
24-
TEST_LANG: c
25-
- os: linux
26-
cpu: amd64
27-
TEST_LANG: cpp
28-
branch: ${{ fromJSON(format('[{0}]', inputs.branch || '"1.2.x","1.4.x","1.6.x","2.0.x", "devel"')) }}
29-
include:
30-
- target:
31-
os: linux
32-
shell: bash
33-
defaults:
34-
run:
35-
shell: ${{ matrix.shell }}
21+
branch: ${{ fromJSON(format('[{0}]', inputs.branch || '"1.2.0","1.2.x","1.4.2","1.4.x","1.6.0","1.6.x","2.0.0","2.0.x","stable","devel"')) }}
3622

37-
name: 'nim-${{matrix.branch}}-${{ matrix.target.TEST_LANG }}'
23+
name: 'nim-${{matrix.branch}}'
3824
runs-on: ubuntu-latest
3925
steps:
4026
- name: Checkout
@@ -48,5 +34,6 @@ jobs:
4834
- name: Run tests
4935
run: |
5036
nim --version
51-
env TEST_LANG="${{ matrix.target.TEST_LANG }}" nimble test
37+
env TEST_LANG="c" nimble test
38+
env TEST_LANG="cpp" nimble test
5239

tests/test_results.nim

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ block:
125125
doAssert d.isErr
126126

127127
# De-reference
128-
when (NimMajor, NimMinor) >= (1, 6):
128+
when (NimMajor, NimMinor, NimPatch) >= (1, 6, 12):
129129
{.warning[BareExcept]: off.}
130130

131131
try:
@@ -134,7 +134,7 @@ block:
134134
except:
135135
discard
136136

137-
when (NimMajor, NimMinor) >= (1, 6):
137+
when (NimMajor, NimMinor, NimPatch) >= (1, 6, 12):
138138
{.warning[BareExcept]: on.}
139139

140140
# Comparisons

0 commit comments

Comments
 (0)