Skip to content

Commit bb2532a

Browse files
feat: add win32-ia32 and darwin-arm64 (macOS Apple Silicon) npm packages (#108)
Add two new platform targets to the datadog-serverless-compat CI pipeline: - win32-ia32: 32-bit Windows build via native windows-2022 runner (i686-pc-windows-msvc, UPX-compressed) - darwin-arm64: macOS Apple Silicon build via native macos-14 runner (aarch64-apple-darwin, no UPX — preserves Mach-O code signing) Each platform adds a build step to build-datadog-serverless-compat.yml, artifact download/processing in the package job, and an npm publish line in the publish job of publish.yml. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e3c16ed commit bb2532a

File tree

4 files changed

+93
-1
lines changed

4 files changed

+93
-1
lines changed

.github/workflows/build-datadog-serverless-compat.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,25 @@ jobs:
6363
name: windows-amd64
6464
path: target/release/datadog-serverless-compat.exe
6565
retention-days: 3
66+
- if: ${{ inputs.runner == 'windows-2022' }}
67+
shell: bash
68+
run: |
69+
rustup target add i686-pc-windows-msvc
70+
cargo build --release -p datadog-serverless-compat \
71+
--target i686-pc-windows-msvc \
72+
--features windows-pipes
73+
- if: ${{ inputs.runner == 'windows-2022' }}
74+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
75+
with:
76+
name: windows-ia32
77+
path: target/i686-pc-windows-msvc/release/datadog-serverless-compat.exe
78+
retention-days: 3
79+
- if: ${{ inputs.runner == 'macos-14' }}
80+
shell: bash
81+
run: cargo build --release -p datadog-serverless-compat
82+
- if: ${{ inputs.runner == 'macos-14' }}
83+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
84+
with:
85+
name: darwin-arm64
86+
path: target/release/datadog-serverless-compat
87+
retention-days: 3

.github/workflows/publish.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
runner: [ubuntu-24.04, ubuntu-24.04-arm, windows-2022]
27+
runner: [ubuntu-24.04, ubuntu-24.04-arm, windows-2022, macos-14]
2828
uses: ./.github/workflows/build-datadog-serverless-compat.yml
2929
with:
3030
runner: ${{ matrix.runner }}
@@ -56,6 +56,16 @@ jobs:
5656
name: windows-amd64
5757
path: target/windows-amd64
5858
- run: upx target/windows-amd64/datadog-serverless-compat.exe --lzma
59+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0
60+
with:
61+
name: windows-ia32
62+
path: target/windows-ia32
63+
- run: upx target/windows-ia32/datadog-serverless-compat.exe --lzma
64+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0
65+
with:
66+
name: darwin-arm64
67+
path: target/darwin-arm64
68+
- run: chmod +x target/darwin-arm64/datadog-serverless-compat
5969
- name: Determine version
6070
id: determine-version
6171
env:
@@ -85,6 +95,14 @@ jobs:
8595
mkdir -p npm/datadog-serverless-compat-win32-x64/bin
8696
cp target/windows-amd64/datadog-serverless-compat.exe npm/datadog-serverless-compat-win32-x64/bin/
8797
npm --prefix npm/datadog-serverless-compat-win32-x64 pkg set version="$VERSION"
98+
99+
mkdir -p npm/datadog-serverless-compat-win32-ia32/bin
100+
cp target/windows-ia32/datadog-serverless-compat.exe npm/datadog-serverless-compat-win32-ia32/bin/
101+
npm --prefix npm/datadog-serverless-compat-win32-ia32 pkg set version="$VERSION"
102+
103+
mkdir -p npm/datadog-serverless-compat-darwin-arm64/bin
104+
cp target/darwin-arm64/datadog-serverless-compat npm/datadog-serverless-compat-darwin-arm64/bin/
105+
npm --prefix npm/datadog-serverless-compat-darwin-arm64 pkg set version="$VERSION"
88106
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
89107
with:
90108
name: npm-packages
@@ -105,8 +123,13 @@ jobs:
105123
with:
106124
node-version: "22.x"
107125
registry-url: 'https://registry.npmjs.org'
126+
- run: npm config set //registry.npmjs.org/:_authToken=$NPM_PUBLISH_TOKEN
127+
env:
128+
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
108129
- name: Publish npm packages
109130
run: |
110131
npm publish ./npm/datadog-serverless-compat-linux-x64 --provenance --access public
111132
npm publish ./npm/datadog-serverless-compat-linux-arm64 --provenance --access public
112133
npm publish ./npm/datadog-serverless-compat-win32-x64 --provenance --access public
134+
npm publish ./npm/datadog-serverless-compat-win32-ia32 --provenance --access public
135+
npm publish ./npm/datadog-serverless-compat-darwin-arm64 --provenance --access public
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "@datadog/serverless-compat-darwin-arm64",
3+
"version": "0.0.0",
4+
"description": "macOS arm64 binary for the Datadog Serverless Compatibility Layer",
5+
"os": [
6+
"darwin"
7+
],
8+
"cpu": [
9+
"arm64"
10+
],
11+
"files": [
12+
"bin/"
13+
],
14+
"publishConfig": {
15+
"access": "public",
16+
"executableFiles": [
17+
"./bin/datadog-serverless-compat"
18+
]
19+
},
20+
"license": "Apache-2.0",
21+
"repository": {
22+
"type": "git",
23+
"url": "https://github.com/DataDog/serverless-components"
24+
}
25+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "@datadog/serverless-compat-win32-ia32",
3+
"version": "0.0.0",
4+
"description": "Windows ia32 binary for the Datadog Serverless Compatibility Layer",
5+
"os": [
6+
"win32"
7+
],
8+
"cpu": [
9+
"ia32"
10+
],
11+
"files": [
12+
"bin/"
13+
],
14+
"publishConfig": {
15+
"access": "public"
16+
},
17+
"license": "Apache-2.0",
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/DataDog/serverless-components"
21+
}
22+
}

0 commit comments

Comments
 (0)