Skip to content
Merged
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
31 changes: 31 additions & 0 deletions .github/actions/build-test-wasm/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Build/Test WASM'
description: 'A simple composite GitHub Action sets-up WASM; then test & build relevant crates'
inputs:
cate:
description: 'The crate name. Must be in ./crates'
required: true
runs:
using: 'composite'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- run: yarn install
shell: bash
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
shell: bash
- name: Build WASM
run: |
mkdir -p ./prebuilds/${{ inputs.crate }}
wasm-pack build --target nodejs ./crates/${{ inputs.crate }} --out-dir ../../prebuilds/${{ inputs.crate }}
shell: bash
- name: Test WASM
run: node test_wasm.js
shell: bash
- uses: actions/upload-artifact@v4
with:
name: prebuilds-wasm
if-no-files-found: ignore
path: ./prebuilds/*
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@ on:
- main

jobs:
build-test-wasm:
runs-on: ubuntu-latest
strategy:
matrix:
crate:
- library_config
steps:
- uses: actions/checkout@v4
- name: 'Use composite action'
uses: ./.github/actions/build-test-wasm
with:
crate: '${{ matrix.crate }}'

build:
uses: Datadog/action-prebuildify/.github/workflows/build.yml@main
needs: build-test-wasm
with:
package-manager: 'yarn'
cache: false
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,22 @@ on:
- v0.x

jobs:
build-test-wasm:
Comment thread
BaptisteFoy marked this conversation as resolved.
runs-on: ubuntu-latest
strategy:
matrix:
crate:
- library_config
steps:
- uses: actions/checkout@v4
- name: 'Use composite action'
uses: ./.github/actions/build-test-wasm
with:
crate: '${{ matrix.crate }}'

build:
uses: Datadog/action-prebuildify/.github/workflows/build.yml@main
needs: build-test-wasm
with:
package-manager: 'yarn'
cache: false
Expand Down
164 changes: 154 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default-members = [
"crates/crashtracker"
]
members = [
"crates/*"
"crates/*",
]

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion crates/crashtracker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ path = "src/bin/receiver.rs"

[dependencies]
anyhow = "1"
datadog-crashtracker = { git = "https://github.com/DataDog/libdatadog.git", tag = "v14.3.1" }
datadog-crashtracker = { git = "https://github.com/DataDog/libdatadog.git", tag = "v15.0.0" }
napi = { version = "2", features = ["serde-json"] }
napi-derive = { version = "2", default-features = false }
rustls = { version = "*", default-features = false, features = ["aws-lc-rs"] }
Loading