From 4230df87322729eb248f8a099d0047dc3756c0ab Mon Sep 17 00:00:00 2001 From: Dave Herman Date: Fri, 23 Aug 2024 12:11:30 -0700 Subject: [PATCH] [WIP] arm64 linux (#63) Add linux-arm64-gnu to the cargo-messages build --- pkgs/cargo-messages/lib/load.cjs | 3 +- pkgs/cargo-messages/package.json | 23 ++++- pkgs/package-lock.json | 158 ++++++++++++++++++++++++------ test/integration/proxy/publish.sh | 14 ++- 4 files changed, 162 insertions(+), 36 deletions(-) diff --git a/pkgs/cargo-messages/lib/load.cjs b/pkgs/cargo-messages/lib/load.cjs index eda67753..9c27ec35 100644 --- a/pkgs/cargo-messages/lib/load.cjs +++ b/pkgs/cargo-messages/lib/load.cjs @@ -6,5 +6,6 @@ module.exports = require('@neon-rs/load').proxy({ 'darwin-arm64': () => require('@cargo-messages/darwin-arm64'), 'linux-x64-gnu': () => require('@cargo-messages/linux-x64-gnu'), 'linux-arm-gnueabihf': () => require('@cargo-messages/linux-arm-gnueabihf'), - 'android-arm-eabi': () => require('@cargo-messages/android-arm-eabi') + 'android-arm-eabi': () => require('@cargo-messages/android-arm-eabi'), + 'linux-arm64-gnu': () => require('@cargo-messages/linux-arm64-gnu') }); diff --git a/pkgs/cargo-messages/package.json b/pkgs/cargo-messages/package.json index b99967b3..202bdb7d 100644 --- a/pkgs/cargo-messages/package.json +++ b/pkgs/cargo-messages/package.json @@ -40,7 +40,7 @@ "author": "David Herman ", "license": "MIT", "devDependencies": { - "@neon-rs/cli": "^0.1.67" + "@neon-rs/cli": "^0.1.73" }, "repository": { "type": "git", @@ -60,7 +60,26 @@ "neon": { "type": "library", "org": "@cargo-messages", - "platforms": "extended", + "platforms": { + "win32-x64-msvc": "x86_64-pc-windows-msvc", + "darwin-x64": "x86_64-apple-darwin", + "darwin-arm64": "aarch64-apple-darwin", + "linux-x64-gnu": "x86_64-unknown-linux-gnu", + "linux-arm64-gnu": "aarch64-unknown-linux-gnu", + "win32-arm64-msvc": "aarch64-pc-windows-msvc", + "linux-arm-gnueabihf": "armv7-unknown-linux-gnueabihf", + "android-arm-eabi": "armv7-linux-androideabi" + }, "load": "./lib/load.cjs" + }, + "optionalDependencies": { + "@cargo-messages/win32-x64-msvc": "0.1.73", + "@cargo-messages/darwin-x64": "0.1.73", + "@cargo-messages/darwin-arm64": "0.1.73", + "@cargo-messages/linux-x64-gnu": "0.1.73", + "@cargo-messages/win32-arm64-msvc": "0.1.73", + "@cargo-messages/linux-arm-gnueabihf": "0.1.73", + "@cargo-messages/android-arm-eabi": "0.1.73", + "@cargo-messages/linux-arm64-gnu": "0.1.73" } } diff --git a/pkgs/package-lock.json b/pkgs/package-lock.json index ef0fd817..43625bbb 100644 --- a/pkgs/package-lock.json +++ b/pkgs/package-lock.json @@ -19,9 +19,103 @@ "@neon-rs/load": "^0.1.49" }, "devDependencies": { - "@neon-rs/cli": "^0.1.67" + "@neon-rs/cli": "^0.1.73" + }, + "optionalDependencies": { + "@cargo-messages/android-arm-eabi": "0.1.73", + "@cargo-messages/darwin-arm64": "0.1.73", + "@cargo-messages/darwin-x64": "0.1.73", + "@cargo-messages/linux-arm-gnueabihf": "0.1.73", + "@cargo-messages/linux-arm64-gnu": "0.1.73", + "@cargo-messages/linux-x64-gnu": "0.1.73", + "@cargo-messages/win32-arm64-msvc": "0.1.73", + "@cargo-messages/win32-x64-msvc": "0.1.73" } }, + "cargo-messages/node_modules/@cargo-messages/android-arm-eabi": { + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@cargo-messages/android-arm-eabi/-/android-arm-eabi-0.1.73.tgz", + "integrity": "sha512-CgA4N99Ov4jYcdFesW/kUVo16uRQKELXMom4fH0Dnsogf5Dq0keET99Sbu+8qnliAMI6kl1fCzFuROeE4o94Zg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ] + }, + "cargo-messages/node_modules/@cargo-messages/darwin-arm64": { + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-arm64/-/darwin-arm64-0.1.73.tgz", + "integrity": "sha512-o/k7XPwADI2u+7A/O+0qB+Z36r6krj1SLIk6J2/PBLwNCgZghNAnwqm0aD4avNClxkUgvsuvcx/5nClJ3Z95KA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "cargo-messages/node_modules/@cargo-messages/darwin-x64": { + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-x64/-/darwin-x64-0.1.73.tgz", + "integrity": "sha512-LGnNt7GNPi9jZhBCg4vBdP7AaVFgOtO3orz9JJegryMpZpJ35wxqb39Ntx8nZ7rMsWyC2RF6HUjizvPRV4oaYQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "cargo-messages/node_modules/@cargo-messages/linux-arm-gnueabihf": { + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm-gnueabihf/-/linux-arm-gnueabihf-0.1.73.tgz", + "integrity": "sha512-rRa5ctEBEry2zfZ0wN30sgFAmyrMu35bMCY0Oz/6dF1FkC11AhgNWiVJAk+p1BpR3Yu1s0X7yCwnVkWt+S3XZA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "cargo-messages/node_modules/@cargo-messages/linux-x64-gnu": { + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-gnu/-/linux-x64-gnu-0.1.73.tgz", + "integrity": "sha512-Uj2Zy0ve6qImol9M5w873voHIe/Qer/LUci80dBNrgwrBBuXVI8JFkEoBnQ17jqRWsWYrZxNITAL0ZIT2PUTpA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "cargo-messages/node_modules/@cargo-messages/win32-arm64-msvc": { + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@cargo-messages/win32-arm64-msvc/-/win32-arm64-msvc-0.1.73.tgz", + "integrity": "sha512-EohLJYAn/SoplLzpFwKjSgOeCd9xID7DG/JwLgdUTZKjze+0/ffSlOwQ6lPxl1x7LngzB6yUR4nIybl4Q56N4g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "cargo-messages/node_modules/@cargo-messages/win32-x64-msvc": { + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@cargo-messages/win32-x64-msvc/-/win32-x64-msvc-0.1.73.tgz", + "integrity": "sha512-xDHdcevTQ0mgfsB2z+PdfS7Q6eH07aGPGUVlnGazjGkGoAQojvPWh2JULwv2Z26Pqnq4bOtZAVqEhzQ0ZB6fIg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, "load": { "name": "@neon-rs/load", "version": "0.1.73", @@ -33,9 +127,9 @@ } }, "node_modules/@cargo-messages/android-arm-eabi": { - "version": "0.1.66", - "resolved": "https://registry.npmjs.org/@cargo-messages/android-arm-eabi/-/android-arm-eabi-0.1.66.tgz", - "integrity": "sha512-FH7bjqofQWt8ktUB91xSt63AfCZUmJUxu/ild3/OX7uCdGBwJ2vHXQppjnervEuYya7O5CoTZ+FNUhqVFMAkdw==", + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/@cargo-messages/android-arm-eabi/-/android-arm-eabi-0.1.72.tgz", + "integrity": "sha512-gGZxIM1mj+Y5x+ULND6ZCNr7f70OJi9wDlycSK8hGONy9wrChN6JAIHryddC5cqcwlYAoQ6IDcDFElnhAYbybA==", "cpu": [ "arm" ], @@ -46,9 +140,9 @@ ] }, "node_modules/@cargo-messages/darwin-arm64": { - "version": "0.1.66", - "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-arm64/-/darwin-arm64-0.1.66.tgz", - "integrity": "sha512-1eLV3JeCWAIAJ+Cy79oA475neGQU/nQgc0Y11tBJOHu5CDIU8+1zTfdRKRgA3PupqKgNmBJGM896+SXtdNE5YA==", + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-arm64/-/darwin-arm64-0.1.72.tgz", + "integrity": "sha512-EAzN5MLaXPljZKZDO5qR+aBs44eSq2ZbEnS7AI/FziE3MzeXbrGOS3fLba5+7yWPFXJyZolXzePm8N1EBv8ovg==", "cpu": [ "arm64" ], @@ -59,9 +153,9 @@ ] }, "node_modules/@cargo-messages/darwin-x64": { - "version": "0.1.66", - "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-x64/-/darwin-x64-0.1.66.tgz", - "integrity": "sha512-cfvcXvRL1MTE/Ny7ukmcv7ZFosXhOiEYn5btvfvxLtsKnO5ZIerUqGtRDhVp1YAUNQinhDdUQTSJNxzvvVWmwg==", + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/@cargo-messages/darwin-x64/-/darwin-x64-0.1.72.tgz", + "integrity": "sha512-RLo6j8s3nYbjdd1LDct4wamfChyRit7zokUuxtIYCu9XOlltkN5vnj1vwnrPvoqCMZ/7CbbuHFwSTn9A71de/w==", "cpu": [ "x64" ], @@ -72,9 +166,9 @@ ] }, "node_modules/@cargo-messages/linux-arm-gnueabihf": { - "version": "0.1.66", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm-gnueabihf/-/linux-arm-gnueabihf-0.1.66.tgz", - "integrity": "sha512-9TNknBFrxZrTRuDodiWJgI8iyKTw0KKIm9s89AgguR23hQaNmpm7Ziwdp4V0FCA7EOs5El47KAFDNFV/SgeeoA==", + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-arm-gnueabihf/-/linux-arm-gnueabihf-0.1.72.tgz", + "integrity": "sha512-tHsRshuzfjrX6SDW3jg6al8vMNLTMgczGnVYl5RuBZf/yrAUuwe30KxA9ge6w6mW6Ox797DyBchzAc9OLgTgmQ==", "cpu": [ "arm" ], @@ -85,9 +179,9 @@ ] }, "node_modules/@cargo-messages/linux-x64-gnu": { - "version": "0.1.66", - "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-gnu/-/linux-x64-gnu-0.1.66.tgz", - "integrity": "sha512-knFJIzGNco/onabi3pubuuikL/TR5y0IbS5lFq/wTNzijazFOU7r/ihBOewJlrlAuiWRl1nxueLXaiAwXWXDng==", + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/@cargo-messages/linux-x64-gnu/-/linux-x64-gnu-0.1.72.tgz", + "integrity": "sha512-VGtL6CCnUbhsP4aYuBNT5kfrAL7o0qjrxw97a+ax13t+nJd26tVEEIKHMu5drvvS/Nm/hn7sLT8zMnnCv0pvHg==", "cpu": [ "x64" ], @@ -98,9 +192,9 @@ ] }, "node_modules/@cargo-messages/win32-arm64-msvc": { - "version": "0.1.66", - "resolved": "https://registry.npmjs.org/@cargo-messages/win32-arm64-msvc/-/win32-arm64-msvc-0.1.66.tgz", - "integrity": "sha512-bORY5s7D7rgA//KfTNox1PxLWwmjNrIaPolHk4cAh9DnYDpehQncUNBCq1RlwuwhY28D8bqMUClPdDf/Gl45HQ==", + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/@cargo-messages/win32-arm64-msvc/-/win32-arm64-msvc-0.1.72.tgz", + "integrity": "sha512-V93Cgz39K+yqa3MveNbhh29pYCp8izK5uEavjPoxlNxAbsMCWH+s0verGDdUcfGxjR1H2V7oZ4FszPqR2SqMRQ==", "cpu": [ "arm64" ], @@ -111,9 +205,9 @@ ] }, "node_modules/@cargo-messages/win32-x64-msvc": { - "version": "0.1.66", - "resolved": "https://registry.npmjs.org/@cargo-messages/win32-x64-msvc/-/win32-x64-msvc-0.1.66.tgz", - "integrity": "sha512-zgRYHP1VC+YeAZQ4aGfKpM7dFCyV2tB9O1zMfH99YC+VVwwRA69ZIOB/TtmQtMXkGLnuOC+4QPlD5VO5OI6+Qg==", + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/@cargo-messages/win32-x64-msvc/-/win32-x64-msvc-0.1.72.tgz", + "integrity": "sha512-knz3uSrO0OSbq3U5VWfCY8FB4NsM43BOWLZ7x4sfaMOC1XWv+IyvDdkLe6DhJx8KUw46KIAimYs9YROrp6l46Q==", "cpu": [ "x64" ], @@ -124,21 +218,21 @@ ] }, "node_modules/@neon-rs/cli": { - "version": "0.1.67", - "resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.1.67.tgz", - "integrity": "sha512-cvSNhlnlV4je1agZN+VycRt8AGo6ny0D6dbWuEfaNbNwiU9RCOFrqAmjVFejBEI1MumDFio2XNr8SmQeaUYgXw==", + "version": "0.1.73", + "resolved": "https://registry.npmjs.org/@neon-rs/cli/-/cli-0.1.73.tgz", + "integrity": "sha512-1kv8S/feB6UQWQQwsnGfkSkEBOtlFDNExnioL81E2BwvUWgjQPaseHgpi2EpWVgsPUgur5eBm4QowmlpWkD4/w==", "dev": true, "bin": { "neon": "index.js" }, "optionalDependencies": { - "@cargo-messages/android-arm-eabi": "0.1.66", - "@cargo-messages/darwin-arm64": "0.1.66", - "@cargo-messages/darwin-x64": "0.1.66", - "@cargo-messages/linux-arm-gnueabihf": "0.1.66", - "@cargo-messages/linux-x64-gnu": "0.1.66", - "@cargo-messages/win32-arm64-msvc": "0.1.66", - "@cargo-messages/win32-x64-msvc": "0.1.66" + "@cargo-messages/android-arm-eabi": "0.1.72", + "@cargo-messages/darwin-arm64": "0.1.72", + "@cargo-messages/darwin-x64": "0.1.72", + "@cargo-messages/linux-arm-gnueabihf": "0.1.72", + "@cargo-messages/linux-x64-gnu": "0.1.72", + "@cargo-messages/win32-arm64-msvc": "0.1.72", + "@cargo-messages/win32-x64-msvc": "0.1.72" } }, "node_modules/@neon-rs/load": { diff --git a/test/integration/proxy/publish.sh b/test/integration/proxy/publish.sh index b48fda0c..9a07cec2 100755 --- a/test/integration/proxy/publish.sh +++ b/test/integration/proxy/publish.sh @@ -20,7 +20,19 @@ PROXY_PASSWORD=dummycipassword PROXY_EMAIL=ci@neon-bindings.com PROXY_SERVER=http://127.0.0.1:4873/ -npx npm-cli-adduser -u ${PROXY_USER} -p ${PROXY_PASSWORD} -e ${PROXY_EMAIL} -r ${PROXY_SERVER} +NPM_AUTH_TOKEN=$( +curl -s \ + -H "Accept: application/json" \ + -H "Content-Type: application/json" \ + -X PUT -d@- \ + --user ${PROXY_USER}:${PROXY_PASSWORD} \ + ${PROXY_SERVER}-/user/org.couchdb.user:${PROXY_USER} << EOF | jq -r .token +{"name": "${PROXY_USER}", "password": "${PROXY_PASSWORD}", "type": "user"} +EOF +) + +npm config set "${PROXY_SERVER:5}:_authToken" "${NPM_AUTH_TOKEN}" + (cd pkgs/load && npm publish --registry $PROXY_SERVER) (cd dist/cli && npm publish --registry $PROXY_SERVER)