-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.65 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Java CI
on: [push]
jobs:
build_faiss:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
submodules: true
- uses: whoan/docker-build-with-cache-action@v5
with:
username: ${{ github.actor }}
password: "${{ secrets.GITHUB_TOKEN }}"
registry: docker.pkg.github.com
#or
#registry: ghcr.io
image_name: jfaiss-cpu
dockerfile: Dockerfile
# - name: Run the docker image
# uses: ./.github/actions
# - name: Debugging with tmate
# uses: mxschmitt/action-tmate@v3
# - run: docker image ls
- run: docker run -v "/home/runner/work/jfaiss-cpu/jfaiss-cpu":"/github/workspace" docker.pkg.github.com/criteo/jfaiss-cpu/jfaiss-cpu
- uses: actions/upload-artifact@v4
with:
name: faiss_JNI_and_SO
path: build
build:
needs: build_faiss
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Download build
uses: actions/download-artifact@v4
with:
name: faiss_JNI_and_SO
path: build_copy
- name: Move
run: |
rm -rf src/main/java/com/vectorsearch/faiss/swig
cp -r build_copy/java/com/vectorsearch/faiss/swig src/main/java/com/vectorsearch/faiss/swig
rm -rf src/main/resources
cp -r build_copy/resources src/main/resources
# - name: Debugging with tmate
# uses: mxschmitt/action-tmate@v3
- name: Publish package
run: mvn -B deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}