refactor all code that builds csources (#17815)

* refactor all code that builds csources
* fixup
* nim_csourcesDir_v0 + nim_csourcesDir
* remove deprecated, unused scripts from ci/
* reuse nimCsourcesHash in ci
* simplify CI pipelines by reusing nimBuildCsourcesIfNeeded
* simplify ci_docs.yml by reusing nimBuildCsourcesIfNeeded
* cleanup
* use csources_v1 as destination dir
* fixup
* remove pushCsources
* address comment: remove build.sh support for now
* fixup
This commit is contained in:
Timothee Cour 2021-04-23 02:28:42 -07:00 • committed by GitHub
commit dce0b3b002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 136 additions and 339 deletions

View file

@ -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