summary refs log tree commit diff stats
path: root/.github/workflows
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-05-26 00:43:30 -0700
committerGitHub <noreply@github.com>2021-05-26 09:43:30 +0200
commitc495628255330a559e3398663cc8872cca18b04d (patch)
treecf85c44fe30068263515dbfe53709ebc508c56de /.github/workflows
parentb59dc3b255d778cefdbef2c0c3ff55d43892c11c (diff)
downloadNim-c495628255330a559e3398663cc8872cca18b04d.tar.gz
refactor common code in CI pipelines (#18035)
* refactor CI with nimInternalInstallDepsWindows

* refactor CI with nimInternalBuildKochAndRunCI

* fixup
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci_docs.yml8
-rw-r--r--.github/workflows/ci_packages.yml22
2 files changed, 9 insertions, 21 deletions
diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml
index 364c05051..ddef94fbe 100644
--- a/.github/workflows/ci_docs.yml
+++ b/.github/workflows/ci_docs.yml
@@ -59,11 +59,9 @@ 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
+          set -e
+          . ci/funs.sh
+          nimInternalInstallDepsWindows
           echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}"
 
       - name: 'Add build binaries to PATH'
diff --git a/.github/workflows/ci_packages.yml b/.github/workflows/ci_packages.yml
index d033aba10..aeb29e147 100644
--- a/.github/workflows/ci_packages.yml
+++ b/.github/workflows/ci_packages.yml
@@ -40,12 +40,10 @@ 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
@@ -59,14 +57,6 @@ jobs:
         shell: bash
         run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}'
 
-      - name: 'Build koch'
+      - name: 'koch, Run CI'
         shell: bash
-        run: nim c koch
-      - name: 'Run CI'
-        shell: bash
-        run: ./koch runCI
-
-      - name: 'Show failed tests'
-        if: failure()
-        shell: bash
-        run: nim c -r tools/ci_testresults.nim
+        run: . ci/funs.sh && nimInternalBuildKochAndRunCI