diff --git a/.github/workflows/test-arm64.yml b/.github/workflows/test-arm64.yml index 06b9a11d3d0..0b97d2d4328 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,17 @@ 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 + export BENCH_MAX_WRITE_SECONDS=300 + export BENCH_MAX_READ_SECONDS=300 + ./build.sh test ruby: name: Ruby on Linux ARM64 @@ -173,6 +191,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 +232,24 @@ 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 curl file + ln -s $SHELL /tmp/shell # workaround for https://github.com/rust-lang/rustup/issues/2700 + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sed 's#/proc/self/exe#/tmp/shell#g' | bash -s -- -y --default-host aarch64-unknown-linux-gnu --default-toolchain stable run: | set -x + file $HOME/.cargo/bin/cargo + export PATH=$HOME/.cargo/bin:$PATH + cargo --version ./build.sh clean test perl: @@ -235,6 +263,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 +294,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 +319,8 @@ jobs: javascript: name: JavaScript on Linux ARM64 runs-on: ubuntu-latest + env: + NODE_VERSION: "16.18.0" steps: - name: Checkout @@ -300,18 +334,25 @@ 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 + ls -la /avro/lang/js/ + ls -la /avro/lang/js/node-v16.18.0-linux-arm64/bin + export PATH=$PWD/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 f032dda0260..d6ee49f591b 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 @@ 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):