You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/10/25 21:46:55 UTC

[avro] branch avro-3653-arm64-on-github-actions updated (d9f70f30d -> 1c6538b3b)

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

mgrigorov pushed a change to branch avro-3653-arm64-on-github-actions
in repository https://gitbox.apache.org/repos/asf/avro.git


 discard d9f70f30d AVRO-3653: [CI] Override env.GITHUB_WORKFLOW
     new 1c6538b3b AVRO-3653: [CI] Override env.GITHUB_WORKFLOW

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (d9f70f30d)
            \
             N -- N -- N   refs/heads/avro-3653-arm64-on-github-actions (1c6538b3b)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/test-arm64.yml | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)


[avro] 01/01: AVRO-3653: [CI] Override env.GITHUB_WORKFLOW

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch avro-3653-arm64-on-github-actions
in repository https://gitbox.apache.org/repos/asf/avro.git

commit 1c6538b3b1f191a70c1b13b19815e4c5e863b531
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Oct 25 16:39:53 2022 +0300

    AVRO-3653: [CI] Override env.GITHUB_WORKFLOW
    
    This is a workaround for https://github.com/uraimo/run-on-arch-action/pull/100
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 .github/workflows/test-arm64.yml | 57 +++++++++++++++++++++++++++++++---------
 lang/py/avro/test/test_bench.py  |  5 ++--
 2 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/test-arm64.yml b/.github/workflows/test-arm64.yml
index 06b9a11d3..66fac64fc 100644
--- a/.github/workflows/test-arm64.yml
+++ b/.github/workflows/test-arm64.yml
@@ -26,6 +26,8 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
@@ -57,14 +59,16 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
           dockerRunArgs: |
-            --volume "${PWD}:/avro"  --workdir /avro/lang/c
+            --volume "${PWD}:/avro" --workdir /avro/lang/c
           install: |
             apt-get update -q
-            apt-get install -q -y libjansson-dev liblzma-dev libsnappy-dev cmake
+            apt-get install -q -y cmake liblzma-dev libsnappy-dev libjansson-dev zlib1g-dev pkg-config
           run: |
             set -x
             ./build.sh clean test
@@ -80,6 +84,8 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
@@ -87,7 +93,7 @@ jobs:
             --volume "${PWD}:/avro"  --workdir /avro/lang/c++
           install: |
             apt-get update -q
-            apt-get install -q -y libboost-all-dev cmake
+            apt-get install -q -y gcc g++ libboost-all-dev cmake
           run: |
             set -x
             ./build.sh clean test
@@ -95,6 +101,8 @@ jobs:
   csharp:
     name: C# on Linux ARM64
     runs-on: ubuntu-latest
+    env:
+      GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
 
     steps:
       - name: Checkout
@@ -111,6 +119,8 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
@@ -118,11 +128,11 @@ jobs:
             --volume "${PWD}:/avro" --volume "$HOME/.nuget/packages:/root/.nuget/packages"  --workdir /avro/lang/csharp
           install: |
             apt-get update -q
-            apt-get install -q -y wget libzstd-dev
+            apt-get install -q -y wget libzstd-dev libicu-dev
             wget https://dot.net/v1/dotnet-install.sh
-            ./dotnet-install.sh --channel "3.1" --install-dir "$HOME/.dotnet" # 3.1
-            ./dotnet-install.sh --channel "5.0" --install-dir "$HOME/.dotnet" # 5.0
-            ./dotnet-install.sh --channel "6.0" --install-dir "$HOME/.dotnet" # 6.0
+            bash ./dotnet-install.sh --channel "3.1" --install-dir "$HOME/.dotnet" # 3.1
+            bash ./dotnet-install.sh --channel "5.0" --install-dir "$HOME/.dotnet" # 5.0
+            bash ./dotnet-install.sh --channel "6.0" --install-dir "$HOME/.dotnet" # 6.0
           run: |
             set -x
             export PATH=$HOME/.dotnet:$PATH
@@ -140,6 +150,8 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
@@ -147,11 +159,15 @@ jobs:
             --volume "${PWD}:/avro"  --workdir /avro/lang/py
           install: |
             apt-get update -q
-            apt-get install -q -y python3.9 python3-pip libbz2-dev libjansson-dev liblzma-dev libsnappy-dev libzstd-dev
+            apt-get install -q -y software-properties-common 
+            add-apt-repository -y ppa:deadsnakes/ppa
+            apt-get update -q
+            apt-get install -q -y python3.6 python3.7 python3.8 python3.9 python3.10 python3-pip git libbz2-dev libjansson-dev liblzma-dev libsnappy-dev libzstd-dev
             python3 -m pip install --upgrade pip setuptools tox-wheel
           run: |
             set -x
-            ./build.sh clean test
+            git config --global --add safe.directory /avro
+            BENCH_MAX_WRITE_SECONDS=300 BENCH_MAX_READ_SECONDS=300 ./build.sh test
 
   ruby:
     name: Ruby on Linux ARM64
@@ -173,6 +189,8 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
@@ -212,16 +230,20 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
           dockerRunArgs: |
             --volume "${PWD}:/avro" --volume "$HOME/.cargo:/root/.cargo" --volume "$HOME/target:/root/avro/target"  --workdir /avro/lang/rust
           install: |
+            set -x
             apt-get update -q
-            apt-get install -q -y cargo
+            apt-get install -q -y cargo rustc
           run: |
             set -x
+            cargo --version
             ./build.sh clean test
 
   perl:
@@ -235,6 +257,8 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
@@ -264,6 +288,8 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
@@ -287,6 +313,8 @@ jobs:
   javascript:
     name: JavaScript on Linux ARM64
     runs-on: ubuntu-latest
+    env:
+      NODE_VERSION: "16.18.0"
 
     steps:
       - name: Checkout
@@ -300,18 +328,23 @@ jobs:
           restore-keys: |
             ${{ runner.os }}-node-
 
-
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
           dockerRunArgs: |
             --volume "${PWD}:/avro" --volume "$HOME/.npm:/root/.npm" --workdir /avro/lang/js
           install: |
+            set -x
             apt-get update -q
-            apt-get install -q -y nodejs
+            apt-get install -q -y wget tar xz-utils
+            wget https://nodejs.org/dist/v${{ env.NODE_VERSION }}/node-v${{ env.NODE_VERSION }}-linux-arm64.tar.xz
+            tar xf node-v${{ env.NODE_VERSION }}-linux-arm64.tar.xz
           run: |
             set -x
+            export PATH=/node-v${{ env.NODE_VERSION }}-linux-arm64/bin:$PATH
             ./build.sh clean test
diff --git a/lang/py/avro/test/test_bench.py b/lang/py/avro/test/test_bench.py
index f032dda02..d6ee49f59 100644
--- a/lang/py/avro/test/test_bench.py
+++ b/lang/py/avro/test/test_bench.py
@@ -19,6 +19,7 @@
 
 import argparse
 import json
+import os
 import platform
 import random
 import string
@@ -54,8 +55,8 @@ SCHEMA = cast(
 READER = avro.io.DatumReader(SCHEMA)
 WRITER = avro.io.DatumWriter(SCHEMA)
 NUMBER_OF_TESTS = 10000
-MAX_WRITE_SECONDS = 10 if platform.python_implementation() == "PyPy" else 3
-MAX_READ_SECONDS = 10 if platform.python_implementation() == "PyPy" else 3
+MAX_WRITE_SECONDS = 10 if platform.python_implementation() == "PyPy" else os.environ.get('BENCH_MAX_WRITE_SECONDS', 3)
+MAX_READ_SECONDS = 10 if platform.python_implementation() == "PyPy" else os.environ.get('BENCH_MAX_READ_SECONDS', 3)
 
 
 class TestBench(unittest.TestCase):