Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Combine c/c++ #43

Merged
merged 5 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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