From 4d136a2e4cd1ca9e7f6f614b62f82ac293948e59 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Tue, 23 Nov 2021 11:22:51 -0600 Subject: [PATCH] make ci use new build system --- .github/workflows/ci.yml | 62 +++++++--------------------------------- 1 file changed, 11 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 151fb9d6..3dd3484c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,71 +143,31 @@ jobs: shell: bash run: echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH - - name: Get latest Nim commit hash + - name: Get latest nimbus-build-system commit hash id: versions shell: bash run: | getHash() { git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1 } - nimHash=$(getHash nim-lang/Nim '${{ matrix.branch }}') - csourcesHash=$(getHash nim-lang/csources) - echo "::set-output name=nim::$nimHash" - echo "::set-output name=csources::$csourcesHash" + nbsHash=$(getHash status-im/nimbus-build-system) + echo "::set-output name=nimbus_build_system::$nbsHash" - - name: Restore prebuilt Nim from cache + - name: Restore prebuilt Nim binaries from cache id: nim-cache - uses: actions/cache@v1 + uses: actions/cache@v2 with: 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 - 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' + - name: Build Nim and Dagger dependencies shell: bash + working-directory: nim-dagger run: | - [[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1 - if [[ ! -e csources/bin/nim$ext ]]; then - make -C csources -j $ncpu CC=gcc ucpu='${{ matrix.target.cpu }}' - else - echo 'Using prebuilt csources' + if [[ "${{ runner.os }}" == "macOS" ]]; then + ulimit -n 1024 fi - cp -v csources/bin/nim$ext nim/bin - 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 + make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries QUICK_AND_DIRTY_COMPILER=1 update - name: Run nim-dagger tests shell: bash