diff options
Diffstat (limited to '.github/workflows/ci_packages.yml')
-rw-r--r-- | .github/workflows/ci_packages.yml | 74 |
1 files changed, 31 insertions, 43 deletions
diff --git a/.github/workflows/ci_packages.yml b/.github/workflows/ci_packages.yml index dd42db0c4..2ea5092e3 100644 --- a/.github/workflows/ci_packages.yml +++ b/.github/workflows/ci_packages.yml @@ -1,34 +1,42 @@ name: Packages CI -on: [push, pull_request] +on: + pull_request: + push: + branches: + - 'devel' + - 'version-2-0' + - 'version-1-6' + - 'version-1-2' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: build: - if: | - !contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[skip ci]') strategy: fail-fast: false matrix: - os: [ubuntu-18.04, macos-10.15] + os: [ubuntu-20.04, macos-12] cpu: [amd64] - batch: ["0_3", "1_3", "2_3"] # list of `index_num` + batch: ["allowed_failures", "0_3", "1_3", "2_3"] # list of `index_num` name: '${{ matrix.os }} (batch: ${{ matrix.batch }})' runs-on: ${{ matrix.os }} + timeout-minutes: 60 # refs bug #18178 env: NIM_TEST_PACKAGES: "1" NIM_TESTAMENT_BATCH: ${{ matrix.batch }} steps: - name: 'Checkout' - uses: actions/checkout@v2 - - name: 'Checkout csources' - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - repository: nim-lang/csources - path: csources + fetch-depth: 2 - - name: 'Install node.js 12.x' - uses: actions/setup-node@v1 + - name: 'Install node.js 20.x' + uses: actions/setup-node@v4 with: - node-version: '12.x' + node-version: '20.x' + - name: 'Install dependencies (Linux amd64)' if: runner.os == 'Linux' && matrix.cpu == 'amd64' run: | @@ -44,43 +52,23 @@ jobs: if: runner.os == 'Windows' shell: bash run: | - mkdir dist - curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z - curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip - 7z x dist/mingw64.7z -odist - 7z x dist/dlls.zip -obin - echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}" + set -e + . ci/funs.sh + nimInternalInstallDepsWindows + echo_run echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}" - name: 'Add build binaries to PATH' shell: bash run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}" - - name: 'Build csources' + - name: 'System information' 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 && nimCiSystemInfo - make -C csources -j $ncpu CC=gcc ucpu='${{ matrix.cpu }}' - - name: 'Build koch' - shell: bash - run: nim c koch - - name: 'Run CI' + - name: 'Build csourcesAny' shell: bash - run: ./koch runCI + run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}' - - name: 'Show failed tests' - if: failure() + - name: 'koch, Run CI' shell: bash - run: nim c -r tools/ci_testresults.nim + run: . ci/funs.sh && nimInternalBuildKochAndRunCI |