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 50e8d0a chore: Move bundling into its own workflow (#192)
50e8d0a is described below
commit 50e8d0ac0eb5d773ee6fddeb4cee5992b6d37317
Author: Dewey Dunnington <[email protected]>
AuthorDate: Thu May 11 08:24:09 2023 -0400
chore: Move bundling into its own workflow (#192)
Before, bundling was done as part of the test workflows and were
separate for the core and IPC extensions. This led to some problems when
a PR touched both since there was an attempt to commit a bundle to main
that was out of step. This PR moves that to a separate workflow that can
be dispatched manually in case this fails.
---
.github/workflows/build-and-test-ipc.yaml | 45 ----------------
.github/workflows/build-and-test.yaml | 44 ----------------
.github/workflows/bundle.yaml | 86 +++++++++++++++++++++++++++++++
src/nanoarrow/nanoarrow.hpp | 1 +
4 files changed, 87 insertions(+), 89 deletions(-)
diff --git a/.github/workflows/build-and-test-ipc.yaml
b/.github/workflows/build-and-test-ipc.yaml
index cbb23ba..25987b1 100644
--- a/.github/workflows/build-and-test-ipc.yaml
+++ b/.github/workflows/build-and-test-ipc.yaml
@@ -135,48 +135,3 @@ jobs:
with:
name: nanoarrow-ipc-memcheck
path:
extensions/nanoarrow_ipc/build/Testing/Temporary/MemoryChecker.*.log
-
- bundle-dist-ipc:
- needs: test-c-ipc
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repo
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
-
- - name: Install dependencies
- run: |
- sudo apt-get install -y cmake
-
- - name: Create bundle
- run: |
- cd extensions/nanoarrow_ipc
- mkdir build && cd build
- cmake .. -DNANOARROW_IPC_BUNDLE=ON
- cmake --build .
- cmake --install . --prefix=../nanoarrow-latest
- cd ..
- zip nanoarrow-latest.zip nanoarrow-latest/nanoarrow_ipc.h
nanoarrow-latest/nanoarrow_ipc.c nanoarrow-latest/flatcc.c
nanoarrow-latest/flatcc/**
-
- - name: Upload bundle artifact
- uses: actions/upload-artifact@main
- with:
- name: nanoarrow-ipc-latest
- path: extensions/nanoarrow_ipc/nanoarrow-latest.zip
-
- - name: Commit bundle to dist/
- if: success() && github.repository == 'apache/arrow-nanoarrow' &&
github.ref == 'refs/heads/main'
- run: |
- cp -r extensions/nanoarrow_ipc/nanoarrow-latest/* dist/
- git add dist/**
-
- # only commit if there are changes
- git config --global user.email "[email protected]"
- git config --global user.name "GitHub Actions"
- UPDATED=`git diff --name-only --cached`
- if [ "$UPDATED" ]; then
- git commit -m "ipc: Update dist/ for commit ${{ github.sha }}"
- git push
- echo "$UPDATED"
- fi
diff --git a/.github/workflows/build-and-test.yaml
b/.github/workflows/build-and-test.yaml
index abe54e4..cafa80d 100644
--- a/.github/workflows/build-and-test.yaml
+++ b/.github/workflows/build-and-test.yaml
@@ -108,47 +108,3 @@ jobs:
with:
name: nanoarrow-memcheck
path: build/Testing/Temporary/MemoryChecker.*.log
-
- bundle-dist:
- needs: test-c
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repo
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
-
- - name: Install dependencies
- run: |
- sudo apt-get install -y cmake
-
- - name: Create bundle
- run: |
- mkdir build && cd build
- cmake .. -DNANOARROW_BUNDLE=ON
- cmake --build .
- cmake --install . --prefix=../nanoarrow-latest
- cd ..
- cp LICENSE.txt nanoarrow-latest/LICENSE.txt
- zip nanoarrow-latest.zip nanoarrow-latest/nanoarrow.h
nanoarrow-latest/nanoarrow.c nanoarrow-latest/nanoarrow.hpp
nanoarrow-latest/LICENSE.txt
-
- - name: Upload bundle artifact
- uses: actions/upload-artifact@main
- with:
- name: nanoarrow-latest
- path: nanoarrow-latest.zip
-
- - name: Commit bundle to dist/
- if: success() && github.repository == 'apache/arrow-nanoarrow' &&
github.ref == 'refs/heads/main'
- run: |
- cp nanoarrow-latest/nanoarrow.h nanoarrow-latest/nanoarrow.c
nanoarrow-latest/nanoarrow.hpp dist
- git add dist/**
-
- # only commit if there are changes
- git config --global user.email "[email protected]"
- git config --global user.name "GitHub Actions"
- UPDATED=`git diff --name-only --cached`
- if [ "$UPDATED" ]; then
- git commit -m "Update dist/ for commit ${{ github.sha }}"
- git push
- fi
diff --git a/.github/workflows/bundle.yaml b/.github/workflows/bundle.yaml
new file mode 100644
index 0000000..529a0d6
--- /dev/null
+++ b/.github/workflows/bundle.yaml
@@ -0,0 +1,86 @@
+# 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: bundle
+
+on:
+ pull_request:
+ branches:
+ - main
+ paths:
+ - '.github/workflows/bundle.yaml'
+ schedule:
+ - cron: '0 1 * * *'
+ workflow_dispatch:
+
+jobs:
+ bundle-dist:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Install dependencies
+ run: |
+ sudo apt-get install -y cmake
+
+ - name: Bundle nanoarrow
+ run: |
+ mkdir build && cd build
+ cmake .. -DNANOARROW_BUNDLE=ON
+ cmake --build .
+ cmake --install . --prefix=../nanoarrow-latest
+ cd ..
+ cp LICENSE.txt nanoarrow-latest/LICENSE.txt
+
+ - name: Bundle nanoarrow_ipc
+ run: |
+ cd extensions/nanoarrow_ipc
+ mkdir build && cd build
+ cmake .. -DNANOARROW_IPC_BUNDLE=ON
+ cmake --build .
+ cmake --install . --prefix=../../../nanoarrow-latest
+
+ - name: Compress bundle
+ run: |
+ zip nanoarrow-latest.zip $(find nanoarrow-latest -type f)
+
+ - name: Upload bundle artifact
+ uses: actions/upload-artifact@main
+ with:
+ name: nanoarrow-latest
+ path: nanoarrow-latest.zip
+
+ - name: Commit bundle to dist/
+ if: success() && github.repository == 'apache/arrow-nanoarrow' &&
github.ref == 'refs/heads/main'
+ run: |
+ mv dist/README.md dist-readme.md
+ rm -rf dist
+ mv nanoarrow-latest dist
+ mv dist-readme.md dist/README.md
+ git add dist/**/*.*
+
+ # only commit if there are changes
+ git config --global user.email "[email protected]"
+ git config --global user.name "GitHub Actions"
+ UPDATED=`git diff --name-only --cached`
+ if [ "$UPDATED" ]; then
+ git commit -m "Update dist/ for commit ${{ github.sha }}"
+ git push
+ fi
diff --git a/src/nanoarrow/nanoarrow.hpp b/src/nanoarrow/nanoarrow.hpp
index e6adb3a..8dcd16c 100644
--- a/src/nanoarrow/nanoarrow.hpp
+++ b/src/nanoarrow/nanoarrow.hpp
@@ -17,6 +17,7 @@
#include <stdexcept>
#include <vector>
+#include <string>
#include "nanoarrow.h"