summary refs log tree commit diff stats
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/bisects.yml34
-rw-r--r--.github/workflows/ci_bench.yml115
-rw-r--r--.github/workflows/ci_docs.yml12
-rw-r--r--.github/workflows/ci_gcc14.yml76
-rw-r--r--.github/workflows/ci_packages.yml10
-rw-r--r--.github/workflows/ci_publish.yml10
-rw-r--r--.github/workflows/stale.yml2
7 files changed, 113 insertions, 146 deletions
diff --git a/.github/workflows/bisects.yml b/.github/workflows/bisects.yml
index a8200c1f9..4a6a92f01 100644
--- a/.github/workflows/bisects.yml
+++ b/.github/workflows/bisects.yml
@@ -5,19 +5,27 @@ on:
     types: created
 
 jobs:
-  test:
-    runs-on: ubuntu-latest
+  bisects:
+    if: |
+      github.event_name == 'issue_comment' && startsWith(github.event.comment.body, '!nim ') && github.event.issue.pull_request == null && github.event.comment.author_association != 'NONE'
+    strategy:
+      fail-fast: false
+      matrix:
+        platform: [ubuntu-latest, windows-latest, macos-latest]
+    name: ${{ matrix.platform }}-bisects
+    runs-on: ${{ matrix.platform }}
     steps:
-    - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
 
-    # nimrun-action requires Nim installed.
-    - uses: jiro4989/setup-nim-action@v1
-      with:
-        nim-version: 'devel'
+      - uses: jiro4989/setup-nim-action@v1
+        with:
+          nim-version: 'devel'
 
-    - name: Install Dependencies
-      run: sudo apt-get install --no-install-recommends -yq valgrind
-
-    - uses: juancarlospaco/nimrun-action@nim
-      with:
-        github-token: ${{ secrets.GITHUB_TOKEN }}
+      - uses: juancarlospaco/nimrun-action@nim
+        if: |
+          runner.os == 'Linux'   && contains(github.event.comment.body, '-d:linux'  ) ||
+          runner.os == 'Windows' && contains(github.event.comment.body, '-d:windows') ||
+          runner.os == 'macOS'   && contains(github.event.comment.body, '-d:osx'    ) ||
+          runner.os == 'Linux' && !contains(github.event.comment.body, '-d:linux') && !contains(github.event.comment.body, '-d:windows') && !contains(github.event.comment.body, '-d:osx')
+        with:
+          github-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/ci_bench.yml b/.github/workflows/ci_bench.yml
deleted file mode 100644
index 68f000722..000000000
--- a/.github/workflows/ci_bench.yml
+++ /dev/null
@@ -1,115 +0,0 @@
-name: Benchmarks CI
-on:
-  pull_request:
-  push:
-    branches:
-      - 'devel'
-
-jobs:
-  build:
-    strategy:
-      fail-fast: false
-      matrix:
-        os: [ubuntu-20.04]
-        cpu: [amd64]
-    name: '${{ matrix.os }}'
-    runs-on: ${{ matrix.os }}
-    timeout-minutes: 60 # refs bug #18178
-    steps:
-      - name: 'Checkout'
-        uses: actions/checkout@v3
-        with:
-          fetch-depth: 2
-
-      - name: 'Install node.js 16.x'
-        uses: actions/setup-node@v3
-        with:
-          node-version: '16.x'
-
-      - name: 'Install dependencies (Linux amd64)'
-        if: runner.os == 'Linux' && matrix.cpu == 'amd64'
-        run: |
-          sudo apt-fast update -qq
-          DEBIAN_FRONTEND='noninteractive' \
-            sudo apt-fast install --no-install-recommends -yq \
-              libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev \
-              valgrind libc6-dbg libblas-dev xorg-dev
-
-      - name: 'Add build binaries to PATH'
-        shell: bash
-        run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}"
-
-      - name: 'Build csourcesAny'
-        shell: bash
-        run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}'
-
-      - name: 'Build koch'
-        shell: bash
-        run: nim c koch
-
-      - name: 'Build Nim'
-        shell: bash
-        run: ./koch boot -d:release -d:nimStrictMode --lib:lib
-
-      - name: 'Build Nimble'
-        shell: bash
-        run: ./koch nimble
-
-      - name: 'Action'
-        shell: bash
-        run: nim c -r -d:release ci/action.nim
-
-      - name: 'Checkout minimize'
-        uses: actions/checkout@v3
-        with:
-          repository: 'nim-lang/ci_bench'
-          path: minimize
-
-      - name: 'Run minimize benchmarks'
-        shell: bash
-        run: ./minimize/minimize ci-bench
-
-      - name: 'Restore minimize cached database'
-        uses: actions/cache/restore@v3
-        with:
-          path: minimize.csv
-          key: minimize-db-key
-
-      - name: 'Update minimize db'
-        shell: bash
-        run: ./minimize/minimize update-db
-
-      - name: 'Save minimize cached database'
-        if: |
-          github.event_name == 'push' && github.ref == 'refs/heads/devel' &&
-          matrix.target == 'linux'
-        uses: actions/cache/save@v3
-        with:
-          path: minimize.csv
-          key: minimize-db-key
-
-      - name: 'Generate minimize report'
-        shell: bash
-        run: ./minimize/minimize generate-report
-
-      - name: 'Archive minimize report'
-        uses: actions/upload-artifact@v3
-        with:
-          name: minimize-report
-          path: |
-            minimize/minimize.html
-            minimize/minimize.csv
-
-      # Requires additional permissions, see:
-      # https://github.com/nim-lang/Nim/actions/runs/4778177321/jobs/8494423792?pr=21566
-      # - name: 'Publish HTML report'
-      #   uses: rossjrw/pr-preview-action@v1
-      #   with:
-      #     source-dir: minimize
-      #     umbrella-dir: minimize
-      #   env:
-      #     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-      - name: Extract md summary
-        run: |
-          cat minimize/summary.md  >> $GITHUB_STEP_SUMMARY
diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml
index cde30e5fa..2faa37ce0 100644
--- a/.github/workflows/ci_docs.yml
+++ b/.github/workflows/ci_docs.yml
@@ -2,8 +2,7 @@ name: Nim Docs CI
 on:
   push:
     paths:
-      - 'compiler/docgen.nim'
-      - 'compiler/renderverbatim.nim'
+      - 'compiler/**.nim'
       - 'config/nimdoc.cfg'
       - 'doc/**.rst'
       - 'doc/**.md'
@@ -18,8 +17,7 @@ on:
   pull_request:
     # Run only on changes on these files.
     paths:
-      - 'compiler/docgen.nim'
-      - 'compiler/renderverbatim.nim'
+      - 'compiler/**.nim'
       - 'config/nimdoc.cfg'
       - 'doc/**.rst'
       - 'doc/**.md'
@@ -47,7 +45,7 @@ jobs:
           - target: windows
             os: windows-2019
           - target: osx
-            os: macos-11
+            os: macos-12
 
     name: ${{ matrix.target }}
     runs-on: ${{ matrix.os }}
@@ -55,7 +53,7 @@ jobs:
 
     steps:
       - name: 'Checkout'
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
           fetch-depth: 2
 
@@ -111,7 +109,7 @@ jobs:
         if: |
           github.event_name == 'push' && github.ref == 'refs/heads/devel' &&
           matrix.target == 'linux'
-        uses: crazy-max/ghaction-github-pages@v3
+        uses: crazy-max/ghaction-github-pages@v4
         with:
           build_dir: doc/html
         env:
diff --git a/.github/workflows/ci_gcc14.yml b/.github/workflows/ci_gcc14.yml
new file mode 100644
index 000000000..fb286887a
--- /dev/null
+++ b/.github/workflows/ci_gcc14.yml
@@ -0,0 +1,76 @@
+name: GCC 14
+on:
+  pull_request:
+  push:
+    branches:
+      - 'devel'
+
+
+jobs:
+  build:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-24.04]
+        cpu: [amd64]
+    name: '${{ matrix.os }}'
+    runs-on: ${{ matrix.os }}
+    timeout-minutes: 60 # refs bug #18178
+    steps:
+      - name: 'Checkout'
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 2
+
+      - name: 'Install node.js 20.x'
+        uses: actions/setup-node@v4
+        with:
+          node-version: '20.x'
+
+      - name: 'Install dependencies (Linux amd64)'
+        if: runner.os == 'Linux' && matrix.cpu == 'amd64'
+        run: |
+          sudo apt update -qq
+          sudo apt remove needrestart
+          DEBIAN_FRONTEND='noninteractive' \
+            sudo apt install --no-install-recommends -yq \
+              libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev \
+              valgrind libc6-dbg libblas-dev xorg-dev
+      - name: 'Install dependencies (Linux amd64 gcc 14)'
+        if: runner.os == 'Linux' && matrix.cpu == 'amd64'
+        run: |
+          sudo add-apt-repository universe
+          sudo apt update -qq
+          sudo apt install -y gcc-14 g++-14 libpcre3 liblapack-dev
+          sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 60 --slave /usr/bin/g++ g++ /usr/bin/g++-14
+      - name: 'Install dependencies (macOS)'
+        if: runner.os == 'macOS'
+        run: brew install boehmgc make sfml gtk+3
+      - name: 'Install dependencies (Windows)'
+        if: runner.os == 'Windows'
+        shell: bash
+        run: |
+          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: 'NIM_TESTAMENT_DISABLE_SSL'
+        shell: bash
+        run: echo "NIM_TESTAMENT_DISABLE_SSL=1" >> $GITHUB_ENV
+
+      - name: 'System information'
+        shell: bash
+        run: . ci/funs.sh && nimCiSystemInfo
+
+      - name: 'Build csourcesAny'
+        shell: bash
+        run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}'
+
+      - name: 'koch, Run CI'
+        shell: bash
+        run: . ci/funs.sh && nimInternalBuildKochAndRunCI
diff --git a/.github/workflows/ci_packages.yml b/.github/workflows/ci_packages.yml
index 0bec4cc21..2ea5092e3 100644
--- a/.github/workflows/ci_packages.yml
+++ b/.github/workflows/ci_packages.yml
@@ -17,7 +17,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        os: [ubuntu-20.04, macos-11]
+        os: [ubuntu-20.04, macos-12]
         cpu: [amd64]
         batch: ["allowed_failures", "0_3", "1_3", "2_3"] # list of `index_num`
     name: '${{ matrix.os }} (batch: ${{ matrix.batch }})'
@@ -28,14 +28,14 @@ jobs:
       NIM_TESTAMENT_BATCH: ${{ matrix.batch }}
     steps:
       - name: 'Checkout'
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
           fetch-depth: 2
 
-      - name: 'Install node.js 16.x'
-        uses: actions/setup-node@v3
+      - name: 'Install node.js 20.x'
+        uses: actions/setup-node@v4
         with:
-          node-version: '16.x'
+          node-version: '20.x'
 
       - name: 'Install dependencies (Linux amd64)'
         if: runner.os == 'Linux' && matrix.cpu == 'amd64'
diff --git a/.github/workflows/ci_publish.yml b/.github/workflows/ci_publish.yml
index d6b628d8c..decfe953e 100644
--- a/.github/workflows/ci_publish.yml
+++ b/.github/workflows/ci_publish.yml
@@ -17,14 +17,14 @@ jobs:
     runs-on: ${{ matrix.os }}
     steps:
       - name: 'Checkout'
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
           fetch-depth: 2
 
-      - name: 'Install node.js 16.x'
-        uses: actions/setup-node@v3
+      - name: 'Install node.js 20.x'
+        uses: actions/setup-node@v4
         with:
-          node-version: '16.x'
+          node-version: '20.x'
 
       - name: 'Install dependencies (Linux amd64)'
         if: runner.os == 'Linux' && matrix.cpu == 'amd64'
@@ -71,7 +71,7 @@ jobs:
         run: nim c -r -d:release ci/action.nim
 
       - name: 'Comment'
-        uses: actions/github-script@v6
+        uses: actions/github-script@v7
         with:
           script: |
             const fs = require('fs');
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index d89a4888a..0c5a533e1 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -9,7 +9,7 @@ jobs:
   stale:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/stale@v8
+      - uses: actions/stale@v9
         with:
           days-before-pr-stale:    365
           days-before-pr-close:    30