-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (117 loc) · 3.14 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-linux:
runs-on: ubuntu-latest
container: gcc:10-buster
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Make
run: cd src/main/native && make -j4
- name: Upload shared library
uses: actions/upload-artifact@v4
with:
name: linux_lib
path: src/main/native/libfasttext.so
test-linux:
runs-on: ubuntu-latest
needs: build-linux
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: 'true'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Download shared library
uses: actions/download-artifact@v4
with:
name: linux_lib
path: src/main/resources/com/diffbot/fasttext
- name: Test
run: ./gradlew test
build-macos-x86:
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Make
run: |
cd src/main/native
make -j4
ls -la
mv libfasttext.so libfasttext-mac-x86_64.so
- name: Upload shared library
uses: actions/upload-artifact@v4
with:
name: macos_x86_lib
path: src/main/native/libfasttext-mac-x86_64.so
test-macos-x86:
runs-on: macos-13
needs: build-macos-x86
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: 'true'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Download shared library
uses: actions/download-artifact@v4
with:
name: macos_x86_lib
path: src/main/resources/com/diffbot/fasttext
- name: Test
run: ./gradlew test
build-macos-arm64:
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Make
run: |
cd src/main/native
clang --version
clang -print-targets
make -j4 CXXFLAGS=' -std=c++11 -mcpu=apple-m1 -fPIC'
ls -la
mv libfasttext.so libfasttext-mac-aarch64.so
- name: Upload shared library
uses: actions/upload-artifact@v4
with:
name: macos_arm64_lib
path: src/main/native/libfasttext-mac-aarch64.so
test-macos-arm64:
runs-on: macos-14
needs: build-macos-arm64
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: 'true'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Download shared library
uses: actions/download-artifact@v4
with:
name: macos_arm64_lib
path: src/main/resources/com/diffbot/fasttext
- name: Test
run: ./gradlew test