test: download desired Nimble sources
This commit is contained in:
parent
410dee4aa3
commit
3962ac7ad0
|
@ -116,10 +116,11 @@ runs:
|
||||||
shell: ${{ inputs.shell }}
|
shell: ${{ inputs.shell }}
|
||||||
run: |
|
run: |
|
||||||
rm -rf nim
|
rm -rf nim
|
||||||
|
export NIMBLE_DIR=dist/nimble
|
||||||
cp ./scripts/build_nim.sh .
|
cp ./scripts/build_nim.sh .
|
||||||
env MAKE="${MAKE_CMD} -j${ncpu}" ARCH_OVERRIDE=${PLATFORM} NIM_COMMIT=${{ inputs.nim_branch }} \
|
env MAKE="${MAKE_CMD} -j${ncpu}" ARCH_OVERRIDE=${PLATFORM} NIM_COMMIT=${{ inputs.nim_branch }} \
|
||||||
QUICK_AND_DIRTY_COMPILER=1 QUICK_AND_DIRTY_NIMBLE=1 CC=gcc \
|
QUICK_AND_DIRTY_COMPILER=1 QUICK_AND_DIRTY_NIMBLE=1 CC=gcc \
|
||||||
bash build_nim.sh nim csources dist/my_nimble NONE
|
bash build_nim.sh nim csources ${NIMBLE_DIR} NimBinaries
|
||||||
# nimble install nimble -y
|
# nimble install nimble -y
|
||||||
# ls -la nim/bin
|
# ls -la nim/bin
|
||||||
# rm -rf nim/bin/nimble.exe
|
# rm -rf nim/bin/nimble.exe
|
||||||
|
|
|
@ -94,6 +94,21 @@ nim_needs_rebuilding() {
|
||||||
fi
|
fi
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
|
if [[ ! -d "$NIMBLE_DIR" ]]; then
|
||||||
|
mkdir -p "$NIMBLE_DIR"
|
||||||
|
pushd "$NIMBLE_DIR"
|
||||||
|
git clone https://github.com/nim-lang/nimble.git .
|
||||||
|
git checkout $NIMBLE_COMMIT
|
||||||
|
# we have to delete .git or koch.nim will checkout a branch tip, overriding our target commit
|
||||||
|
rm -rf .git
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
if [[ "$NIMBLE_DIR" != "dist/nimble" ]]; then
|
||||||
|
mkdir -p dist
|
||||||
|
rm -rf dist/nimble
|
||||||
|
ln -s ../"$NIMBLE_DIR" dist/nimble
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "$CI_CACHE" && -d "$CI_CACHE" ]]; then
|
if [[ -n "$CI_CACHE" && -d "$CI_CACHE" ]]; then
|
||||||
cp -a "$CI_CACHE"/* "$NIM_DIR"/bin/ || true # let this one fail with an empty cache dir
|
cp -a "$CI_CACHE"/* "$NIM_DIR"/bin/ || true # let this one fail with an empty cache dir
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue