-
Notifications
You must be signed in to change notification settings - Fork 32
79 lines (72 loc) · 2.65 KB
/
main.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
# This is a basic workflow to help you get started with Actions
name: Build Native CLI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
NATIVE_VERSION: 100.100.100
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
OSX_LINUX_WINDOWS:
strategy:
matrix:
os: [ macos-latest, mulesoft-labs-ubuntu, mulesoft-labs-windows ]
include:
- os: mulesoft-labs-windows
script_name: windows
- os: mulesoft-labs-ubuntu
script_name: linux
- os: macos-latest
script_name: osx
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Read graalvm version
- name: Read Graalvm version
run: |
echo "GRAALVM_VERSION=$(grep graalvmVersion gradle.properties | cut -d '=' -f2)" >> $GITHUB_ENV
shell: bash
# Setup Graalvm
- name: Setup Graalvm
uses: graalvm/setup-graalvm@v1
with:
version: ${{env.GRAALVM_VERSION}}
java-version: '11'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
# Runs a single command using the runners shell
- name: Run Build
run: |
./gradlew --stacktrace build
shell: bash
#Run regression tests
- name: Run regression test 2.7
run: |
./gradlew --stacktrace -PweaveTestSuiteVersion=2.7.0-SNAPSHOT native-cli-integration-tests:test
shell: bash
#Run regression tests
- name: Run regression test 2.6
run: |
./gradlew --stacktrace -PweaveTestSuiteVersion=2.6.1 native-cli-integration-tests:test
shell: bash
- name: Run regression test 2.4
run: |
./gradlew --stacktrace -PweaveTestSuiteVersion=2.4.0-HF-SNAPSHOT native-cli-integration-tests:test
shell: bash
# Generate distro
- name: Create Distro
run: ./gradlew --stacktrace native-cli:distro
shell: bash
# Upload the artifact file
- name: Upload generated script
uses: actions/upload-artifact@v2
with:
name: dw-${{env.NATIVE_VERSION}}-${{runner.os}}
path: native-cli/build/distributions/native-cli-${{env.NATIVE_VERSION}}-native-distro-${{ matrix.script_name }}.zip