Test AL2 env for knn build #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test k-NN | |
on: | |
push: | |
branches: | |
- "*" | |
- "feature/**" | |
pull_request: | |
branches: | |
- "*" | |
- "feature/**" | |
jobs: | |
Build-k-NN-Linux: | |
name: Build and Test k-NN Plugin on Linux | |
runs-on: ubuntu-latest | |
container: | |
image: junqiuamz/ci-runner:knn-al2-1 | |
options: --user root | |
steps: | |
- name: Checkout k-NN | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup git user | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Setup Java 21 | |
run: | | |
export JAVA_HOME=/opt/java/openjdk-21 | |
export PATH=$PATH:$JAVA_HOME/bin | |
java -version | |
- name: Run build | |
run: | | |
if lscpu | grep -i avx2; then | |
echo "avx2 available on system" | |
./gradlew build | |
else | |
echo "avx2 not available on system" | |
./gradlew build -Dsimd.enabled=false | |
fi | |
- name: Upload Coverage Report | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |