-
Notifications
You must be signed in to change notification settings - Fork 1
111 lines (104 loc) · 4.04 KB
/
Copy pathbuild.yml
File metadata and controls
111 lines (104 loc) · 4.04 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Build
on:
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- run: yarn install
- run: yarn install
working-directory: test/crashtracker
- run: yarn lint
build-apm-data-pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
- name: Add WASM target
run: rustup target add wasm32-unknown-unknown
- run: npm ci --prefix packages/apm-data-pipeline
- run: cargo install wasm-pack --locked
- run: npm run build --prefix packages/apm-data-pipeline
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: apm-data-pipeline-dist
path: packages/apm-data-pipeline/dist
test-apm-data-pipeline:
needs: build-apm-data-pipeline
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 24]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node }}
- run: npm ci --prefix packages/apm-data-pipeline
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: apm-data-pipeline-dist
path: packages/apm-data-pipeline/dist
- if: matrix.node == 18
# Node 18's experimental node:test runner retains a completed WASM
# callback. Run the same exporter assertions from a global async entry
# point, then keep node:test coverage for the remaining test files.
working-directory: packages/apm-data-pipeline
run: |
node -e "const { runExporterTests } = require('./test/exporter'); (async () => { await runExporterTests(); process.exit(0) })().catch((error) => { console.error(error); process.exit(1) })"
node --test test/bundlers.test.js test/package.test.js
- if: matrix.node != 18
run: npm test --prefix packages/apm-data-pipeline
- run: npm run test:package --prefix packages/apm-data-pipeline
build-test-wasm:
runs-on: ubuntu-latest
strategy:
matrix:
crate:
- library_config
- datadog-js-zstd
- pipeline
- sketches
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- 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
min-node-version: 18
rust: true
only: darwin-arm64,darwin-x64,linux-arm64,linux-x64
# Need this, now that libdatadog packages libunwind as a submodule
prebuild: '(command -v apk >/dev/null && apk add autoconf automake libtool) || (command -v apt-get >/dev/null && apt-get update && apt-get install -y autoconf automake libtool) || true'
package-size:
runs-on: ubuntu-latest
needs: build
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- run: yarn install
- name: Compute module size tree and report
uses: qard/heaviest-objects-in-the-universe@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}