You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by pa...@apache.org on 2022/12/09 20:10:04 UTC

[arrow-nanoarrow] branch main updated: [CI] Improve CI configuration (#84)

This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git


The following commit(s) were added to refs/heads/main by this push:
     new bcc7dfb  [CI] Improve CI configuration (#84)
bcc7dfb is described below

commit bcc7dfb80a09a897124da3f10b40124b150659b5
Author: Dewey Dunnington <de...@fishandwhistle.net>
AuthorDate: Fri Dec 9 16:09:59 2022 -0400

    [CI] Improve CI configuration (#84)
    
    * Prefetch/cache R package testing dependencies
    
    * maybe fix path, don't run docs or examples actions unless needed on PRs
    
    * fix paths in examples.yaml
    
    * tweak actions
    
    * more actions tweak
    
    * one more R tweak
---
 .github/workflows/build-and-test.yaml | 50 ++++-------------------------------
 .github/workflows/docs.yaml           | 23 +++++++++++++++-
 .github/workflows/examples.yaml       |  6 ++++-
 .github/workflows/python.yaml         |  2 +-
 .github/workflows/r-check.yaml        | 19 +++++--------
 .github/workflows/verify-source.yaml  | 10 ++++---
 6 files changed, 45 insertions(+), 65 deletions(-)

diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml
index 6c8a48c..f15f3af 100644
--- a/.github/workflows/build-and-test.yaml
+++ b/.github/workflows/build-and-test.yaml
@@ -15,6 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+name: test-c
+
 on:
   push:
     branches:
@@ -27,10 +29,8 @@ on:
       - '.github/workflows/build-and-test.yaml'
       - 'src/nanoarrow/**'
 
-name: Build and Test C Library
-
 jobs:
-  build-and-test:
+  test-c:
 
     runs-on: ubuntu-latest
 
@@ -142,48 +142,8 @@ jobs:
         with:
           directory: build/cov
 
-  R-CMD-check:
-    runs-on: ${{ matrix.config.os }}
-    name: R / ${{ matrix.config.os }} (${{ matrix.config.r }})
-
-    strategy:
-      fail-fast: false
-      matrix:
-        config:
-          - {os: ubuntu-latest,   r: 'devel', http-user-agent: 'release'}
-
-    env:
-      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
-      R_KEEP_PKG_SOURCE: yes
-
-    steps:
-      - uses: actions/checkout@v2
-
-      # Probably a better way to do this, but for now do the vendor step manually
-      - name: Vendor nanoarrow into the R package
-        run: |
-          cd r
-          ./configure
-
-      - uses: r-lib/actions/setup-pandoc@v2
-      - uses: r-lib/actions/setup-r@v2
-        with:
-          r-version: ${{ matrix.config.r }}
-          http-user-agent: ${{ matrix.config.http-user-agent }}
-          use-public-rspm: true
-      - uses: r-lib/actions/setup-r-dependencies@v2
-        with:
-          extra-packages: any::rcmdcheck
-          needs: check
-          working-directory: r
-      - uses: r-lib/actions/check-r-package@v2
-        with:
-          upload-snapshots: true
-          working-directory: r
-
-  deploy:
-    name: Bundle and deploy
-    needs: build-and-test
+  bundle-dist:
+    needs: test-c
     runs-on: ubuntu-latest
     steps:
       - name: Checkout repo
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml
index 8439e5e..81e5595 100644
--- a/.github/workflows/docs.yaml
+++ b/.github/workflows/docs.yaml
@@ -1,4 +1,21 @@
-name: Build documentation
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: docs
 
 on:
   push:
@@ -7,6 +24,10 @@ on:
   pull_request:
     branches:
       - main
+    paths:
+      - '.github/workflows/docs.yaml'
+      - 'src/nanoarrow/**'
+      - 'r/**'
 
 jobs:
   docs:
diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml
index eb5d480..3c95aca 100644
--- a/.github/workflows/examples.yaml
+++ b/.github/workflows/examples.yaml
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Build and run examples
+name: examples
 
 on:
   push:
@@ -24,6 +24,10 @@ on:
   pull_request:
     branches:
       - main
+    paths:
+      - 'CMakeLists.txt'
+      - '.github/workflows/examples.yaml'
+      - 'src/nanoarrow/**'
 
 jobs:
   examples:
diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml
index 43a56d9..7d93578 100644
--- a/.github/workflows/python.yaml
+++ b/.github/workflows/python.yaml
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-name: Test Python
+name: test-python
 
 on:
   push:
diff --git a/.github/workflows/r-check.yaml b/.github/workflows/r-check.yaml
index 059afc2..9a87516 100644
--- a/.github/workflows/r-check.yaml
+++ b/.github/workflows/r-check.yaml
@@ -15,22 +15,23 @@
 # specific language governing permissions and limitations
 # under the License.
 
+name: test-r
+
 on:
   push:
-    branches: [main, master]
+    branches: main
   pull_request:
-    branches: [main, master]
+    branches: main
     paths:
       - '.github/workflows/r-check.yaml'
+      - 'src/nanoarrow/**'
       - 'r/**'
 
-name: R-CMD-check
-
 jobs:
 
   R-CMD-check:
     runs-on: ${{ matrix.config.os }}
-    name: R / ${{ matrix.config.os }} (${{ matrix.config.r }})
+    name: ${{ matrix.config.os }} (${{ matrix.config.r }})
 
     strategy:
       fail-fast: false
@@ -79,11 +80,3 @@ jobs:
           upload-snapshots: true
           working-directory: r
 
-      # Something about Arrow installed via GHA doesn't work with valgrind
-      # so we can't run it on CI :(
-      # - name: Run valgrind on r-devel
-      #   if: matrix.config.r == 'devel'
-      #   run: |
-      #     cd r
-      #     R CMD INSTALL .
-      #     echo "testthat::test_local()" | R --no-save -d "valgrind --tool=memcheck --leak-check=full --suppressions ../valgrind.supp"
diff --git a/.github/workflows/verify-source.yaml b/.github/workflows/verify-source.yaml
index 3831553..2df69cf 100644
--- a/.github/workflows/verify-source.yaml
+++ b/.github/workflows/verify-source.yaml
@@ -15,6 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+name: verify-rc
+
 on:
   push:
     branches:
@@ -23,12 +25,8 @@ on:
     branches:
       - main
     paths:
-      - 'CMakeLists.txt'
       - '.github/workflows/verify-source.yaml'
       - 'dev/release/verify-release-candidate.sh'
-      - 'src/nanoarrow/**'
-
-name: Release Candidate Verification
 
 jobs:
   verify-rc:
@@ -58,6 +56,10 @@ jobs:
       - uses: r-lib/actions/setup-r@v2
         with:
           use-public-rspm: true
+      - uses: r-lib/actions/setup-r-dependencies@v2
+        with:
+          needs: check
+          working-directory: src/r
 
       - name: Run dev/release/verify-release-candidate.sh
         run: |