-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add nimskull testing and various compatibility fixes (#168)
* ci: update actions/checkout and remove unshallow We can fetch the full history from here. * ci: split clone and build for libgit2 Allows for better Windows compatibility (not that it's in use) * ci: add nimskull to the test matrix * bootstrap: switch to alaviss fork of hlibgit2 This fixes a memory corruption due to ABI error in libgit2 * ci: bump nimskull version for balls * bump balls to 3.9.10 This version contains fixes for balls-the-library to run under nimskull * ci: run test in both debug and release mode This is so that we can get traces on test failure due to memory errors. Ideally balls would be employed for this, but the runner does not understand nimskull flags yet. * bump gittyup to 3.2.2 This version supports nimskull and fixes various memory leaks
- Loading branch information
Showing
3 changed files
with
67 additions
and
18 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 |
---|---|---|
|
@@ -35,27 +35,69 @@ jobs: | |
#os: ['windows-latest', 'macos-latest', 'ubuntu-latest'] | ||
#os: ['macos-latest', 'ubuntu-latest'] | ||
os: ['ubuntu-latest'] | ||
nim: ['version-1-6', 'version-1-4', 'version-1-2'] | ||
name: '${{ matrix.os }} (${{ matrix.nim }})' | ||
compiler: | ||
- name: nim | ||
version: version-1-6 | ||
- name: nim | ||
version: version-1-4 | ||
- name: nim | ||
version: version-1-2 | ||
- name: nimskull | ||
version: '^0.1.0-dev.21080' | ||
name: '${{ matrix.os }} (${{ matrix.compiler.name }} ${{ matrix.compiler.version }})' | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci | ||
fetch-depth: 0 | ||
# nimph will scream when this is used | ||
#filter: tree:0 | ||
|
||
- name: Setup Nim | ||
- if: matrix.compiler.name == 'nim' | ||
name: Setup Nim | ||
uses: alaviss/[email protected] | ||
with: | ||
path: nim | ||
version: ${{ matrix.nim }} | ||
version: ${{ matrix.compiler.version }} | ||
|
||
- if: matrix.compiler.name == 'nimskull' | ||
id: nimskull | ||
name: Setup Nimskull | ||
uses: alaviss/setup-nimskull@f6e8ade8ac51191024616216e5da0ee968d9da48 | ||
with: | ||
nimskull-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" | ||
env: | ||
NIMSKULL_BIN: ${{ steps.nimskull.outputs.binPath }} | ||
|
||
- name: Fetch libgit2 | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci/libgit2 | ||
repository: libgit2/libgit2 | ||
ref: v1.5.0 | ||
|
||
- name: Setup libgit2 | ||
shell: bash | ||
run: | | ||
cd ci | ||
git clone --depth=1 --branch=v1.5.0 --quiet https://github.com/libgit2/libgit2.git | ||
cd libgit2 | ||
cd ci/libgit2 | ||
mkdir build | ||
cd build | ||
cmake .. | ||
|
@@ -66,7 +108,6 @@ jobs: | |
run: | | ||
mkdir $HOME/.nimble | ||
cd ci | ||
git fetch --unshallow | ||
cp ci-bootstrap.cfg nim.cfg | ||
./bootstrap-nonimble.sh | ||
./nimph refresh | ||
|
@@ -82,11 +123,19 @@ jobs: | |
echo "remove nim's config.nims...?" | ||
ls -l `dirname \`which nim\``/../config/ | ||
rm `dirname \`which nim\``/../config/config.nims || true | ||
if [ "${{ matrix.os }}" == "macos-latest" ]; then | ||
nim c --define:libgit2Lib="$(pwd)/libgit2/build/libgit2.dylib" --passC:"-I$(pwd)/libgit2/include" --define:ssl --define:release --run tests/test.nim | ||
else | ||
nim c --define:libgit2Lib="$(pwd)/libgit2/build/libgit2.so" --passC:"-I$(pwd)/libgit2/include" --define:ssl --define:release --run tests/test.nim | ||
fi | ||
soExt= | ||
case "$RUNNER_OS" in | ||
macOS) | ||
soExt=dylib | ||
;; | ||
Linux) | ||
soExt=so | ||
esac | ||
libgit2Lib=$(pwd)/libgit2/build/libgit2.$soExt | ||
nim c --define:libgit2Lib="$libgit2Lib" --passC:"-I$(pwd)/libgit2/include" --define:ssl -r tests/test.nim | ||
nim c --define:libgit2Lib="$libgit2Lib" --passC:"-I$(pwd)/libgit2/include" --define:ssl --define:release -r tests/test.nim | ||
- name: Build docs | ||
if: ${{ matrix.docs }} == 'true' | ||
|
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