-
Notifications
You must be signed in to change notification settings - Fork 38
96 lines (85 loc) · 3.4 KB
/
main.yml
File metadata and controls
96 lines (85 loc) · 3.4 KB
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
# 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"
BUILD:
strategy:
matrix:
os: [ mulesoft-ubuntu, mulesoft-windows ]
include:
- os: mulesoft-ubuntu
script_name: linux
- os: mulesoft-windows
script_name: windows
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@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
# Setup Graalvm
- name: Setup Graalvm
uses: graalvm/setup-graalvm@v1
with:
java-version: '24'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
# Runs a single command using the runners shell
- name: Run Build
run: |
./gradlew --stacktrace --no-problems-report build
shell: bash
#Run regression tests
- name: Run regression test 2.9.8
run: |
./gradlew --stacktrace -PweaveTestSuiteVersion=2.9.8 -DweaveSuiteVersion=2.9.8 native-cli-integration-tests:test
shell: bash
- name: Run regression test 2.10
run: |
./gradlew --stacktrace -PweaveTestSuiteVersion=2.10.0 -DweaveSuiteVersion=2.10.0 native-cli-integration-tests:test
shell: bash
# Generate distro
- name: Create Distro
run: ./gradlew --stacktrace --no-problems-report native-cli:distro
shell: bash
# Install Python build dependencies (setuptools/wheel may be missing on Windows runners)
- name: Install Python build dependencies
run: python3 -m pip install --upgrade setuptools wheel
shell: bash
# Generate native-lib python wheel
- name: Create Native Lib Python Wheel
run: ./gradlew --stacktrace --no-problems-report native-lib:buildPythonWheel
shell: bash
# Upload the artifact file
- name: Upload generated script
uses: actions/upload-artifact@v4
with:
name: dw-${{env.NATIVE_VERSION}}-${{runner.os}}
path: native-cli/build/distributions/native-cli-${{env.NATIVE_VERSION}}-native-distro-${{ matrix.script_name }}.zip
# Upload the Python wheel
- name: Upload Python wheel
uses: actions/upload-artifact@v4
with:
name: dw-python-wheel-${{env.NATIVE_VERSION}}-${{runner.os}}
path: native-lib/python/dist/dataweave_native-0.0.1-py3-*.whl
# Upload the native shared library + header together per OS
- name: Upload native shared library
uses: actions/upload-artifact@v4
with:
name: dwlib-${{env.NATIVE_VERSION}}-${{runner.os}}
path: |
native-lib/python/src/dataweave/native/dwlib.dylib
native-lib/python/src/dataweave/native/dwlib.so
native-lib/python/src/dataweave/native/dwlib.dll
native-lib/python/src/dataweave/native/dwlib.h