From 2d9aef0d331c5d0589944569561ce8d52fe0678e Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Sun, 24 Nov 2024 04:30:00 +0800 Subject: [PATCH] native --- .github/workflows/build_and_test.yml | 51 ++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index a0d504951908d..6ca7dab6ef2d1 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -79,10 +79,57 @@ jobs: java-version: ${{ matrix.java }} cache: 'maven' check-latest: false + - name: Prepare Environment + run: | + WORKING_DIR=$PWD + cd dev-support/docker + export DEBIAN_FRONTEND=noninteractive + export DEBCONF_TERSE=true + ###### + # Platform package dependency resolver + ###### + chmod a+x pkg-resolver/*.sh pkg-resolver/*.py + chmod a+r pkg-resolver/*.json + ###### + # Install packages from apt + ###### + sudo chmod a+w /etc + sudo apt-get -q update + sudo apt-get -q install -y --no-install-recommends \ + bats clang doxygen gnupg-agent hugo libcurl4-openssl-dev libprotobuf-dev libprotoc-dev libsasl2-dev libsnappy-dev libzstd-dev yasm + sudo apt-get clean + sudo rm -rf /var/lib/apt/lists/* + export LANG='en_US.UTF-8' + export LANGUAGE='en_US:en' + export LC_ALL='en_US.UTF-8' + export PYTHONIOENCODING=utf-8 + ####### + # Set env vars for SpotBugs 4.2.2 + ####### + export SPOTBUGS_HOME=/opt/spotbugs + ####### + # Set env vars for Google Protobuf 3.21.12 + ####### + export PROTOBUF_HOME=/opt/protobuf + export PATH="${PATH}:/opt/protobuf/bin" + ####### + # Skip gpg verification when downloading Yetus via yetus-wrapper + ####### + export HADOOP_SKIP_YETUS_VERIFICATION=true + ####### + # Install packages + ####### + sudo pkg-resolver/install-common-pkgs.sh + sudo pkg-resolver/install-spotbugs.sh ubuntu:focal + sudo pkg-resolver/install-boost.sh ubuntu:focal + sudo pkg-resolver/install-protobuf.sh ubuntu:focal + sudo pkg-resolver/install-hadolint.sh ubuntu:focal + sudo pkg-resolver/install-intel-isa-l.sh ubuntu:focal + cd $WORKING_DIR - name: Build - run: mvn ${{ matrix.modules }} clean install -am -DskipTests + run: mvn ${{ matrix.modules }} -Pnative clean install -am -DskipTests - name: Test - run: mvn ${{ matrix.modules }} test -Dsurefire.excludesFile=$PWD/dev-support/java-17/exclude-tests.txt + run: mvn ${{ matrix.modules }} -Pnative test -Dsurefire.excludesFile=$PWD/dev-support/java-17/exclude-tests.txt - name: Upload test logs if: failure() uses: actions/upload-artifact@v3