Skip to content

Commit

Permalink
ci: add install-deps script
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 2, 2025
1 parent d20d90f commit 08840f4
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 57 deletions.
58 changes: 1 addition & 57 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,63 +178,7 @@ jobs:
env: |
VCPKG_FORCE_SYSTEM_BINARIES: 1
install: |
set -x
case "${{ matrix.distro }}" in
fedora*)
dnf update -q -y
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
;;
alpine*)
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
;;
*)
# Default case (Ubuntu/Debian)
apt-get update -q -y
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
;;
esac
npm i -g pnpm
npx -y setup-cpp --vcpkg "ee2d2a100103e0f3613c60655dcf15be7d5157b8"
~/vcpkg/vcpkg install 'zeromq[draft,curve,sodium]'
./script/install-deps.bash
run: |
pnpm install && \
Expand Down
74 changes: 74 additions & 0 deletions script/install-deps.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/bin/bash

set -x

# Ubuntu/Debian
apt=$(command -v apt-get || true)
if [[ -n $apt ]]; then
apt-get update -q -y
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
fi

# Alpine Linux
apk=$(command -v apk || true)
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
fi

# Fedora/RHEL
dnf=$(command -v dnf || true)
if [[ -n $dnf ]]; then
dnf update -q -y
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
fi

# pnpm
npm i -g pnpm

# vcpkg
npx -y setup-cpp --vcpkg "ee2d2a100103e0f3613c60655dcf15be7d5157b8"

# zeromq
export VCPKG_FORCE_SYSTEM_BINARIES=1
cd ~/vcpkg || exit 1
~/vcpkg/vcpkg install 'zeromq[draft,curve,sodium]' || (cd - || exit 1)
cd - || exit 1

0 comments on commit 08840f4

Please sign in to comment.