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/11/14 11:53:01 UTC

[avro] branch avro-3653-arm64-on-github-actions updated (c69010f25 -> eb5a28764)

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 c69010f25 AVRO-3653: [CI] Override env.GITHUB_WORKFLOW
 discard a6c82ac6f AVRO-3653: [CI] Add jobs for all SDKs
 discard b2d24fec3 AVRO-3653: [CI] Use Github Actions with QEMU for testing on Linux ARM64
     add e2d59b29d Improve formatting of Avro types and JSON code (#1934)
     add 50a12a3bb Improve generated comments and compiler option description (#1935)
     add 04f024369 Bump darling from 0.14.1 to 0.14.2 in /lang/rust (#1936)
     add fb4625ec4 Bump protobuf-java from 3.21.8 to 3.21.9 in /lang/java (#1938)
     add 382ceb1e5 Bump typed-builder from 0.10.0 to 0.11.0 in /lang/rust (#1939)
     add a6b5879b5 AVRO-3661: [Rust] Fix new clippy errors introduced with Rust 1.65 (#1941)
     add 965e0a2df AVRO-3532: Test field names in C# (#1866)
     add 183474281 AVRO-3659: Typo in python example (#1942)
     add efb977928 Bump commons-compress from 1.21 to 1.22 in /lang/java (#1943)
     add 48b9bacf3 AVRO-3663: [Rust] Allow raw identifiers as field names (#1945)
     add edd59e166 Bump jackson-bom from 2.12.7.20221012 to 2.14.0 in /lang/java (#1944)
     add 2a7ab42f5 Bump regex from 1.6.0 to 1.7.0 in /lang/rust (#1947)
     add f4f18d929 Bump env_logger from 0.9.1 to 0.9.3 in /lang/rust (#1946)
     add 73d208fa6 AVRO-3653: [CI] Remove Travis-ci config files (#1948)
     add 8917a8bc9 Use fully qualified names for darling::FromAttributes and syn::Error (#1953)
     add e93a2ab34 Bump actions/dependency-review-action from 2 to 3 (#1958)
     add 00c1826ae Bump netty-bom from 4.1.84.Final to 4.1.85.Final in /lang/java (#1959)
     add 2cb323c9d Bump jshint from 2.13.5 to 2.13.6 in /lang/js (#1957)
     add ddccc04dc AVRO-3669: [python] Add py.typed marker file (PEP561 compliance) (#1952)
     add 35d462e65 AVRO-3657: Computation of initial buffer size in OutputBuffer makes no sense (#1960)
     add 53cdb411e AVRO-3667: [Python] Python 3.10 CI test fails since a while (#1962)
     add 432f073c3 AVRO-3672: Add CI testing for Python 3.11 (#1961)
     add 35545f9de AVRO-3662: It seems Ruby 2.6 sometimes retains '2' (#1963)
     new 97fc62c62 AVRO-3653: [CI] Use Github Actions with QEMU for testing on Linux ARM64
     new 7dda31307 AVRO-3653: [CI] Add jobs for all SDKs
     new eb5a28764 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   (c69010f25)
            \
             N -- N -- N   refs/heads/avro-3653-arm64-on-github-actions (eb5a28764)

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 3 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-lang-py.yml                 |   2 +
 .github/workflows/test-lang-rust-audit.yml         |   2 +-
 .travis.yml                                        | 222 ---------------------
 .travis/before_install.sh                          |  44 ----
 .../++version++/Getting started (Python)/_index.md |   2 +-
 .../en/docs/++version++/Specification/_index.md    |  16 +-
 .../src/apache/test/Generic/GenericRecordTests.cs  |  18 ++
 lang/csharp/src/apache/test/Schema/SchemaTests.cs  |  19 ++
 .../specific/templates/java/classic/record.vm      |   4 +-
 .../org/apache/avro/mojo/AbstractAvroMojo.java     |   3 +-
 lang/java/pom.xml                                  |   8 +-
 .../main/java/org/apache/trevni/OutputBuffer.java  |   6 +-
 lang/js/package-lock.json                          |   6 +-
 lang/py/MANIFEST.in                                |   1 +
 lang/py/avro/compatibility.py                      |   5 +-
 .../_SUCCESS => py/avro/py.typed}                  |   0
 lang/py/setup.cfg                                  |   3 +-
 lang/ruby/test/test_logical_types.rb               |   4 +-
 lang/rust/Cargo.lock                               |  24 +--
 lang/rust/avro/Cargo.toml                          |   4 +-
 lang/rust/avro/benches/serde.rs                    |  38 ++--
 lang/rust/avro/benches/serde_json.rs               |   2 +-
 lang/rust/avro/src/encode.rs                       |   2 +-
 lang/rust/avro/src/schema.rs                       |   2 +-
 lang/rust/avro_derive/Cargo.toml                   |   2 +-
 lang/rust/avro_derive/src/lib.rs                   |  21 +-
 lang/rust/avro_derive/tests/derive.rs              |  16 ++
 lang/rust/avro_test_helper/Cargo.toml              |   2 +-
 pom.xml                                            |   3 +-
 29 files changed, 134 insertions(+), 347 deletions(-)
 delete mode 100644 .travis.yml
 delete mode 100755 .travis/before_install.sh
 copy lang/{java/mapred/src/test/resources/org/apache/avro/mapreduce/mapreduce-test-input.avro/_SUCCESS => py/avro/py.typed} (100%)
 mode change 100755 => 100644


[avro] 03/03: 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 eb5a28764fee33d5255396e76de7e14b31cfc191
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 | 69 ++++++++++++++++++++++++++++++----------
 lang/py/avro/test/test_bench.py  |  5 +--
 2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/.github/workflows/test-arm64.yml b/.github/workflows/test-arm64.yml
index 06b9a11d3..44f35a82c 100644
--- a/.github/workflows/test-arm64.yml
+++ b/.github/workflows/test-arm64.yml
@@ -9,7 +9,7 @@ on:
 jobs:
   java:
     name: Java on Linux ARM64
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04-xl
 
     steps:
       - name: Checkout
@@ -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
@@ -131,7 +141,7 @@ jobs:
 
   python:
     name: Python on Linux ARM64
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04-xl
 
     steps:
       - name: Checkout
@@ -140,17 +150,27 @@ jobs:
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
+          env: |
+            GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}
+            BENCH_MAX_WRITE_SECONDS: 300 
+            BENCH_MAX_READ_SECONDS: 300
           arch: aarch64
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
           dockerRunArgs: |
-            --volume "${PWD}:/avro"  --workdir /avro/lang/py
+            --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
+            echo $BENCH_MAX_WRITE_SECONDS
+            echo $BENCH_MAX_READ_SECONDS
+            git config --global --add safe.directory /avro
             ./build.sh clean test
 
   ruby:
@@ -173,6 +193,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 }}
@@ -188,7 +210,7 @@ jobs:
 
   rust:
     name: Rust on Linux ARM64
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04-xl
 
     steps:
       - name: Checkout
@@ -212,17 +234,21 @@ 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
-            ./build.sh clean test
+            cargo test --all --jobs 1
+#            ./build.sh clean test
 
   perl:
     name: Perl on Linux ARM64
@@ -235,6 +261,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 +292,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 +317,8 @@ jobs:
   javascript:
     name: JavaScript on Linux ARM64
     runs-on: ubuntu-latest
+    env:
+      NODE_VERSION: "16.18.0"
 
     steps:
       - name: Checkout
@@ -300,18 +332,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):


[avro] 02/03: AVRO-3653: [CI] Add jobs for all SDKs

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 7dda313074e76e6ef12b25a44e86271fc8fda6f6
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Oct 25 15:25:36 2022 +0300

    AVRO-3653: [CI] Add jobs for all SDKs
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 .github/workflows/test-arm64.yml | 282 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 278 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/test-arm64.yml b/.github/workflows/test-arm64.yml
index 19efe527e..06b9a11d3 100644
--- a/.github/workflows/test-arm64.yml
+++ b/.github/workflows/test-arm64.yml
@@ -15,6 +15,14 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v3
 
+      - name: Cache Local Maven Repository
+        uses: actions/cache@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
+
       - name: Build
         uses: uraimo/run-on-arch-action@v2
         with:
@@ -22,13 +30,12 @@ jobs:
           distro: ubuntu20.04
           githubToken: ${{ github.token }}
           dockerRunArgs: |
-            --volume "${PWD}:/avro"
+            --volume "${PWD}:/avro" --volume "${HOME}/.m2:/root/.m2" --workdir /avro/lang/java
           install: |
             apt-get update -q
             apt-get install -q -y openjdk-8-jdk wget tar
           run: |
             set -x
-            cd /avro
             export MAVEN_VERSION="3.8.5"
             wget https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz
             tar zxvf apache-maven-$MAVEN_VERSION-bin.tar.gz
@@ -37,7 +44,274 @@ jobs:
             export PATH="$M2_HOME/bin:$JAVA_HOME/bin:$PATH"
             java -version
             mvn -version
-            cd lang/java
             ./build.sh clean test
             
-      
+  c:
+    name: C on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --volume "${PWD}:/avro"  --workdir /avro/lang/c
+          install: |
+            apt-get update -q
+            apt-get install -q -y libjansson-dev liblzma-dev libsnappy-dev cmake
+          run: |
+            set -x
+            ./build.sh clean test
+
+  cplusplus:
+    name: C++ on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --volume "${PWD}:/avro"  --workdir /avro/lang/c++
+          install: |
+            apt-get update -q
+            apt-get install -q -y libboost-all-dev cmake
+          run: |
+            set -x
+            ./build.sh clean test
+
+  csharp:
+    name: C# on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Cache Nuget
+        uses: actions/cache@v3
+        with:
+          path: ~/.nuget/packages
+          key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
+          restore-keys: |
+            ${{ runner.os }}-nuget-
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --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
+            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
+          run: |
+            set -x
+            export PATH=$HOME/.dotnet:$PATH
+            dotnet --list-sdks
+            ./build.sh clean test
+
+  python:
+    name: Python on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --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
+            python3 -m pip install --upgrade pip setuptools tox-wheel
+          run: |
+            set -x
+            ./build.sh clean test
+
+  ruby:
+    name: Ruby on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Cache gems
+        uses: actions/cache@v3
+        with:
+          path: .gem
+          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
+          restore-keys: |
+            ${{ runner.os }}-gems-
+
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --volume "${PWD}:/avro" --workdir /avro/lang/ruby
+          install: |
+            apt-get update -q
+            apt-get install -q -y ruby-dev bundler libsnappy-dev
+          run: |
+            set -x
+            ./build.sh clean test
+  
+
+  rust:
+    name: Rust on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Cache Cargo
+        uses: actions/cache@v3
+        with:
+          # these represent dependencies downloaded by cargo
+          # and thus do not depend on the OS, arch nor rust version.
+          path: ~/.cargo
+          key: cargo-cache1-
+      - name: Cache Rust dependencies
+        uses: actions/cache@v3
+        with:
+          # these represent compiled steps of both dependencies and avro
+          # and thus are specific for a particular OS, arch and rust version.
+          path: ~/target
+          key: ${{ runner.os }}-target-cache1-${{ matrix.rust }}-
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          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: |
+            apt-get update -q
+            apt-get install -q -y cargo
+          run: |
+            set -x
+            ./build.sh clean test
+
+  perl:
+    name: Perl on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --volume "${PWD}:/avro" --workdir /avro/lang/perl
+          install: |
+            apt-get update -q
+            apt-get install -q -y libjansson-dev libcompress-raw-zlib-perl libcpan-uploader-perl libencode-perl libio-string-perl libjson-xs-perl libmodule-install-perl libmodule-install-readmefrompod-perl libobject-tiny-perl libperl-critic-perl libsnappy-dev libtest-exception-perl libtest-pod-perl cpanminus make gcc wget
+            cpanm Error::Simple
+            cpanm Regexp::Common
+            cpanm Try::Tiny
+            cpanm Compress::Zstd
+            cpanm Module::Install::Repository
+            cpanm inc::Module::Install
+          run: |
+            set -x
+            ./build.sh clean test
+
+  php:
+    name: PHP on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --volume "${PWD}:/avro" --workdir /avro/lang/php
+          install: |
+            apt-get update -q
+            apt-get install -q -y wget php php-xml php-mbstring php-curl php-gmp php-bz2 unzip libtidy-dev libpq5
+            php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
+            php -r "if (hash_file('sha384', 'composer-setup.php') === file_get_contents('https://composer.github.io/installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
+            php composer-setup.php --version=2.2.5
+            php -r "unlink('composer-setup.php');"
+            mv composer.phar /usr/local/bin/composer
+          run: |
+            set -x
+            echo $PATH
+            which composer
+            composer --version
+            ./build.sh clean test
+
+  javascript:
+    name: JavaScript on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Cache Npm
+        uses: actions/cache@v3
+        with:
+          path: ~/.npm
+          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
+          restore-keys: |
+            ${{ runner.os }}-node-
+
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --volume "${PWD}:/avro" --volume "$HOME/.npm:/root/.npm" --workdir /avro/lang/js
+          install: |
+            apt-get update -q
+            apt-get install -q -y nodejs
+          run: |
+            set -x
+            ./build.sh clean test


[avro] 01/03: AVRO-3653: [CI] Use Github Actions with QEMU for testing on Linux ARM64

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 97fc62c620f1ee1e9996ea5bc91ab94f44b4944e
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Oct 25 13:57:28 2022 +0300

    AVRO-3653: [CI] Use Github Actions with QEMU for testing on Linux ARM64
    
    Migrate the Java build from .travis.yaml
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 .github/workflows/test-arm64.yml | 43 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/.github/workflows/test-arm64.yml b/.github/workflows/test-arm64.yml
new file mode 100644
index 000000000..19efe527e
--- /dev/null
+++ b/.github/workflows/test-arm64.yml
@@ -0,0 +1,43 @@
+name: CI on Linux ARM64
+
+on:
+  push:
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  java:
+    name: Java on Linux ARM64
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Build
+        uses: uraimo/run-on-arch-action@v2
+        with:
+          arch: aarch64
+          distro: ubuntu20.04
+          githubToken: ${{ github.token }}
+          dockerRunArgs: |
+            --volume "${PWD}:/avro"
+          install: |
+            apt-get update -q
+            apt-get install -q -y openjdk-8-jdk wget tar
+          run: |
+            set -x
+            cd /avro
+            export MAVEN_VERSION="3.8.5"
+            wget https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz
+            tar zxvf apache-maven-$MAVEN_VERSION-bin.tar.gz
+            export M2_HOME=$PWD/apache-maven-$MAVEN_VERSION
+            export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-arm64"
+            export PATH="$M2_HOME/bin:$JAVA_HOME/bin:$PATH"
+            java -version
+            mvn -version
+            cd lang/java
+            ./build.sh clean test
+            
+