diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfec698..d723f2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,15 @@ jobs: fail-fast: false matrix: branch: [devel] + compiler: + - name: nim + version: devel + - name: nim + version: version-2-0 + - name: nim + version: version-1-6 + - name: nimskull + version: "*" target: [linux, macos, windows] arch: [i386, amd64] include: @@ -29,7 +38,9 @@ jobs: exclude: - target: macos arch: i386 - name: ${{ matrix.target }} on ${{ matrix.arch }} (Nim ${{ matrix.branch }}) + name: + ${{ matrix.target }} on ${{ matrix.arch }} (${{ matrix.compiler.name }} + ${{ matrix.compiler.version }}) runs-on: ${{ matrix.builder }} defaults: @@ -56,12 +67,19 @@ jobs: libstdc++-10-dev-i386-cross mkdir -p ~/.config/nim cat << EOF > ~/.config/nim/nim.cfg + cpu = "i386" gcc.exe = "i686-linux-gnu-gcc-10" gcc.cpp.exe = "i686-linux-gnu-g++-10" gcc.linkerexe = "i686-linux-gnu-gcc-10" gcc.cpp.linkerexe = "i686-linux-gnu-g++-10" EOF + - name: Configure target architecture for Windows (i386) + if: matrix.arch == 'i386' && runner.os == 'Windows' + run: | + mkdir -p "$APPDATA/nim" + echo 'cpu = "i386"' >> "$APPDATA/nim/nim.cfg" + - name: Setup GCC (Windows-only) if: runner.os == 'Windows' uses: bwoodsend/setup-winlibs-action@v1.14 @@ -69,17 +87,45 @@ jobs: architecture: ${{ matrix.winlib_arch }} - name: Setup Nim + if: matrix.compiler.name == 'nim' uses: alaviss/setup-nim@0.1.1 with: path: nim - version: ${{ matrix.branch }} + version: ${{ matrix.compiler.version }} architecture: ${{ matrix.arch }} + - name: Setup nimskull + id: nimskull + if: matrix.compiler.name == 'nimskull' + uses: nim-works/setup-nimskull@0.1.0 + with: + nimskull-version: ${{ matrix.compiler.version }} + + - name: Fetch nimble source for nimskull + if: matrix.compiler.name == 'nimskull' + uses: actions/checkout@v4.1.1 + with: + path: nimble + repository: alaviss/nimble + ref: nimskull + + - name: Install nimble for nimskull + if: matrix.compiler.name == 'nimskull' + run: | + nim c -d:release -o:"$NIMSKULL_BIN/nimble" src/nimble.nim + # Add nimble binary folder to PATH + echo "$HOME/.nimble/bin" >> "$GITHUB_PATH" + working-directory: nimble + env: + NIMSKULL_BIN: ${{ steps.nimskull.outputs.bin-path }} + - name: Install dependencies - run: nimble install -y --depsOnly + run: | + nimble install -y --depsOnly + nimble install -y "https://github.com/disruptek/balls@^=3.9.11" - name: Run tests - run: nimble test + run: balls - name: Build docs shell: bash diff --git a/readme.md b/readme.md index a179d19..5975db8 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # An abstraction layer for common operating system services [![CI status](https://github.com/alaviss/nim-sys/workflows/CI/badge.svg)](https://github.com/alaviss/nim-sys/actions?query=workflow%3ACI) -![Minimum supported Nim version](https://img.shields.io/badge/nim-1.5.1%2B-informational?style=flat&logo=nim) +![Minimum supported Nim version](https://img.shields.io/badge/nim-1.6.0%2B-informational?style=flat&logo=nim) [![License](https://img.shields.io/github/license/alaviss/nim-sys?style=flat)](#license) This package is an experiment in rewriting various parts of stdlib's `os` module. diff --git a/sys.nimble b/sys.nimble index 363fb7d..1b5bc14 100644 --- a/sys.nimble +++ b/sys.nimble @@ -1,6 +1,6 @@ # Package -version = "0.1.0" +version = "0.0.1" author = "Leorize" description = "Abstractions for common operating system services" license = "MIT" @@ -9,12 +9,11 @@ srcDir = "src" # Dependencies -requires "nim >= 1.5.1" -requires "https://github.com/disruptek/balls >= 3.9.0 & < 4.0.0" -when (NimMajor, NimMinor, NimPatch) < (1, 9, 0): - requires "https://github.com/nim-works/cps >= 0.8.0 & < 0.9.0" +requires "nim >= 1.6.0" +when not defined(isNimSkull) && (NimMajor, NimMinor, NimPatch) < (1, 9, 0): + requires "https://github.com/nim-works/cps ^= 0.8.0" else: - requires "https://github.com/nim-works/cps >= 0.9.0 & < 0.10.0" + requires "https://github.com/nim-works/cps ^= 0.10.0" requires "https://github.com/status-im/nim-stew#3c91b8694e15137a81ec7db37c6c58194ec94a6a" # Bundled as submodule instead since the package can only be installed on Windows.