Skip to content

Commit

Permalink
Merge branch 'main' into use-quotes-not-brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwhitehead authored Nov 9, 2023
2 parents dd6bf9f + 2bcc7e6 commit 8f48e92
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 47 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ jobs:
run: |
if [ -n "${{ matrix.use_cross }}" ]; then
cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross
# Required for compatibility with manylinux2014.
# https://github.com/briansmith/ring/issues/1728
if [ "${{ matrix.architecture }}" = "linux-aarch64" ]; then
export CFLAGS="-D__ARM_ARCH=8"
fi
cross build --lib --release --target ${{ matrix.target }}
elif [ "${{ matrix.architecture }}" == "darwin-universal" ]; then
./build-universal.sh
Expand Down Expand Up @@ -427,6 +432,11 @@ jobs:
- name: Build
run: |
cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross
# Required for compatibility with manylinux2014:
# https://github.com/briansmith/ring/issues/1728
if [ "${{ matrix.target }}" = "aarch64-linux-android" ]; then
export CFLAGS="-D__ARM_ARCH=8"
fi
cross build --lib --release --target ${{matrix.target}}
- name: Upload artifacts
Expand Down
3 changes: 3 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build.env]
passthrough = ["CFLAGS"]

[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/rust-cross/manylinux2014-cross:aarch64"

Expand Down
12 changes: 12 additions & 0 deletions wrappers/javascript/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ module.exports = {
],
},
overrides: [
{
files: ['**/scripts/*.js'],
env: {
node: true,
},
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'no-console': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
},
},
{
files: ['.eslintrc.js', 'babel.config.js'],
env: {
Expand Down
6 changes: 3 additions & 3 deletions wrappers/javascript/aries-askar-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperledger/aries-askar-nodejs",
"version": "0.2.0-dev.1",
"version": "0.2.0-dev.2",
"license": "Apache-2.0",
"description": "Nodejs wrapper for Aries Askar",
"source": "src/index",
Expand Down Expand Up @@ -31,7 +31,7 @@
"example": "yarn --cwd example",
"release": "release-it",
"test": "jest",
"install": "node-pre-gyp install --target_arch=$(node scripts/arch.js) --target_platform=$(node scripts/platform.js)"
"install": "node scripts/install.js"
},
"devDependencies": {
"@types/jest": "^27.4.1",
Expand All @@ -48,7 +48,7 @@
"dependencies": {
"@2060.io/ffi-napi": "4.0.8",
"@2060.io/ref-napi": "3.0.6",
"@hyperledger/aries-askar-shared": "0.2.0-dev.1",
"@hyperledger/aries-askar-shared": "0.2.0-dev.2",
"@mapbox/node-pre-gyp": "^1.0.10",
"node-cache": "^5.1.2",
"ref-array-di": "^1.2.2",
Expand Down
27 changes: 0 additions & 27 deletions wrappers/javascript/aries-askar-nodejs/scripts/arch.js

This file was deleted.

15 changes: 15 additions & 0 deletions wrappers/javascript/aries-askar-nodejs/scripts/install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const { execSync } = require('node:child_process')
const { arch, platform: osPlatform } = require('os')

const archTable = {
x64: 'x86_64',
arm64: 'aarch64',
}

const platform = osPlatform()
const targetPlatform = platform === 'win32' ? 'windows' : platform
const targetArchitecture = platform == 'darwin' ? 'universal' : archTable[arch]

const command = `node-pre-gyp install --target_arch=${targetArchitecture} --target_platform=${targetPlatform}`

execSync(command)
13 changes: 0 additions & 13 deletions wrappers/javascript/aries-askar-nodejs/scripts/platform.js

This file was deleted.

4 changes: 2 additions & 2 deletions wrappers/javascript/aries-askar-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperledger/aries-askar-react-native",
"version": "0.2.0-dev.1",
"version": "0.2.0-dev.2",
"license": "Apache-2.0",
"description": "React Native wrapper for Aries Askar",
"main": "build/index",
Expand Down Expand Up @@ -35,7 +35,7 @@
"install": "node-pre-gyp install"
},
"dependencies": {
"@hyperledger/aries-askar-shared": "0.2.0-dev.1",
"@hyperledger/aries-askar-shared": "0.2.0-dev.2",
"@mapbox/node-pre-gyp": "^1.0.10"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion wrappers/javascript/aries-askar-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperledger/aries-askar-shared",
"version": "0.2.0-dev.1",
"version": "0.2.0-dev.2",
"license": "Apache-2.0",
"description": "Shared library for using Aries Askar with NodeJS and React Native",
"main": "build/index",
Expand Down
2 changes: 1 addition & 1 deletion wrappers/javascript/lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.2.0-dev.1",
"version": "0.2.0-dev.2",
"npmClient": "yarn",
"command": {
"version": {
Expand Down

0 comments on commit 8f48e92

Please sign in to comment.