Skip to content

Commit

Permalink
ci: Combine c/c++ (#43)
Browse files Browse the repository at this point in the history
* ci: Combine c/c++

* x

* x

* fix test

* x
  • Loading branch information
arnetheduck authored Mar 11, 2024
1 parent 1306c10 commit 6340b04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
inputs:
branch:
default: stable
default: '"stable"'

concurrency: # Cancel stale PR builds (but not push builds)
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand All @@ -18,23 +18,9 @@ jobs:
strategy:
fail-fast: false
matrix:
target:
- os: linux
cpu: amd64
TEST_LANG: c
- os: linux
cpu: amd64
TEST_LANG: cpp
branch: ${{ fromJSON(format('[{0}]', inputs.branch || '"1.2.x","1.4.x","1.6.x","2.0.x", "devel"')) }}
include:
- target:
os: linux
shell: bash
defaults:
run:
shell: ${{ matrix.shell }}
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"')) }}

name: 'nim-${{matrix.branch}}-${{ matrix.target.TEST_LANG }}'
name: 'nim-${{matrix.branch}}'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -48,5 +34,6 @@ jobs:
- name: Run tests
run: |
nim --version
env TEST_LANG="${{ matrix.target.TEST_LANG }}" nimble test
env TEST_LANG="c" nimble test
env TEST_LANG="cpp" nimble test
4 changes: 2 additions & 2 deletions tests/test_results.nim
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ block:
doAssert d.isErr

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

try:
Expand All @@ -134,7 +134,7 @@ block:
except:
discard

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

# Comparisons
Expand Down

0 comments on commit 6340b04

Please sign in to comment.