Skip to content

Commit

Permalink
support for nimskull in v3 (#63)
Browse files Browse the repository at this point in the history
* runner: there is no CaseTransition warning in nimskull

* ci: test against nimskull

* runner: disable refc and m&s for nimskull

nimskull does not have these GCs

* runner: disable c++ testing on nimskull

This backend no longer exists there

* ci: bump nimskull version to fix osproc bug
  • Loading branch information
alaviss authored Jan 19, 2024
1 parent 0293dc4 commit 43214fe
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 5 deletions.
54 changes: 50 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,25 @@ jobs:
fail-fast: false
matrix:
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
nim: ['devel', 'version-1-6', 'version-1-4', 'version-1-2', 'version-1-0']
name: '${{ matrix.os }} (${{ matrix.nim }})'
compiler:
- name: nim
version: devel
- name: nim
version: version-1-6
- name: nim
version: version-1-4
- name: nim
version: version-1-2
- name: nim
version: version-1-0
- name: nimskull
version: '^0.1.0-dev.21160'
exclude:
- os: windows-latest
compiler:
name: nimskull

name: '${{ matrix.os }} (${{ matrix.compiler.name }} ${{ matrix.compiler.version }})'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -40,10 +57,38 @@ jobs:
path: ci

- name: Setup Nim
if: matrix.compiler.name == 'nim'
uses: alaviss/[email protected]
with:
path: nim
version: ${{ matrix.nim }}
version: ${{ matrix.compiler.version }}

- name: Setup Nimskull
id: nimskull
if: matrix.compiler.name == 'nimskull'
uses: alaviss/setup-nimskull@f6e8ade8ac51191024616216e5da0ee968d9da48
with:
version: ${{ matrix.compiler.version }}

- if: matrix.compiler.name == 'nimskull'
name: Fetch nimble's fork for nimskull
uses: actions/checkout@v4
with:
path: nimble
repository: alaviss/nimble
ref: nimskull

- if: matrix.compiler.name == 'nimskull'
name: Build nimble and add to PATH
shell: bash
run: |
cd nimble
nim c -d:release -o:nimble src/nimble.nim
cp nimble "$NIMSKULL_BIN/nimble"
# Add nimble binary folder to PATH too
echo "$HOME/.nimble/bin" >> $GITHUB_PATH
env:
NIMSKULL_BIN: ${{ steps.nimskull.outputs.binPath }}

- name: Run tests
shell: bash
Expand Down Expand Up @@ -72,7 +117,8 @@ jobs:
- name: Publish docs
if: >
github.event_name == 'push' && github.ref == 'refs/heads/master' &&
matrix.os == 'ubuntu-latest' && matrix.nim == 'devel'
matrix.os == 'ubuntu-latest' && matrix.compiler.name == 'nim' &&
matrix.compiler.version == 'devel'
uses: crazy-max/ghaction-github-pages@v1
with:
build_dir: ci/docs
Expand Down
8 changes: 7 additions & 1 deletion balls/runner.nim
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ proc hints*(p: Profile; ci: bool): string =
omit = @[]
if ci:
# remove spam from ci logs
omit.add ["UnusedImport", "ProveInit", "CaseTransition"]
omit.add ["UnusedImport", "ProveInit"]
when not defined(isNimSkull):
omit.add "CaseTransition"
when (NimMajor, NimMinor) >= (1, 2):
omit.add "ObservableStores"
when (NimMajor, NimMinor) >= (1, 4):
Expand Down Expand Up @@ -419,6 +421,10 @@ func nonsensical(p: Profile): bool =
true
elif p.fn == changeFileExt(p.fn, "nims") and p.gc != vm:
true
elif defined(isNimSkull) and p.gc in {refc, markAndSweep}:
true
elif defined(isNimSkull) and p.be in {cpp}:
true
else:
false

Expand Down

0 comments on commit 43214fe

Please sign in to comment.