diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/ci.yml.disabled | 25 | ||||
-rw-r--r-- | .github/workflows/ci_docs.yml | 51 | ||||
-rw-r--r-- | .github/workflows/ci_packages.yml | 25 |
3 files changed, 12 insertions, 89 deletions
diff --git a/.github/workflows/ci.yml.disabled b/.github/workflows/ci.yml.disabled index 183576456..62daf875a 100644 --- a/.github/workflows/ci.yml.disabled +++ b/.github/workflows/ci.yml.disabled @@ -1,3 +1,5 @@ +# out of date and unused but revivable + name: Continous Integration on: [push, pull_request] @@ -30,11 +32,6 @@ jobs: steps: - name: 'Checkout' uses: actions/checkout@v2 - - name: 'Checkout csources' - uses: actions/checkout@v2 - with: - repository: nim-lang/csources - path: csources - name: 'Install node.js 8.x' uses: actions/setup-node@v1 @@ -91,24 +88,10 @@ jobs: shell: bash run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}" - - name: 'Build csources' + - name: 'Build csourcesAny' shell: bash - run: | - 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 + run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}' - make -C csources -j $ncpu CC=gcc ucpu='${{ matrix.cpu }}' - name: 'Build koch' shell: bash run: nim c koch 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 diff --git a/.github/workflows/ci_packages.yml b/.github/workflows/ci_packages.yml index 7ebdc5144..c6355bbcb 100644 --- a/.github/workflows/ci_packages.yml +++ b/.github/workflows/ci_packages.yml @@ -20,16 +20,11 @@ jobs: with: fetch-depth: 2 - - name: 'Checkout csources' - uses: actions/checkout@v2 - with: - repository: nim-lang/csources - path: csources - - name: 'Install node.js 12.x' uses: actions/setup-node@v1 with: node-version: '12.x' + - name: 'Install dependencies (Linux amd64)' if: runner.os == 'Linux' && matrix.cpu == 'amd64' run: | @@ -56,24 +51,10 @@ jobs: shell: bash run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}" - - name: 'Build csources' + - name: 'Build csourcesAny' shell: bash - run: | - 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 + run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}' - make -C csources -j $ncpu CC=gcc ucpu='${{ matrix.cpu }}' - name: 'Build koch' shell: bash run: nim c koch |