Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from tutao/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
ganthern authored Nov 27, 2023
2 parents 12593c5 + d264f8d commit 5ca9746
Show file tree
Hide file tree
Showing 7 changed files with 3,119 additions and 2,053 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
strategy:
matrix:
node-version: [15.x]
os: [ubuntu-20.04, windows-latest, macos-latest]
os: [ubuntu-20.04, windows-2019, macos-latest]
include:
- os: ubuntu-20.04
friendlyName: Ubuntu
- os: windows-latest
- os: windows-2019
friendlyName: Windows
- os: macos-latest
friendlyName: macOS
Expand All @@ -50,7 +50,7 @@ jobs:
$NodeVersion = (node --version) -replace '^.'
$NodeFallbackVersion = "15.8.0"
& .\script\download-node-lib-win-arm64.ps1 $NodeVersion $NodeFallbackVersion
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2019' }}
name: Install Windows arm64 node.lib
- run: npm install
Expand Down Expand Up @@ -84,17 +84,19 @@ jobs:
if: ${{ matrix.os != 'ubuntu-20.04' }}

- run: npm run prebuild-napi-ia32
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2019' }}
name: Prebuild (Windows x86)

- run: |
mkdir -p prebuilds && chmod 777 prebuilds
docker build -t node-keytar/i386 docker/i386
docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-napi-ia32 && rm -rf build"
docker build -t node-keytar/arm64-cross-compile docker/arm64-cross-compile
docker run --rm -v ${PWD}:/project node-keytar/arm64-cross-compile /bin/bash -c "cd /project && npm run prebuild-napi-arm64"
docker run --rm -v ${PWD}:/project node-keytar/arm64-cross-compile /bin/bash -c "cd /project && npm run prebuild-napi-arm64 && rm -rf build"
docker build -t node-keytar/armv7l-cross-compile docker/armv7l-cross-compile
docker run --rm -v ${PWD}:/project node-keytar/armv7l-cross-compile /bin/bash -c "cd /project && npm run prebuild-napi-armv7l"
if: ${{ matrix.os == 'ubuntu-20.04' }}
name: Prebuild (Linux x86 + ARM64)
name: Prebuild (Linux x86 + ARM64 + ARMV7L)
- run: |
ls prebuilds/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-2019, macos-latest]
include:
- os: ubuntu-latest
friendlyName: Ubuntu
- os: windows-latest
- os: windows-2019
friendlyName: Windows
- os: macos-latest
friendlyName: macOS
Expand Down
15 changes: 13 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,21 @@
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'MACOSX_DEPLOYMENT_TARGET': '10.15',
},
'msvs_settings': {
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
'VCCLCompilerTool': {
'ExceptionHandling': 1,
'AdditionalOptions': [
'/Qspectre',
'/guard:cf'
]
},
'VCLinkerTool': {
'AdditionalOptions': [
'/guard:cf'
]
}
},
'include_dirs': ["<!(node -p \"require('node-addon-api').include_dir\")"],
'sources': [
Expand Down
29 changes: 29 additions & 0 deletions docker/armv7l-cross-compile/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM debian:buster

RUN dpkg --add-architecture armhf
RUN apt-get update && apt-get install -y --no-install-recommends \
crossbuild-essential-armhf \
python \
git \
pkg-config \
fakeroot \
rpm \
ca-certificates \
libx11-dev:armhf \
libx11-xcb-dev:armhf \
libxkbfile-dev:armhf \
libsecret-1-dev:armhf \
curl

ENV AS=/usr/bin/arm-linux-gnueabihf-as \
STRIP=/usr/bin/arm-linux-gnueabihf-strip \
AR=/usr/bin/arm-linux-gnueabihf-ar \
CC=/usr/bin/arm-linux-gnueabihf-gcc \
CPP=/usr/bin/arm-linux-gnueabihf-cpp \
CXX=/usr/bin/arm-linux-gnueabihf-g++ \
LD=/usr/bin/arm-linux-gnueabihf-ld \
FC=/usr/bin/arm-linux-gnueabihf-gfortran \
PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig

RUN curl -sL https://deb.nodesource.com/setup_15.x | bash -
RUN apt-get install -y nodejs
Binary file added keytar-3.118.13.node
Binary file not shown.
Loading

0 comments on commit 5ca9746

Please sign in to comment.