make ci use new build system

This commit is contained in:
Dmitriy Ryajov 2021-11-23 11:22:51 -06:00 committed by markspanbroek
parent ff498f4280
commit 4d136a2e4c
1 changed files with 11 additions and 51 deletions

View File

@ -143,71 +143,31 @@ jobs:
shell: bash shell: bash
run: echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH run: echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH
- name: Get latest Nim commit hash - name: Get latest nimbus-build-system commit hash
id: versions id: versions
shell: bash shell: bash
run: | run: |
getHash() { getHash() {
git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1 git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1
} }
nimHash=$(getHash nim-lang/Nim '${{ matrix.branch }}') nbsHash=$(getHash status-im/nimbus-build-system)
csourcesHash=$(getHash nim-lang/csources) echo "::set-output name=nimbus_build_system::$nbsHash"
echo "::set-output name=nim::$nimHash"
echo "::set-output name=csources::$csourcesHash"
- name: Restore prebuilt Nim from cache - name: Restore prebuilt Nim binaries from cache
id: nim-cache id: nim-cache
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: nim path: nim
key: "nim-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nim }}" key: 'nim-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nimbus_build_system }}'
- name: Restore prebuilt csources from cache - name: Build Nim and Dagger dependencies
if: steps.nim-cache.outputs.cache-hit != 'true'
id: csources-cache
uses: actions/cache@v1
with:
path: csources/bin
key: "csources-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.csources }}"
- name: Checkout Nim csources
if: >
steps.csources-cache.outputs.cache-hit != 'true' &&
steps.nim-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: nim-lang/csources
path: csources
ref: ${{ steps.versions.outputs.csources }}
- name: Checkout Nim
if: steps.nim-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: nim-lang/Nim
path: nim
ref: ${{ steps.versions.outputs.nim }}
- name: Build Nim and associated tools
if: steps.nim-cache.outputs.cache-hit != 'true'
shell: bash shell: bash
working-directory: nim-dagger
run: | run: |
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1 if [[ "${{ runner.os }}" == "macOS" ]]; then
if [[ ! -e csources/bin/nim$ext ]]; then ulimit -n 1024
make -C csources -j $ncpu CC=gcc ucpu='${{ matrix.target.cpu }}'
else
echo 'Using prebuilt csources'
fi fi
cp -v csources/bin/nim$ext nim/bin make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries QUICK_AND_DIRTY_COMPILER=1 update
cd nim
nim c koch
./koch boot -d:release
./koch tools -d:release
# clean up to save cache space
rm koch
rm -rf nimcache
rm -rf dist
rm -rf .git
- name: Run nim-dagger tests - name: Run nim-dagger tests
shell: bash shell: bash