Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ${{ matrix.os }}
# prettier-ignore
name: ${{ matrix.os }}-${{ matrix.node_arch }}-${{ matrix.dockerfile }}-${{ matrix.distro }}
name: ${{ matrix.os }}-${{ matrix.node_arch }}-${{ matrix.dockerfile }}-${{ matrix.distro }}-${{ matrix.base_image }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -60,7 +60,8 @@ jobs:
- os: ubuntu-24.04
node_arch: arm64
cpp_arch: amd64_arm64
distro: bookworm
distro: none
base_image: aminya/setup-cpp-ubuntu-gcc:20.04-1.3.0
native: false

# Musl Alpine Arm
Expand Down Expand Up @@ -175,21 +176,24 @@ jobs:

- name: Build Linux Arm64
if: ${{ matrix.distro }}
uses: uraimo/run-on-arch-action@v2.8.1
uses: uraimo/run-on-arch-action@v3.0.0
with:
arch: aarch64
distro: ${{ matrix.distro }}
base_image: ${{ matrix.base_image }}
githubToken: ${{ github.token }}
setup: |
mkdir -p "${PWD}/build"
dockerRunArgs: |
--volume "${PWD}/build:/build"
shell: /bin/bash
env: |
VCPKG_FORCE_SYSTEM_BINARIES: 1
install: |
${{ steps.read-installer-script.outputs.install_deps }}

run: |
(test -f $HOME/.cpprc && . $HOME/.cpprc || true) && \
pnpm install && \
pnpm run build

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if(APPLE)
endif()

run_vcpkg(VCPKG_URL "https://github.com/microsoft/vcpkg.git" VCPKG_REV
"ee2d2a100103e0f3613c60655dcf15be7d5157b8")
"608d1dbcd6969679f82b1ca6b89d58939c9b228e")

# Name of the project (will be the name of the plugin)
project(addon LANGUAGES C CXX)
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@
"overrides": {
"typescript": "~4.9.5",
"node-gyp": "10.0.1"
}
},
"onlyBuiltDependencies": [
"core-js",
"electron"
]
},
"files": [
"CHANGELOG.md",
Expand Down
90 changes: 45 additions & 45 deletions script/install-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,35 @@

set -x

VCPKG_COMMIT="608d1dbcd6969679f82b1ca6b89d58939c9b228e"

# Ubuntu/Debian
apt=$(command -v apt-get || true)
if [ -n "$apt" ]; then
apt-get update -q -y

# if setup-cpp not installed
if [ -z "$(command -v setup-cpp || true)" ]; then
apt-get install --no-install-recommends -y \
bash \
gnupg \
ca-certificates \
curl

# install latest nodejs
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt-get update -qq
apt-get install -y --no-install-recommends nodejs

npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT
fi

apt-get install --no-install-recommends -y \
bash \
build-essential \
curl \
git \
g++ \
make \
ninja-build \
pkg-config \
unzip \
zip \
python3 \
tar \
cmake \
ninja-build \
automake \
autoconf \
libtool \
nodejs \
npm
libtool
fi

# Alpine Linux
Expand All @@ -34,46 +39,41 @@ if [ -n "$apk" ]; then
apk update
apk add --no-cache bash build-base curl git g++ make ninja-build pkgconfig unzip zip python3 tar cmake musl-dev automake autoconf libtool nodejs npm
cp /usr/lib/ninja-build/bin/ninja /usr/bin/ninja

# vcpkg
export VCPKG_FORCE_SYSTEM_BINARIES=1
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
cd ~/vcpkg || exit 1
git checkout "$VCPKG_COMMIT"
~/vcpkg/bootstrap-vcpkg.sh
cd - || exit 1
fi

# Fedora/RHEL
dnf=$(command -v dnf || true)
if [ -n "$dnf" ]; then
dnf update -q -y

# if setup-cpp not installed
if [ -z "$(command -v setup-cpp || true)" ]; then
dnf install -y \
bash \
nodejs

npx -y setup-cpp --compiler gcc --python true --cmake true --ninja true --make true --vcpkg $VCPKG_COMMIT --git true
fi

dnf install -y \
bash \
build-essential \
curl \
git \
g++ \
make \
ninja-build \
pkg-config \
unzip \
zip \
python3 \
tar \
cmake \
ninja-build \
automake \
autoconf \
libtool \
nodejs
libtool
fi

# pnpm
npm i -g pnpm

export VCPKG_FORCE_SYSTEM_BINARIES=1

# vcpkg
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
cd ~/vcpkg || exit 1
git checkout "ee2d2a100103e0f3613c60655dcf15be7d5157b8"
~/vcpkg/bootstrap-vcpkg.sh
cd - || exit 1

# zeromq
cd ~/vcpkg || exit 1
git checkout "$VCPKG_COMMIT" --force
~/vcpkg/vcpkg install 'zeromq[draft,curve,sodium]' || (cd - || exit 1)
cd - || exit 1

# pnpm
npm i -g pnpm
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "zeromqjs",
"version-string": "6.0.8",
"builtin-baseline": "ee2d2a100103e0f3613c60655dcf15be7d5157b8",
"builtin-baseline": "608d1dbcd6969679f82b1ca6b89d58939c9b228e",
"dependencies": [
{
"name": "zeromq",
Expand Down
Loading