Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,68 @@ jobs:
# Runs a single command using the runners shell
- name: Run Build (Latest)
run: |
./gradlew --stacktrace --no-problems-report -PweaveVersion=2.11.0-SNAPSHOT -PweaveTestSuiteVersion=2.11.0-SNAPSHOT -PweaveSuiteVersion=2.11.0-SNAPSHOT build
./gradlew --stacktrace --no-problems-report -PskipNodeTests=true -PweaveVersion=2.11.0-SNAPSHOT -PweaveTestSuiteVersion=2.11.0-SNAPSHOT -PweaveSuiteVersion=2.11.0-SNAPSHOT build
shell: bash

# Generate distro
- name: Create Distro
run: ./gradlew --stacktrace --no-problems-report -PweaveVersion=2.11.0-SNAPSHOT -PweaveTestSuiteVersion=2.11.0-SNAPSHOT -PweaveSuiteVersion=2.11.0-SNAPSHOT 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 -PweaveVersion=2.11.0-SNAPSHOT native-lib:buildPythonWheel
shell: bash

# Setup Node.js for native-lib Node package
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

# Stage the native lib and build Node package (npm install, node-gyp, tsc, npm pack)
- name: Create Native Lib Node Package
run: ./gradlew --stacktrace --no-problems-report -PweaveVersion=2.11.0-SNAPSHOT native-lib:buildNodePackage
shell: bash

# Run Node.js tests
- name: Run Node.js Tests
run: ./gradlew --stacktrace --no-problems-report -PweaveVersion=2.11.0-SNAPSHOT native-lib:nodeTest
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 Node.js package
- name: Upload Node package
uses: actions/upload-artifact@v4
with:
name: dw-node-package-${{env.NATIVE_VERSION}}-${{runner.os}}
path: native-lib/node/dataweave-native-0.0.1.tgz

# 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
25 changes: 24 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# Runs a single command using the runners shell
- name: Run Build
run: |
./gradlew --stacktrace --no-problems-report build
./gradlew --stacktrace --no-problems-report -PskipNodeTests=true build
shell: bash
#Run regression tests
- name: Run regression test 2.9.8
Expand All @@ -70,6 +70,22 @@ jobs:
run: ./gradlew --stacktrace --no-problems-report native-lib:buildPythonWheel
shell: bash

# Setup Node.js for native-lib Node package
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

# Stage the native lib and build Node package (npm install, node-gyp, tsc, npm pack)
- name: Create Native Lib Node Package
run: ./gradlew --stacktrace --no-problems-report native-lib:buildNodePackage
shell: bash

# Run Node.js tests
- name: Run Node.js Tests
run: ./gradlew --stacktrace --no-problems-report native-lib:nodeTest
shell: bash

# Upload the artifact file
- name: Upload generated script
uses: actions/upload-artifact@v4
Expand All @@ -84,6 +100,13 @@ jobs:
name: dw-python-wheel-${{env.NATIVE_VERSION}}-${{runner.os}}
path: native-lib/python/dist/dataweave_native-0.0.1-py3-*.whl

# Upload the Node.js package
- name: Upload Node package
uses: actions/upload-artifact@v4
with:
name: dw-node-package-${{env.NATIVE_VERSION}}-${{runner.os}}
path: native-lib/node/dataweave-native-0.0.1.tgz

# Upload the native shared library + header together per OS
- name: Upload native shared library
uses: actions/upload-artifact@v4
Expand Down
79 changes: 78 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,40 @@ jobs:
# Runs a single command using the runners shell
- name: Run Build
run: |
./gradlew --stacktrace --no-problems-report build -PnativeVersion=${{env.NATIVE_VERSION}}
./gradlew --stacktrace --no-problems-report -PskipNodeTests=true build -PnativeVersion=${{env.NATIVE_VERSION}}
shell: bash

# Generate distro
- name: Create Distro
run: ./gradlew --stacktrace --no-problems-report native-cli:distro -PnativeVersion=${{env.NATIVE_VERSION}}
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 -PnativeVersion=${{env.NATIVE_VERSION}}
shell: bash

# Setup Node.js for native-lib Node package
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

# Stage the native lib and build Node package (npm install, node-gyp, tsc, npm pack)
- name: Create Native Lib Node Package
run: ./gradlew --stacktrace --no-problems-report native-lib:buildNodePackage -PnativeVersion=${{env.NATIVE_VERSION}}
shell: bash

# Run Node.js tests
- name: Run Node.js Tests
run: ./gradlew --stacktrace --no-problems-report native-lib:nodeTest -PnativeVersion=${{env.NATIVE_VERSION}}
shell: bash

# Upload the artifact file
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
Expand All @@ -60,3 +86,54 @@ jobs:
asset_name: dw-${{env.NATIVE_VERSION}}-${{runner.os}}
tag: ${{ github.ref }}
overwrite: true

# Upload the Python wheel
- name: Upload Python wheel to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: native-lib/python/dist/dataweave_native-0.0.1-py3-none-any.whl
asset_name: dw-python-wheel-${{env.NATIVE_VERSION}}-${{runner.os}}.whl
tag: ${{ github.ref }}
overwrite: true

# Upload the Node.js package
- name: Upload Node package to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: native-lib/node/dataweave-native-0.0.1.tgz
asset_name: dw-node-package-${{env.NATIVE_VERSION}}-${{runner.os}}.tgz
tag: ${{ github.ref }}
overwrite: true

# Upload the native shared library
- name: Upload native shared library to release (Linux)
if: runner.os == 'Linux'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: native-lib/python/src/dataweave/native/dwlib.so
asset_name: dwlib-${{env.NATIVE_VERSION}}-${{runner.os}}.so
tag: ${{ github.ref }}
overwrite: true

- name: Upload native shared library to release (Windows)
if: runner.os == 'Windows'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: native-lib/python/src/dataweave/native/dwlib.dll
asset_name: dwlib-${{env.NATIVE_VERSION}}-${{runner.os}}.dll
tag: ${{ github.ref }}
overwrite: true

# Upload the native library header
- name: Upload native library header to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: native-lib/python/src/dataweave/native/dwlib.h
asset_name: dwlib-${{env.NATIVE_VERSION}}.h
tag: ${{ github.ref }}
overwrite: true
2 changes: 2 additions & 0 deletions native-lib/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ python/src/dataweave/native/
python/src/dataweave_native.egg-info/
python/dist/
python/build/

node_modules/
Loading
Loading