Skip to content

Commit 7d87442

Browse files
committed
feat: add HIP report generation functionality and related dependencies
1 parent f398cca commit 7d87442

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2749
-1168
lines changed

.devcontainer/Dockerfile

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,36 @@ ARG USER_GID=$USER_UID
77
ENV RUSTUP_HOME=/usr/local/rustup \
88
CARGO_HOME=/usr/local/cargo \
99
PATH=/usr/local/cargo/bin:$PATH \
10-
RUST_VERSION=1.85.0
10+
RUST_VERSION=1.85.0 \
11+
DEBIAN_FRONTEND=noninteractive
1112

12-
# Install common dependencies
13+
# Install all system dependencies in a single layer and clean up apt cache
1314
RUN set -eux; \
1415
apt-get update; \
1516
apt-get install -y --no-install-recommends \
17+
# Common utilities
1618
sudo \
1719
ca-certificates \
1820
curl \
1921
gnupg \
2022
git \
2123
less \
22-
software-properties-common
24+
wget \
25+
file \
26+
software-properties-common \
27+
# libopenconnect-dev to install the related dependencies for building openconnect from source
28+
# Otherwise, we have to install them manually one by one
29+
libopenconnect-dev \
30+
# Tauri dependencies
31+
libwebkit2gtk-4.1-dev \
32+
build-essential \
33+
libxdo-dev \
34+
libssl-dev \
35+
libayatana-appindicator3-dev \
36+
librsvg2-dev; \
37+
# Clean up apt cache to reduce image size
38+
apt-get clean; \
39+
rm -rf /var/lib/apt/lists/*
2340

2441
# Create a non-root user
2542
RUN set -eux; \
@@ -30,38 +47,21 @@ RUN set -eux; \
3047

3148
# Install Rust
3249
RUN set -eux; \
33-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUST_VERSION; \
50+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUST_VERSION --profile minimal; \
3451
chown -R $USERNAME:$USERNAME $RUSTUP_HOME $CARGO_HOME; \
3552
rustup --version; \
3653
cargo --version; \
3754
rustc --version
3855

39-
# Install Node.js
56+
# Install Node.js and global npm packages
4057
RUN set -eux; \
4158
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -; \
42-
apt-get install -y nodejs; \
59+
apt-get install -y --no-install-recommends nodejs; \
4360
corepack enable; \
44-
# Install diff-so-fancy
45-
npm install -g diff-so-fancy
46-
47-
# Install openconnect
48-
RUN set -eux; \
49-
add-apt-repository ppa:yuezk/globalprotect-openconnect; \
50-
apt-get update; \
51-
apt-get install -y openconnect libopenconnect-dev
52-
53-
# Tauri dependencies
54-
RUN set -eux; \
55-
apt-get install -y \
56-
libwebkit2gtk-4.1-dev \
57-
build-essential \
58-
curl \
59-
wget \
60-
file \
61-
libxdo-dev \
62-
libssl-dev \
63-
libayatana-appindicator3-dev \
64-
librsvg2-dev
61+
npm install -g diff-so-fancy; \
62+
# Clean up apt cache
63+
apt-get clean; \
64+
rm -rf /var/lib/apt/lists/*
6565

6666
USER $USERNAME
6767

.github/workflows/build.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,11 @@ jobs:
151151
- name: Docker Login
152152
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
153153
- name: Build ${{ matrix.package }} package in Docker
154+
# LIBXML2_STATIC is needed to avoid the dynamic linking issue on different distros
154155
run: |
155156
docker run --pull=always --rm \
156157
-e COREPACK_INTEGRITY_KEYS=0 \
158+
-e LIBXML2_STATIC=1 \
157159
-v $(pwd)/build-gp-${{ matrix.package }}:/workspace \
158160
yuezk/gpdev:${{ matrix.package }}-builder-tauri2
159161
- name: Install ${{ matrix.package }} package in Docker

.gitmodules

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
[submodule "deps/openconnect"]
2-
path = deps/openconnect
1+
[submodule "crates/openconnect/deps/openconnect"]
2+
path = crates/openconnect/deps/openconnect
33
url = https://gitlab.com/openconnect/openconnect.git
4+
[submodule "crates/openconnect/deps/libxml2"]
5+
path = crates/openconnect/deps/libxml2
6+
url = https://gitlab.gnome.org/GNOME/libxml2.git

.vscode/c_cpp_properties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"configurations": [
33
{
44
"name": "Mac",
5-
"includePath": ["deps/openconnect"],
5+
"includePath": ["crates/openconnect/deps/openconnect"],
66
"macFrameworkPath": ["/System/Library/Frameworks", "/Library/Frameworks"],
77
"intelliSenseMode": "macos-clang-x64",
88
"compilerPath": "/usr/bin/clang",

0 commit comments

Comments
 (0)