forked from deepjavalibrary/djl
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (83 loc) · 3.11 KB
/
release.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
name: release
on:
# To trigger this workflow manually, you can use the following curl command:
# curl -XPOST -u "USERNAME:PERSONAL_TOKEN" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/awslabs/djl/dispatches --data '{"event_type": "release-build"}'
# Make sure you create your personal token with repo access. Follow steps in
# https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
# to create your personal token.
repository_dispatch:
types: [release-build]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
# Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: check disk space
run: df -h
- name: Build with Gradle
run: ./gradlew build
- name: Publish to staging repository
run: |
./gradlew publish -Pstaging
# Publish PyTorch Engine CentOS to staging repository
./gradlew :pytorch:pytorch-engine:publish -Pstaging -Pcentos
cd bom
./gradlew publish -Pstaging
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_ossrhUsername }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_ossrhPassword }}
- name: API test results
uses: actions/upload-artifact@v1
if: always()
with:
name: api
path: api/build/reports
- name: basicdataset test results
uses: actions/upload-artifact@v1
if: always()
with:
name: basicdataset
path: basicdataset/build/reports
- name: examples test results
uses: actions/upload-artifact@v1
if: always()
with:
name: examples
path: examples/build/reports
- name: integration test results
uses: actions/upload-artifact@v1
if: always()
with:
name: integration
path: integration/build/reports
- name: model-zoo test results
uses: actions/upload-artifact@v1
if: always()
with:
name: model-zoo
path: model-zoo/build/reports
- name: mxnet-engine test results
uses: actions/upload-artifact@v1
if: always()
with:
name: mxnet-engine
path: mxnet/mxnet-engine/build/reports
- name: mxnet-model-zoo test results
uses: actions/upload-artifact@v1
if: always()
with:
name: mxnet-model-zoo
path: mxnet/mxnet-model-zoo/build/reports