summary refs log tree commit diff stats
path: root/.github/workflows/ci_docs.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci_docs.yml')
-rw-r--r--.github/workflows/ci_docs.yml51
1 files changed, 5 insertions, 46 deletions
diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml
index 750613574..1459d6a31 100644
--- a/.github/workflows/ci_docs.yml
+++ b/.github/workflows/ci_docs.yml
@@ -70,53 +70,12 @@ jobs:
         shell: bash
         run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}"
 
-      - name: 'Get current csources version'
-        id: csources-version
+      - name: 'Build csourcesAny'
         shell: bash
-        run: |
-          sha=$(git ls-remote https://github.com/nim-lang/csources_v1 master | cut -f 1)
-          echo "::set-output name=sha::$sha"
-
-      - name: 'Get prebuilt csources from cache'
-        id: csources-cache
-        uses: actions/cache@v1
-        with:
-          path: bin
-          key: '${{ matrix.os }}-${{ steps.csources-version.outputs.sha }}'
-
-      - name: 'Checkout csources'
-        if: steps.csources-cache.outputs.cache-hit != 'true'
-        uses: actions/checkout@v2
-        with:
-          repository: nim-lang/csources_v1
-          path: csources
-
-      - name: 'Build 1-stage compiler from csources'
-        shell: bash
-        run: |
-          ext=
-          [[ '${{ runner.os }}' == 'Windows' ]] && ext=.exe
-          if [[ ! -x bin/nim-csources$ext ]]; then
-            ncpu=
-            case '${{ runner.os }}' in
-            'Linux')
-              ncpu=$(nproc)
-              ;;
-            'macOS')
-              ncpu=$(sysctl -n hw.ncpu)
-              ;;
-            'Windows')
-              ncpu=$NUMBER_OF_PROCESSORS
-              ;;
-            esac
-            [[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
-
-            make -C csources -j $ncpu CC=gcc
-            cp bin/nim{,-csources}$ext
-          else
-            echo 'Cache hit, using prebuilt csources'
-            cp bin/nim{-csources,}$ext
-          fi
+        run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc
+          # was previously using caching via `actions/cache@v1` but this wasn't
+          # used in other CI pipelines and it's unclear the added complexity
+          # was worth the saving; can be revisited if needed.
 
       - name: 'Build koch'
         shell: bash