-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from alaviss/ci-nimskull
add nimskull support and expand nim test matrix Main changes: * Dropped Nim 1.6 support as it was untested and did not work once testing was hooked up. * Refactored `strings.filter()` to make it work on nimskull. * Added Nim 2.0 and nimskull to CI. * nim-sys version is now 0.0.1. Known issues: * Windows and i386 testing for nimskull has been temporary disabled as fixes are required to get them going. * Docgen in CI has been disabled for nimskull due to nim-works/nimskull#1151
- Loading branch information
Showing
8 changed files
with
88 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,13 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
branch: [devel] | ||
compiler: | ||
- name: nim | ||
version: devel | ||
- name: nim | ||
version: version-2-0 | ||
- name: nimskull | ||
version: "*" | ||
target: [linux, macos, windows] | ||
arch: [i386, amd64] | ||
include: | ||
|
@@ -24,12 +31,31 @@ jobs: | |
winlib_arch: x86_64 | ||
- target: linux | ||
arch: amd64 | ||
branch: devel | ||
builddocs: true | ||
compiler: | ||
name: nim | ||
version: devel | ||
uploaddocs: true | ||
# XXX: nimskull hangs forever trying to build docs | ||
- compiler: | ||
name: nimskull | ||
nodocs: true | ||
exclude: | ||
- target: macos | ||
arch: i386 | ||
name: ${{ matrix.target }} on ${{ matrix.arch }} (Nim ${{ matrix.branch }}) | ||
|
||
# TODO: nimskull needs fixes for this to work | ||
- target: linux | ||
arch: i386 | ||
compiler: | ||
name: nimskull | ||
|
||
# TODO: a handful of problems with SSL must be solved before this | ||
- target: windows | ||
compiler: | ||
name: nimskull | ||
name: | ||
${{ matrix.target }} on ${{ matrix.arch }} (${{ matrix.compiler.name }} | ||
${{ matrix.compiler.version }}) | ||
runs-on: ${{ matrix.builder }} | ||
|
||
defaults: | ||
|
@@ -56,32 +82,68 @@ 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/[email protected] | ||
with: | ||
architecture: ${{ matrix.winlib_arch }} | ||
|
||
- name: Setup Nim | ||
if: matrix.compiler.name == 'nim' | ||
uses: alaviss/[email protected] | ||
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/[email protected] | ||
with: | ||
nimskull-version: ${{ matrix.compiler.version }} | ||
|
||
- name: Fetch nimble source for nimskull | ||
if: matrix.compiler.name == 'nimskull' | ||
uses: actions/[email protected] | ||
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 & < 4.0.0" | ||
- name: Run tests | ||
run: nimble test | ||
run: balls | ||
|
||
- name: Build docs | ||
if: "!matrix.nodocs" | ||
shell: bash | ||
run: | | ||
branch=${{ github.ref }} | ||
|
@@ -97,7 +159,7 @@ jobs: | |
cp htmldocs/{the,}index.html || true | ||
- name: Upload GitHub Pages artifact | ||
if: matrix.builddocs | ||
if: matrix.uploaddocs | ||
uses: actions/[email protected] | ||
with: | ||
path: nim-sys/htmldocs | ||
|
@@ -120,3 +182,12 @@ jobs: | |
- name: Deploy page | ||
id: deployment | ||
uses: actions/[email protected] | ||
|
||
passed: | ||
needs: build | ||
if: failure() || cancelled() | ||
name: All tests passed | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
path = "$config/../src" |
File renamed without changes.
File renamed without changes.