Skip to content

Commit 1b3e556

Browse files
test release
1 parent 6ea50b0 commit 1b3e556

File tree

1 file changed

+115
-39
lines changed

1 file changed

+115
-39
lines changed

.github/workflows/github_actions.yml

Lines changed: 115 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ jobs:
106106
ORG_GRADLE_PROJECT_TILEDB_S3: OFF
107107

108108
Create_Artifacts_Windows:
109-
if: startsWith(github.ref, 'refs/tags/') || contains(github.ref, 'test')
110109
needs: [Test_Windows, Examples]
111110
name: Create_Artifacts_Windows
112111
runs-on: windows-2019
@@ -153,14 +152,21 @@ jobs:
153152
ORG_GRADLE_PROJECT_TILEDB_S3: ON
154153

155154
Create_Artifacts_Ubuntu_MacOS:
156-
if: startsWith(github.ref, 'refs/tags/') || contains(github.ref, 'test')
157155
needs: [Test_Ubuntu_macOS, Examples]
158156
name: Create_Artifacts_Ubuntu_MacOS
159157
runs-on: ${{ matrix.os }}
160158
strategy:
161159
matrix:
162160
os: [ macos-11, ubuntu-latest, macos-13-xlarge]
163161
steps:
162+
163+
- name: Set up Java
164+
uses: actions/setup-java@v3
165+
with:
166+
distribution: 'adopt'
167+
java-version: '11'
168+
check-latest: true
169+
164170
- name: checkout
165171
uses: actions/checkout@v3
166172

@@ -178,9 +184,9 @@ jobs:
178184
if [[ "$RUNNER_OS" == "macOS" ]]; then
179185
if [[ "$(uname -m)" == "arm64" ]]; then
180186
echo "ARM Mac";
181-
mkdir binaries_$RUNNER_OS/arm
187+
mkdir -p binaries_apple_silicon/arm
182188
./gradlew -PTILEDB_AZURE=ON assemble
183-
cp ./build/tiledb_jni/arm/*.dylib ./build/install/arm/lib/*.dylib binaries_$RUNNER_OS/arm
189+
cp ./build/tiledb_jni/arm/*.dylib ./build/install/arm/lib/*.dylib binaries_apple_silicon/arm
184190
else
185191
./gradlew -PTILEDB_AZURE=ON assemble
186192
cp ./build/tiledb_jni/*.dylib ./build/install/lib/*.dylib binaries_$RUNNER_OS/
@@ -190,21 +196,15 @@ jobs:
190196
name: 'Build and Upload (Ubuntu and OSX)'
191197
192198
- run: |
193-
set -e pipefail
194-
# Display log files if the build failed
195-
echo "Dumping log files for failed build"
196-
echo "----------------------------------"
197-
for f in $(find $BUILD_REPOSITORY_LOCALPATH -name *.log);
198-
do echo "------"
199-
echo $f
200-
echo "======"
201-
cat $f
202-
done;
203-
if: ${{ failure() }}
204-
name: "Print log files (failed build only)"
205-
206-
- run: |
207-
tar cvf tiledb-$RUNNER_OS.gz.tar binaries_$RUNNER_OS/
199+
if [[ "$RUNNER_OS" == "macOS" ]]; then
200+
if [[ "$(uname -m)" == "arm64" ]]; then
201+
tar cvf tiledb-apple-silicon.gz.tar binaries_apple_silicon/
202+
else
203+
tar cvf tiledb-$RUNNER_OS.gz.tar binaries_$RUNNER_OS/
204+
fi
205+
else
206+
tar cvf tiledb-$RUNNER_OS.gz.tar binaries_$RUNNER_OS/
207+
fi
208208
name: Archive_files
209209
210210
- uses: actions/upload-artifact@v2
@@ -217,15 +217,20 @@ jobs:
217217
with:
218218
name: Upload-Artifact-Mac
219219
path: '*.gz.tar'
220-
if: runner.os == 'macOS'
220+
if: runner.os == 'macOS' && (runner.arch == 'X86' || runner.arch == 'X64')
221+
222+
- uses: actions/upload-artifact@v2
223+
with:
224+
name: Upload-Artifact-Mac-Arm
225+
path: '*.gz.tar'
226+
if: runner.os == 'macOS' && (runner.arch == 'ARM' || runner.arch == 'arm64')
221227
env:
222228
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: ON
223229
ORG_GRADLE_PROJECT_TILEDB_S3: ON
224230

225-
Release:
226-
if: startsWith(github.ref, 'refs/tags/')
231+
Setup-Release:
227232
needs: [Create_Artifacts_Ubuntu_MacOS, Create_Artifacts_Windows]
228-
name: Create-Release
233+
name: Setup-Release
229234
runs-on: ubuntu-latest
230235
steps:
231236

@@ -248,7 +253,7 @@ jobs:
248253
mv Upload-*/* .
249254
250255
mkdir -p ./build/install/lib
251-
mkdir .build/install/arm/lib
256+
mkdir -p ./build/install/arm/lib
252257
mkdir ./build/install/lib64
253258
mkdir ./build/tiledb_jni/
254259
mkdir ./build/tiledb_jni/arm
@@ -266,9 +271,9 @@ jobs:
266271
# OSX
267272
mv libtiledb.dylib ./build/install/lib
268273
mv libtiledbjni.dylib ./build/tiledb_jni
269-
mv arm/libtiledb.dylib .build/install/arm/lib
270-
mv arm/libtiledbjni.dylib .build/tiledb_jni/arm
271-
274+
mv arm/libtiledb.dylib ./build/install/arm/lib
275+
mv arm/libtiledbjni.dylib ./build/tiledb_jni/arm
276+
272277
# Linux
273278
cp libtiledb.so ./build/install/lib
274279
mv libtiledb.so ./build/install/lib64
@@ -284,6 +289,77 @@ jobs:
284289
mkdir jars
285290
cp ./build/libs/*.jar jars
286291
292+
- uses: actions/upload-artifact@v3
293+
with:
294+
name: jars
295+
path: ./jars
296+
297+
env:
298+
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: ON
299+
ORG_GRADLE_PROJECT_TILEDB_S3: ON
300+
301+
302+
Test-Release:
303+
needs: [ Setup-Release ]
304+
name: Test-Release
305+
runs-on: ${{ matrix.os }}
306+
strategy:
307+
matrix:
308+
os: [ macos-11, ubuntu-latest, macos-13-xlarge ]
309+
steps:
310+
311+
- name: Checkout
312+
uses: actions/checkout@v3
313+
314+
- name: Set-up Java
315+
uses: actions/setup-java@v2
316+
with:
317+
distribution: 'adopt'
318+
java-version: '11'
319+
check-latest: true
320+
321+
- uses: actions/download-artifact@v2
322+
with:
323+
name: jars
324+
325+
- name: Run examples with release jar
326+
run: |
327+
cd jars
328+
rm *javadoc* *sources*
329+
p=$(readlink -f *.jar)
330+
cd ../src/main/java/examples/io/tiledb/java/api
331+
javac -cp $p *.java
332+
for x in $(ls -1 *.java | sed 's/.java//');
333+
do
334+
echo $x;
335+
class_name=examples.io.tiledb.java.api.$x;
336+
java -cp $p $class_name;
337+
done
338+
339+
env:
340+
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: ON
341+
ORG_GRADLE_PROJECT_TILEDB_S3: ON
342+
343+
Release:
344+
needs: [ Test-Release ]
345+
name: Release
346+
runs-on: ubuntu-latest
347+
steps:
348+
349+
- name: Checkout
350+
uses: actions/checkout@v3
351+
352+
- name: Set-up Java
353+
uses: actions/setup-java@v2
354+
with:
355+
distribution: 'adopt'
356+
java-version: '11'
357+
check-latest: true
358+
359+
- uses: actions/download-artifact@v2
360+
with:
361+
name: jars
362+
287363
- name: Create Release
288364
id: create_release
289365
uses: softprops/action-gh-release@v1
@@ -294,20 +370,20 @@ jobs:
294370
tag_name: ${{ github.event.release.tag_name }}
295371
name: ${{ github.event.release.tag_name }}
296372
body: ${{steps.github_release.outputs.changelog}}
297-
draft: false
373+
draft: true
298374
prerelease: false
299375

300-
- name: Upload to maven
301-
run: |
302-
chmod +x ./ci/upload_to_maven.sh
303-
./ci/upload_to_maven.sh
304-
shell: bash
305-
env:
306-
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
307-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
308-
GPG_SECRET_KEYS_ENC: ${{ secrets.GPG_SECRET_KEYS_ENC }}
309-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
310-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
376+
# - name: Upload to maven
377+
# run: |
378+
# chmod +x ./ci/upload_to_maven.sh
379+
# ./ci/upload_to_maven.sh
380+
# shell: bash
381+
# env:
382+
# GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
383+
# GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
384+
# GPG_SECRET_KEYS_ENC: ${{ secrets.GPG_SECRET_KEYS_ENC }}
385+
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
386+
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
311387
env:
312388
ORG_GRADLE_PROJECT_TILEDB_SERIALIZATION: ON
313389
ORG_GRADLE_PROJECT_TILEDB_S3: ON

0 commit comments

Comments
 (0)