Skip to content

Commit

Permalink
overhaul build process
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmerk committed Dec 28, 2023
1 parent 1db0119 commit e9c45c9
Show file tree
Hide file tree
Showing 79 changed files with 530 additions and 3,541 deletions.
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Description & motivation
Please provide some context for your reviewers
- *What does this PR do?*
- *Why does this PR do it?*

# Verification
Please describe how you verified that the change works as intended
- *Did you add a unit test?*
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI pipeline

on:
pull_request:
paths:
- '**'
push:
branches:
- '*'
tags-ignore:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
ci-pipeline:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
spark:
# - 2.4.8
# - 3.0.2
# - 3.1.3
- 3.2.4
# - 3.3.2
# - 3.4.1
# - 3.5.0
env:
ENV: 'ci'
SPARK_VERSION: ${{ matrix.spark }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build and test
run: |
sbt -java-home "$JAVA_HOME_17_X64" clean +test +publishM2 pyTest -DsparkVersion="$SPARK_VERSION"
- name: Publish Unit test results
uses: mikepenz/action-junit-report@v4
with:
report_paths: '**/target/test-reports/TEST-*.xml'
check_name: Unit test results
if: always()
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish pipeline

on:
workflow_dispatch:

push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
publish-artifacts:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
spark:
# - 2.4.8
# - 3.0.2
# - 3.1.3
- 3.2.4
# - 3.3.2
# - 3.4.1
# - 3.5.0

env:
ENV: 'ci'
SPARK_VERSION: ${{ matrix.spark }}
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v1
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish artifacts
run: |
sbt -java-home "$JAVA_HOME_17_X64" clean +publishSigned -DsparkVersion="$SPARK_VERSION"
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release pipeline

on:
workflow_dispatch:
inputs:
version:
description: Semantic version. For example 1.0.0
required: true

jobs:
ci-pipeline:
runs-on: ubuntu-22.04
steps:
- name: Checkout main branch
uses: actions/checkout@v3
- name: Release
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git tag -a v${{ github.event.inputs.version }} -m "next release"
git push --tags
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# Intellij idea
.idea/
.bsp/
*.iml

# vscode with metals
.bloop/
.vscode/
.metals/
metals.sbt

# output folders
target/
dist/

# MacOS
.DS_Store

# Virtual env
.venv

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/
110 changes: 0 additions & 110 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 0 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties

This file was deleted.

1 change: 1 addition & 0 deletions .sbtopts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-J--enable-preview -J--add-modules=jdk.incubator.vector -Dsbt.argsfile=false
5 changes: 5 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.9-amzn
scala=2.12.18
sbt=1.9.8
24 changes: 0 additions & 24 deletions .travis-toolchains.xml

This file was deleted.

21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://app.travis-ci.com/jelmerk/hnswlib.svg?branch=master)](https://app.travis-ci.com/jelmerk/hnswlib)
[![Build Status](https://github.com/jelmerk/hnswlib/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jelmerk/hnswlib/actions/workflows/ci.yml)

Hnswlib
=======
Expand Down
37 changes: 0 additions & 37 deletions RELEASING.md

This file was deleted.

Loading

0 comments on commit e9c45c9

Please sign in to comment.