diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c61c445..af9aa30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: inputs: branch: - default: '"stable"' + default: '"== 2.2"' concurrency: # Cancel stale PR builds (but not push builds) group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} @@ -19,24 +19,23 @@ jobs: strategy: fail-fast: false matrix: - 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"')) }} + branch: ${{ fromJSON(format('[{0}]', inputs.branch || '" == 1.2.0"," ~= 1.2.0"," == 1.4.2"," ~= 1.4.2"," == 1.6.0"," ~= 1.6.0"," == 2.0.0"," ~= 2.0.0"," == 2.2.0"," ~= 2.2.0","#devel"')) }} - name: 'nim-${{matrix.branch}}' + name: 'nim ${{matrix.branch}}' runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - - uses: jiro4989/setup-nim-action@v1 + - uses: nim-lang/setup-nimble-action@v1 with: - nim-version: ${{ matrix.branch }} + nimble-version: "nightly" repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Run tests run: | - nim --version - env TEST_LANG="c" nimble test - env TEST_LANG="cpp" nimble test + env TEST_LANG="c" nimble test --requires="nim${{matrix.branch}}" + env TEST_LANG="cpp" nimble test --requires="nim${{matrix.branch}}" lint: @@ -44,16 +43,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 + - name: Check `nph` formatting + uses: arnetheduck/nph-action@v1 with: - fetch-depth: 2 # In PR, has extra merge commit: ^1 = PR, ^2 = base - - - name: Check nph formatting - # Pin nph to a specific version to avoid sudden style differences. - run: | - VERSION="v0.6.0" - ARCHIVE="nph-linux_x64.tar.gz" - curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE} - tar -xzf ${ARCHIVE} - ./nph . - git diff --exit-code \ No newline at end of file + version: latest + options: "." diff --git a/results.nimble b/results.nimble index e58e292..666f316 100644 --- a/results.nimble +++ b/results.nimble @@ -21,7 +21,7 @@ task test, "Runs the test suite": for opt in ["-d:resultsGenericsOpenSym:false", "-d:resultsGenericsOpenSym:true"]: test opt, "tests/" & f if (NimMajor, NimMinor) >= (2, 0): - test opt & " --mm:refc", "tests/" & f + test opt & " --gc:refc", "tests/" & f task bench, "Run benchmark": test "-d:release", "benchmarks/benchmark.nim" diff --git a/tests/test_results.nim b/tests/test_results.nim index d434e73..fb22370 100644 --- a/tests/test_results.nim +++ b/tests/test_results.nim @@ -143,7 +143,7 @@ block: try: echo rErr[] doAssert false - except: + except Exception: discard when (NimMajor, NimMinor, NimPatch) >= (1, 6, 12):